public static interface i location listener public void location changed string url ilocationlistener locationchanged public void location changed string url public void history changed string history2 locationchanged historychanged public static interface i back next listener public void update back next busy ibacknextlistener updatebacknextbusy creates a new web browser given its parent and a style value describing its behavior and appearance p the style value is either one of the style constants defined in the class header or class code swt code which is applicable to instances of this class or must be built by em bitwise or em ing together that is using the code int code operator two or more of those code swt code style constants the class description lists the style constants that are applicable to the class style bits are also inherited from superclasses p param parent a composite control which will be the parent of the new instance cannot be null param style the style of control to construct public browser viewer composite parent int style super parent swt none if style location bar 0 showur lbar true if style button bar 0 show toolbar true grid layout layout new grid layout layout margin height 0 layout margin width 0 layout horizontal spacing 0 layout vertical spacing 0 layout num columns 1 set layout layout set layout data new grid data grid data fill both clipboard new clipboard parent get display if show toolbar showur lbar composite toolbar comp new composite this swt none toolbar comp set layout new toolbar layout toolbar comp set layout data new grid data grid data vertical align beginning grid data fill horizontal if show toolbar create toolbar toolbar comp if showur lbar create location bar toolbar comp if show toolbar showur lbar busy new busy indicator toolbar comp swt none busy set layout data new grid data grid data horizontal align end busy add mouse listener new mouse listener public void mouse double click mouse event e ignore public void mouse down mouse event e seturl http www eclipse org non nls 1 public void mouse up mouse event e ignore platformui get workbench get help system set help this context ids web browser create a new swt web browser widget checking once again to make sure we can use it in this environment if web browser util can use internal web browser try this browser new browser this swt none catch swt error e if e code swt error no handles web browser util open error messages error could not launch internal web browser return text new browser text this this e if showur lbar update history if show toolbar update back next busy if browser null browser set layout data new grid data grid data fill both platformui get workbench get help system set help browser context ids web browser else text get control set layout data new grid data grid data fill both add browser listeners listen browserviewer location_bar showurlbar button_bar showtoolbar gridlayout gridlayout marginheight marginwidth horizontalspacing verticalspacing numcolumns setlayout setlayoutdata griddata griddata fill_both getdisplay showtoolbar showurlbar toolbarcomp toolbarcomp setlayout toolbarlayout toolbarcomp setlayoutdata griddata griddata vertical_align_beginning griddata fill_horizontal showtoolbar createtoolbar toolbarcomp showurlbar createlocationbar toolbarcomp showtoolbar showurlbar busyindicator toolbarcomp setlayoutdata griddata griddata horizontal_align_end addmouselistener mouselistener mousedoubleclick mouseevent mousedown mouseevent mouseup mouseevent getworkbench gethelpsystem sethelp contextids web_browser webbrowserutil canuseinternalwebbrowser swterror error_no_handles webbrowserutil openerror errorcouldnotlaunchinternalwebbrowser browsertext showurlbar updatehistory showtoolbar updatebacknextbusy setlayoutdata griddata griddata fill_both getworkbench gethelpsystem sethelp contextids web_browser getcontrol setlayoutdata griddata griddata fill_both addbrowserlisteners busy set layout data new grid data grid data horizontal align end busy add mouse listener new mouse listener public void mouse double click mouse event e ignore setlayoutdata griddata griddata horizontal_align_end addmouselistener mouselistener mousedoubleclick mouseevent public void mouse down mouse event e seturl http www eclipse org non nls 1 mousedown mouseevent public void mouse up mouse event e ignore mouseup mouseevent returns the underlying swt browser widget return the underlying browser public browser get browser return browser getbrowser navigate to the home url public void home browser set text non nls 1 settext loads a url param url the url to be loaded return true if the operation was successful and false otherwise exception illegal argument exception ul li error null argument if the url is null li ul exception swt exception ul li error thread invalid access when called from the wrong thread li li error widget disposed when the widget has been disposed li ul see geturl public void seturl string url seturl url true illegalargumentexception error_null_argument swtexception error_thread_invalid_access error_widget_disposed protected void update back next busy back set enabled is back enabled forward set enabled is forward enabled busy set busy loading if back next listener null back next listener update back next busy updatebacknextbusy setenabled isbackenabled setenabled isforwardenabled setbusy backnextlistener backnextlistener updatebacknextbusy protected void update location if location listener null location listener history changed null if location listener null location listener location changed null updatelocation locationlistener locationlistener historychanged locationlistener locationlistener locationchanged private void add browser listeners if browser null return respond to external browser instance status text events events by updating the status line browser add status text listener new status text listener public void changed status text event event system out println status event text non nls 1 if container null i status line manager status container get action bars get status line manager status set message event text add listener for new window creation so that we can instead of opening a separate new window in which the session is lost we can instead open a new window in a new shell within the browser area thereby maintaining the session browser add open window listener new open window listener public void open window event event shell shell2 new shell get display shell2 set layout new fill layout shell2 set text messages view web browser title shell2 set image get shell get image if event location null shell2 set location event location if event size null shell2 set size event size int style 0 if event address bar style location bar if event tool bar style button bar browser viewer browser2 new browser viewer shell2 0 browser2 new window true event browser browser2 browser browser add visibility window listener new visibility window listener public void hide window event e ignore public void show window event e browser browser2 browser e widget if browser2 get parent get parent instanceof shell shell shell shell browser2 get parent get parent if e location null shell set location e location if e size null shell set size shell compute size e size x e size y shell open browser add close window listener new close window listener public void close window event event if shell is not null it must be a secondary popup window else its an editor window if new window get shell dispose else container close browser add progress listener new progress listener public void changed progress event event system out println progress event current event total non nls 1 non nls 2 if event total 0 return boolean done event current event total int percent progress event current 100 event total if container null i progress monitor monitor container get action bars get status line manager get progress monitor if done monitor done progress worked 0 else if progress worked 0 monitor begin task event total non nls 1 progress worked percent progress else monitor worked event current progress worked progress worked event current if show toolbar if busy is busy done loading true else if busy is busy done once the progress hits 100 percent done set busy to false loading false system out println loading loading non nls 1 update back next busy update history public void completed progress event event if container null i progress monitor monitor container get action bars get status line manager get progress monitor monitor done if show toolbar loading false update back next busy update history if show toolbar browser add location listener new location listener public void changed location event event if event top return if combo null if about blank equals event location non nls 1 combo set text event location add to history event location update history else combo set text non nls 1 public void changing location event event do nothing browser add title listener new title listener public void changed title event event string old title title title event title fire property change event property title old title title addbrowserlisteners externalbrowserinstance statustextevents addstatustextlistener statustextlistener statustextevent istatuslinemanager getactionbars getstatuslinemanager setmessage addopenwindowlistener openwindowlistener windowevent getdisplay setlayout filllayout settext viewwebbrowsertitle setimage getshell getimage setlocation setsize addressbar location_bar toolbar button_bar browserviewer browserviewer newwindow addvisibilitywindowlistener visibilitywindowlistener windowevent windowevent getparent getparent getparent getparent setlocation setsize computesize addclosewindowlistener closewindowlistener windowevent newwindow getshell addprogresslistener progresslistener progressevent percentprogress iprogressmonitor getactionbars getstatuslinemanager getprogressmonitor progressworked progressworked begintask progressworked percentprogress progressworked progressworked showtoolbar isbusy isbusy updatebacknextbusy updatehistory progressevent iprogressmonitor getactionbars getstatuslinemanager getprogressmonitor showtoolbar updatebacknextbusy updatehistory showtoolbar addlocationlistener locationlistener locationevent settext addtohistory updatehistory settext locationevent addtitlelistener titlelistener titleevent oldtitle firepropertychangeevent property_title oldtitle browser add status text listener new status text listener public void changed status text event event system out println status event text non nls 1 if container null i status line manager status container get action bars get status line manager status set message event text addstatustextlistener statustextlistener statustextevent istatuslinemanager getactionbars getstatuslinemanager setmessage browser add open window listener new open window listener public void open window event event shell shell2 new shell get display shell2 set layout new fill layout shell2 set text messages view web browser title shell2 set image get shell get image if event location null shell2 set location event location if event size null shell2 set size event size int style 0 if event address bar style location bar if event tool bar style button bar browser viewer browser2 new browser viewer shell2 0 browser2 new window true event browser browser2 browser addopenwindowlistener openwindowlistener windowevent getdisplay setlayout filllayout settext viewwebbrowsertitle setimage getshell getimage setlocation setsize addressbar location_bar toolbar button_bar browserviewer browserviewer newwindow browser add visibility window listener new visibility window listener public void hide window event e ignore addvisibilitywindowlistener visibilitywindowlistener windowevent public void show window event e browser browser2 browser e widget if browser2 get parent get parent instanceof shell shell shell shell browser2 get parent get parent if e location null shell set location e location if e size null shell set size shell compute size e size x e size y shell open windowevent getparent getparent getparent getparent setlocation setsize computesize browser add close window listener new close window listener public void close window event event if shell is not null it must be a secondary popup window else its an editor window if new window get shell dispose else container close addclosewindowlistener closewindowlistener windowevent newwindow getshell browser add progress listener new progress listener public void changed progress event event system out println progress event current event total non nls 1 non nls 2 if event total 0 return boolean done event current event total int percent progress event current 100 event total if container null i progress monitor monitor container get action bars get status line manager get progress monitor if done monitor done progress worked 0 else if progress worked 0 monitor begin task event total non nls 1 progress worked percent progress else monitor worked event current progress worked progress worked event current if show toolbar if busy is busy done loading true else if busy is busy done once the progress hits 100 percent done set busy to false loading false system out println loading loading non nls 1 update back next busy update history addprogresslistener progresslistener progressevent percentprogress iprogressmonitor getactionbars getstatuslinemanager getprogressmonitor progressworked progressworked begintask progressworked percentprogress progressworked progressworked showtoolbar isbusy isbusy updatebacknextbusy updatehistory public void completed progress event event if container null i progress monitor monitor container get action bars get status line manager get progress monitor monitor done if show toolbar loading false update back next busy update history progressevent iprogressmonitor getactionbars getstatuslinemanager getprogressmonitor showtoolbar updatebacknextbusy updatehistory browser add location listener new location listener public void changed location event event if event top return if combo null if about blank equals event location non nls 1 combo set text event location add to history event location update history else combo set text non nls 1 addlocationlistener locationlistener locationevent settext addtohistory updatehistory settext public void changing location event event do nothing locationevent browser add title listener new title listener public void changed title event event string old title title title event title fire property change event property title old title title addtitlelistener titlelistener titleevent oldtitle firepropertychangeevent property_title oldtitle add a property change listener to this instance param listener java beans property change listener public void add property change listener property change listener listener if property listeners null property listeners new array list property listeners add listener propertychangelistener addpropertychangelistener propertychangelistener propertylisteners propertylisteners arraylist propertylisteners remove a property change listener from this instance param listener java beans property change listener public void remove property change listener property change listener listener if property listeners null property listeners remove listener propertychangelistener removepropertychangelistener propertychangelistener propertylisteners propertylisteners fire a property change event protected void fire property change event string property name object old value object new value if property listeners null return property change event event new property change event this property name old value new value trace trace firing event old value try int size property listeners size property change listener pcl new property change listener size property listeners to array pcl for int i 0 i size i try pcl i property change event catch exception e ignore catch exception e ignore firepropertychangeevent propertyname oldvalue newvalue propertylisteners propertychangeevent propertychangeevent propertyname oldvalue newvalue oldvalue propertylisteners propertychangelistener propertychangelistener propertylisteners toarray propertychange navigate to the next session history item convenience method that calls the underlying swt browser return code true code if the operation was successful and code false code otherwise exception swt exception ul li error thread invalid access when called from the wrong thread li li error widget disposed when the widget has been disposed li ul see back public boolean forward if browser null return false return browser forward swtexception error_thread_invalid_access error_widget_disposed navigate to the previous session history item convenience method that calls the underlying swt browser return code true code if the operation was successful and code false code otherwise exception swt exception ul li error thread invalid access when called from the wrong thread li li error widget disposed when the widget has been disposed li ul see forward public boolean back if browser null return false return browser back swtexception error_thread_invalid_access error_widget_disposed returns code true code if the receiver can navigate to the previous session history item and code false code otherwise convenience method that calls the underlying swt browser return the receiver s back command enabled state exception swt exception ul li error widget disposed if the receiver has been disposed li li error thread invalid access if not called from the thread that created the receiver li ul see back public boolean is back enabled if browser null return false return browser is back enabled swtexception error_widget_disposed error_thread_invalid_access isbackenabled isbackenabled returns code true code if the receiver can navigate to the next session history item and code false code otherwise convenience method that calls the underlying swt browser return the receiver s forward command enabled state exception swt exception ul li error widget disposed if the receiver has been disposed li li error thread invalid access if not called from the thread that created the receiver li ul see forward public boolean is forward enabled if browser null return false return browser is forward enabled swtexception error_widget_disposed error_thread_invalid_access isforwardenabled isforwardenabled stop any loading and rendering activity convenience method that calls the underlying swt browser exception swt exception ul li error thread invalid access when called from the wrong thread li li error widget disposed when the widget has been disposed li ul public void stop if browser null browser stop swtexception error_thread_invalid_access error_widget_disposed private boolean navigate string url trace trace trace finer navigate url non nls 1 if url null url equals geturl refresh return true if browser null return browser set url url return text set url url seturl seturl refresh the current page convenience method that calls the underlying swt browser exception swt exception ul li error thread invalid access when called from the wrong thread li li error widget disposed when the widget has been disposed li ul public void refresh if browser null browser refresh else text refresh try thread sleep 50 catch exception e ignore swtexception error_thread_invalid_access error_widget_disposed private void seturl string url boolean browse trace trace trace finest seturl url browse non nls 1 non nls 2 if url null home return if eclipse equals ignore case url non nls 1 url http www eclipse org non nls 1 else if wtp equals ignore case url non nls 1 url http www eclipse org webtools non nls 1 if browse navigate url add to history url update history equalsignorecase equalsignorecase addtohistory updatehistory protected void add to history string url if history null history web browser preference get internal web browser history int found 1 int size history size for int i 0 i size i string s string history get i if s equals url found i break if found 1 if size max history history remove size 1 history add 0 url web browser preference set internal web browser history history else if found 0 history remove found history add 0 url web browser preference set internal web browser history history addtohistory webbrowserpreference getinternalwebbrowserhistory max_history webbrowserpreference setinternalwebbrowserhistory webbrowserpreference setinternalwebbrowserhistory public void dispose super dispose show toolbar false if busy null busy dispose busy null browser null text null if clipboard null clipboard dispose clipboard null remove synchronization listener showtoolbar removesynchronizationlistener private tool bar create location bar composite parent combo new combo parent swt drop down update history combo add selection listener new selection adapter public void widget selected selection event we try if combo get selection index 1 seturl combo get item combo get selection index catch exception e ignore combo add listener swt default selection new listener public void handle event event e seturl combo get text tool bar toolbar new tool bar parent swt flat tool item go new tool item toolbar swt none go set image image resource get image image resource img elcl nav go go set hot image image resource get image image resource img clcl nav go go set disabled image image resource get image image resource img dlcl nav go go set tool tip text messages action web browser go go add selection listener new selection adapter public void widget selected selection event event seturl combo get text return toolbar toolbar createlocationbar drop_down updatehistory addselectionlistener selectionadapter widgetselected selectionevent getselectionindex getitem getselectionindex addlistener defaultselection handleevent gettext toolbar toolbar toolitem toolitem setimage imageresource getimage imageresource img_elcl_nav_go sethotimage imageresource getimage imageresource img_clcl_nav_go setdisabledimage imageresource getimage imageresource img_dlcl_nav_go settooltiptext actionwebbrowsergo addselectionlistener selectionadapter widgetselected selectionevent gettext combo add selection listener new selection adapter public void widget selected selection event we try if combo get selection index 1 seturl combo get item combo get selection index catch exception e ignore addselectionlistener selectionadapter widgetselected selectionevent getselectionindex getitem getselectionindex combo add listener swt default selection new listener public void handle event event e seturl combo get text addlistener defaultselection handleevent gettext go set tool tip text messages action web browser go go add selection listener new selection adapter public void widget selected selection event event seturl combo get text settooltiptext actionwebbrowsergo addselectionlistener selectionadapter widgetselected selectionevent gettext private tool bar create toolbar composite parent tool bar toolbar new tool bar parent swt flat create back and forward actions back new tool item toolbar swt none back set image image resource get image image resource img elcl nav backward back set hot image image resource get image image resource img clcl nav backward back set disabled image image resource get image image resource img dlcl nav backward back set tool tip text messages action web browser back back add selection listener new selection adapter public void widget selected selection event event back forward new tool item toolbar swt none forward set image image resource get image image resource img elcl nav forward forward set hot image image resource get image image resource img clcl nav forward forward set disabled image image resource get image image resource img dlcl nav forward forward set tool tip text messages action web browser forward forward add selection listener new selection adapter public void widget selected selection event event forward create refresh stop and print actions tool item stop new tool item toolbar swt none stop set image image resource get image image resource img elcl nav stop stop set hot image image resource get image image resource img clcl nav stop stop set disabled image image resource get image image resource img dlcl nav stop stop set tool tip text messages action web browser stop stop add selection listener new selection adapter public void widget selected selection event event stop tool item refresh new tool item toolbar swt none refresh set image image resource get image image resource img elcl nav refresh refresh set hot image image resource get image image resource img clcl nav refresh refresh set disabled image image resource get image image resource img dlcl nav refresh refresh set tool tip text messages action web browser refresh refresh add selection listener new selection adapter public void widget selected selection event event refresh return toolbar toolbar createtoolbar toolbar toolbar toolitem setimage imageresource getimage imageresource img_elcl_nav_backward sethotimage imageresource getimage imageresource img_clcl_nav_backward setdisabledimage imageresource getimage imageresource img_dlcl_nav_backward settooltiptext actionwebbrowserback addselectionlistener selectionadapter widgetselected selectionevent toolitem setimage imageresource getimage imageresource img_elcl_nav_forward sethotimage imageresource getimage imageresource img_clcl_nav_forward setdisabledimage imageresource getimage imageresource img_dlcl_nav_forward settooltiptext actionwebbrowserforward addselectionlistener selectionadapter widgetselected selectionevent toolitem toolitem setimage imageresource getimage imageresource img_elcl_nav_stop sethotimage imageresource getimage imageresource img_clcl_nav_stop setdisabledimage imageresource getimage imageresource img_dlcl_nav_stop settooltiptext actionwebbrowserstop addselectionlistener selectionadapter widgetselected selectionevent toolitem toolitem setimage imageresource getimage imageresource img_elcl_nav_refresh sethotimage imageresource getimage imageresource img_clcl_nav_refresh setdisabledimage imageresource getimage imageresource img_dlcl_nav_refresh settooltiptext actionwebbrowserrefresh addselectionlistener selectionadapter widgetselected selectionevent back set tool tip text messages action web browser back back add selection listener new selection adapter public void widget selected selection event event back settooltiptext actionwebbrowserback addselectionlistener selectionadapter widgetselected selectionevent forward set tool tip text messages action web browser forward forward add selection listener new selection adapter public void widget selected selection event event forward settooltiptext actionwebbrowserforward addselectionlistener selectionadapter widgetselected selectionevent stop set tool tip text messages action web browser stop stop add selection listener new selection adapter public void widget selected selection event event stop settooltiptext actionwebbrowserstop addselectionlistener selectionadapter widgetselected selectionevent refresh set tool tip text messages action web browser refresh refresh add selection listener new selection adapter public void widget selected selection event event refresh settooltiptext actionwebbrowserrefresh addselectionlistener selectionadapter widgetselected selectionevent returns the current url convenience method that calls the underlying swt browser return the current url or an empty code string code if there is no current url exception swt exception ul li error thread invalid access when called from the wrong thread li li error widget disposed when the widget has been disposed li ul see seturl string public string geturl if browser null return browser get url return text get url swtexception error_thread_invalid_access error_widget_disposed geturl geturl public boolean set focus if combo null combo set focus else if browser null browser set focus else if text null text set focus update history return super set focus setfocus setfocus setfocus setfocus updatehistory setfocus update the history list to the global shared copy protected void update history if combo null return string temp combo get text if history null history web browser preference get internal web browser history string history list new string history size history to array history list combo set items history list combo set text temp updatehistory gettext webbrowserpreference getinternalwebbrowserhistory historylist toarray historylist setitems historylist settext public i browser viewer container get container return container ibrowserviewercontainer getcontainer public void set container i browser viewer container container this container container setcontainer ibrowserviewercontainer protected void add synchronization listener if file listener thread null return file listener thread new thread browser file synchronization non nls 1 public void run while file listener thread null try thread sleep 2000 catch exception e ignore synchronized sync object if file null file last modified timestamp timestamp file last modified display get default sync exec new runnable public void run refresh file listener thread set daemon true file listener thread set priority thread min priority location listener2 new location listener public void changed location event event file temp get file event location if temp null temp exists synchronized sync object file temp timestamp file last modified else file null public void changing location event event do nothing browser add location listener location listener2 file temp get file browser get url if temp null temp exists file temp timestamp file last modified file listener thread start addsynchronizationlistener filelistenerthread filelistenerthread filelistenerthread syncobject lastmodified lastmodified getdefault syncexec filelistenerthread setdaemon filelistenerthread setpriority min_priority locationlistener2 locationlistener locationevent getfile syncobject lastmodified locationevent addlocationlistener locationlistener2 getfile geturl lastmodified filelistenerthread file listener thread new thread browser file synchronization non nls 1 public void run while file listener thread null try thread sleep 2000 catch exception e ignore synchronized sync object if file null file last modified timestamp timestamp file last modified display get default sync exec new runnable public void run refresh filelistenerthread filelistenerthread syncobject lastmodified lastmodified getdefault syncexec timestamp file last modified display get default sync exec new runnable public void run refresh lastmodified getdefault syncexec location listener2 new location listener public void changed location event event file temp get file event location if temp null temp exists synchronized sync object file temp timestamp file last modified else file null locationlistener2 locationlistener locationevent getfile syncobject lastmodified public void changing location event event do nothing locationevent protected static file get file string location if location null return null if location starts with file non nls 1 location location substring 6 return new file location getfile startswith protected void remove synchronization listener if file listener thread null return file listener thread null browser remove location listener location listener2 location listener2 null removesynchronizationlistener filelistenerthread filelistenerthread removelocationlistener locationlistener2 locationlistener2 busy widget constructor comment param parent org eclipse swt widgets composite param style int public busy indicator composite parent int style super parent style images image resource get busy images add paint listener new paint listener public void paint control paint event event on paint event image images 0 busywidget busyindicator imageresource getbusyimages addpaintlistener paintlistener paintcontrol paintevent onpaint public point compute size int w hint int h hint boolean changed return new point 25 25 computesize whint hhint creates a thread to animate the image protected synchronized void create busy thread if busy thread null return stop false busy thread new thread protected int count public void run try count 1 while stop display get default sync exec new runnable public void run if stop if count 13 set image images count count if count 12 count 1 try sleep 125 catch exception e ignore if busy thread null display get default sync exec new thread public void run set image images 0 catch exception e trace trace trace warning busy error e non nls 1 busy thread set priority thread norm priority 2 busy thread set daemon true busy thread start createbusythread busythread busythread getdefault syncexec setimage busythread getdefault syncexec setimage busythread setpriority norm_priority busythread setdaemon busythread protected int count public void run try count 1 while stop display get default sync exec new runnable public void run if stop if count 13 set image images count count if count 12 count 1 try sleep 125 catch exception e ignore if busy thread null display get default sync exec new thread public void run set image images 0 catch exception e trace trace trace warning busy error e non nls 1 getdefault syncexec setimage busythread getdefault syncexec setimage display get default sync exec new runnable public void run if stop if count 13 set image images count count if count 12 count 1 getdefault syncexec setimage if busy thread null display get default sync exec new thread public void run set image images 0 busythread getdefault syncexec setimage public void dispose stop true busy thread null super dispose busythread return the image or code null code public image get image return image getimage returns true if it is currently busy return boolean public boolean is busy return busy thread null isbusy busythread protected void on paint paint event event rectangle rect get client area if rect width 0 rect height 0 return gc gc event gc if image null gc draw image image 2 2 onpaint paintevent getclientarea drawimage sets the indicators busy count up true or down false one param busy boolean public synchronized void set busy boolean busy if busy if busy thread null create busy thread else if busy thread null stop true busy thread null setbusy busythread createbusythread busythread busythread set the image the value code null code clears it public void set image image image if image this image is disposed this image image redraw setimage isdisposed creates a new table layout public table layout tablelayout adds a new column of data to this table layout param data the column layout data public void add column data column layout data data columns add data addcolumndata columnlayoutdata public point compute size composite c int w hint int h hint boolean flush if w hint swt default h hint swt default return new point w hint h hint table table table c to avoid recursions table set layout null use native layout algorithm point result table compute size w hint h hint flush table set layout this int width 0 int size columns size for int i 0 i size i column layout data layout data column layout data columns get i if layout data instanceof column pixel data column pixel data col column pixel data layout data width col width if col add trim width column trim else if layout data instanceof column weight data column weight data col column weight data layout data width col minimum width else assert is true false unknown column layout data non nls 1 if width result x result x width return result computesize whint hhint whint hhint whint hhint setlayout computesize whint hhint setlayout columnlayoutdata layoutdata columnlayoutdata layoutdata columnpixeldata columnpixeldata columnpixeldata layoutdata addtrim column_trim layoutdata columnweightdata columnweightdata columnweightdata layoutdata minimumwidth istrue public void layout composite c boolean flush only do initial layout trying to maintain proportions when resizing is too hard causes lots of widget flicker causes scroll bars to appear and occasionally stick around on windows requires hooking column resizing as well and may not be what the user wants anyway if first time return table table table c int width table get client area width xxx layout is being called with an invalid value the first time it is being called on linux this method resets the layout to null so we make sure we run it only when the value is ok if width 1 return table column table columns table get columns int size math min columns size table columns length int widths new int size int fixed width 0 int number of weight columns 0 int total weight 0 first calc space occupied by fixed columns for int i 0 i size i column layout data col column layout data columns get i if col instanceof column pixel data column pixel data cpd column pixel data col int pixels cpd width if cpd add trim pixels column trim widths i pixels fixed width pixels else if col instanceof column weight data column weight data cw column weight data col number of weight columns first time use the weight specified by the column data otherwise use the actual width as the weight int weight first time cw weight table columns i get width int weight cw weight total weight weight else assert is true false unknown column layout data non nls 1 do we have columns that have a weight if number of weight columns 0 now distribute the rest to the columns with weight int rest width fixed width int total distributed 0 for int i 0 i size i column layout data col column layout data columns get i if col instanceof column weight data column weight data cw column weight data col calculate weight as above int weight first time cw weight table columns i get width int weight cw weight int pixels total weight 0 0 weight rest total weight if pixels cw minimum width pixels cw minimum width total distributed pixels widths i pixels distribute any remaining pixels to columns with weight int diff rest total distributed for int i 0 diff 0 i if i size i 0 column layout data col column layout data columns get i if col instanceof column weight data widths i diff system out print width width int total 0 for int i 0 i widths length i system out print widths i total widths i system out println total total first time false for int i 0 i size i table columns i set width widths i firsttime getclientarea tablecolumn tablecolumns getcolumns tablecolumns fixedwidth numberofweightcolumns totalweight columnlayoutdata columnlayoutdata columnpixeldata columnpixeldata columnpixeldata addtrim column_trim fixedwidth columnweightdata columnweightdata columnweightdata numberofweightcolumns firsttime tablecolumns getwidth totalweight istrue numberofweightcolumns fixedwidth totaldistributed columnlayoutdata columnlayoutdata columnweightdata columnweightdata columnweightdata firsttime tablecolumns getwidth totalweight totalweight minimumwidth minimumwidth totaldistributed totaldistributed columnlayoutdata columnlayoutdata columnweightdata firsttime tablecolumns setwidth creates a new table layout public table layout tablelayout adds a new column of data to this table layout param data the column layout data public void add column data column layout data data columns add data addcolumndata columnlayoutdata public point compute size composite c int w hint int h hint boolean flush if w hint swt default h hint swt default return new point w hint h hint table table table c to avoid recursions table set layout null use native layout algorithm point result table compute size w hint h hint flush table set layout this int width 0 int size columns size for int i 0 i size i column layout data layout data column layout data columns get i if layout data instanceof column pixel data column pixel data col column pixel data layout data width col width if col add trim width column trim else if layout data instanceof column weight data column weight data col column weight data layout data width col minimum width else assert is true false unknown column layout data non nls 1 if width result x result x width return result computesize whint hhint whint hhint whint hhint setlayout computesize whint hhint setlayout columnlayoutdata layoutdata columnlayoutdata layoutdata columnpixeldata columnpixeldata columnpixeldata layoutdata addtrim column_trim layoutdata columnweightdata columnweightdata columnweightdata layoutdata minimumwidth istrue public void layout composite c boolean flush only do initial layout trying to maintain proportions when resizing is too hard causes lots of widget flicker causes scroll bars to appear and occasionally stick around on windows requires hooking column resizing as well and may not be what the user wants anyway if first time return table table table c int width table get client area width xxx layout is being called with an invalid value the first time it is being called on linux this method resets the layout to null so we make sure we run it only when the value is ok if width 1 return table column table columns table get columns int size math min columns size table columns length int widths new int size int fixed width 0 int number of weight columns 0 int total weight 0 first calc space occupied by fixed columns for int i 0 i size i column layout data col column layout data columns get i if col instanceof column pixel data column pixel data cpd column pixel data col int pixels cpd width if cpd add trim pixels column trim widths i pixels fixed width pixels else if col instanceof column weight data column weight data cw column weight data col number of weight columns first time use the weight specified by the column data otherwise use the actual width as the weight int weight first time cw weight table columns i get width int weight cw weight total weight weight else assert is true false unknown column layout data non nls 1 do we have columns that have a weight if number of weight columns 0 now distribute the rest to the columns with weight int rest width fixed width int total distributed 0 for int i 0 i size i column layout data col column layout data columns get i if col instanceof column weight data column weight data cw column weight data col calculate weight as above int weight first time cw weight table columns i get width int weight cw weight int pixels total weight 0 0 weight rest total weight if pixels cw minimum width pixels cw minimum width total distributed pixels widths i pixels distribute any remaining pixels to columns with weight int diff rest total distributed for int i 0 diff 0 i if i size i 0 column layout data col column layout data columns get i if col instanceof column weight data widths i diff system out print width width int total 0 for int i 0 i widths length i system out print widths i total widths i system out println total total first time false for int i 0 i size i table columns i set width widths i firsttime getclientarea tablecolumn tablecolumns getcolumns tablecolumns fixedwidth numberofweightcolumns totalweight columnlayoutdata columnlayoutdata columnpixeldata columnpixeldata columnpixeldata addtrim column_trim fixedwidth columnweightdata columnweightdata columnweightdata numberofweightcolumns firsttime tablecolumns getwidth totalweight istrue numberofweightcolumns fixedwidth totaldistributed columnlayoutdata columnlayoutdata columnweightdata columnweightdata columnweightdata firsttime tablecolumns getwidth totalweight totalweight minimumwidth minimumwidth totaldistributed totaldistributed columnlayoutdata columnlayoutdata columnweightdata firsttime tablecolumns setwidth creates a new table layout public table layout tablelayout adds a new column of data to this table layout param data the column layout data public void add column data column layout data data columns add data addcolumndata columnlayoutdata public point compute size composite c int w hint int h hint boolean flush if w hint swt default h hint swt default return new point w hint h hint table table table c to avoid recursions table set layout null use native layout algorithm point result table compute size w hint h hint flush table set layout this int width 0 int size columns size for int i 0 i size i column layout data layout data column layout data columns get i if layout data instanceof column pixel data column pixel data col column pixel data layout data width col width if col add trim width column trim else if layout data instanceof column weight data column weight data col column weight data layout data width col minimum width else assert is true false unknown column layout data non nls 1 if width result x result x width return result computesize whint hhint whint hhint whint hhint setlayout computesize whint hhint setlayout columnlayoutdata layoutdata columnlayoutdata layoutdata columnpixeldata columnpixeldata columnpixeldata layoutdata addtrim column_trim layoutdata columnweightdata columnweightdata columnweightdata layoutdata minimumwidth istrue public void layout composite c boolean flush only do initial layout trying to maintain proportions when resizing is too hard causes lots of widget flicker causes scroll bars to appear and occasionally stick around on windows requires hooking column resizing as well and may not be what the user wants anyway if first time return table table table c int width table get client area width xxx layout is being called with an invalid value the first time it is being called on linux this method resets the layout to null so we make sure we run it only when the value is ok if width 1 return table column table columns table get columns int size math min columns size table columns length int widths new int size int fixed width 0 int number of weight columns 0 int total weight 0 first calc space occupied by fixed columns for int i 0 i size i column layout data col column layout data columns get i if col instanceof column pixel data column pixel data cpd column pixel data col int pixels cpd width if cpd add trim pixels column trim widths i pixels fixed width pixels else if col instanceof column weight data column weight data cw column weight data col number of weight columns first time use the weight specified by the column data otherwise use the actual width as the weight int weight first time cw weight table columns i get width int weight cw weight total weight weight else assert is true false unknown column layout data non nls 1 do we have columns that have a weight if number of weight columns 0 now distribute the rest to the columns with weight int rest width fixed width int total distributed 0 for int i 0 i size i column layout data col column layout data columns get i if col instanceof column weight data column weight data cw column weight data col calculate weight as above int weight first time cw weight table columns i get width int weight cw weight int pixels total weight 0 0 weight rest total weight if pixels cw minimum width pixels cw minimum width total distributed pixels widths i pixels distribute any remaining pixels to columns with weight int diff rest total distributed for int i 0 diff 0 i if i size i 0 column layout data col column layout data columns get i if col instanceof column weight data widths i diff system out print width width int total 0 for int i 0 i widths length i system out print widths i total widths i system out println total total first time false for int i 0 i size i table columns i set width widths i firsttime getclientarea tablecolumn tablecolumns getcolumns tablecolumns fixedwidth numberofweightcolumns totalweight columnlayoutdata columnlayoutdata columnpixeldata columnpixeldata columnpixeldata addtrim column_trim fixedwidth columnweightdata columnweightdata columnweightdata numberofweightcolumns firsttime tablecolumns getwidth totalweight istrue numberofweightcolumns fixedwidth totaldistributed columnlayoutdata columnlayoutdata columnweightdata columnweightdata columnweightdata firsttime tablecolumns getwidth totalweight totalweight minimumwidth minimumwidth totaldistributed totaldistributed columnlayoutdata columnlayoutdata columnweightdata firsttime tablecolumns setwidth creates a new table layout public table layout tablelayout adds a new column of data to this table layout param data the column layout data public void add column data column layout data data columns add data addcolumndata columnlayoutdata public point compute size composite c int w hint int h hint boolean flush if w hint swt default h hint swt default return new point w hint h hint table table table c to avoid recursions table set layout null use native layout algorithm point result table compute size w hint h hint flush table set layout this int width 0 int size columns size for int i 0 i size i column layout data layout data column layout data columns get i if layout data instanceof column pixel data column pixel data col column pixel data layout data width col width if col add trim width column trim else if layout data instanceof column weight data column weight data col column weight data layout data width col minimum width else assert is true false unknown column layout data non nls 1 if width result x result x width return result computesize whint hhint whint hhint whint hhint setlayout computesize whint hhint setlayout columnlayoutdata layoutdata columnlayoutdata layoutdata columnpixeldata columnpixeldata columnpixeldata layoutdata addtrim column_trim layoutdata columnweightdata columnweightdata columnweightdata layoutdata minimumwidth istrue public void layout composite c boolean flush only do initial layout trying to maintain proportions when resizing is too hard causes lots of widget flicker causes scroll bars to appear and occasionally stick around on windows requires hooking column resizing as well and may not be what the user wants anyway if first time return table table table c int width table get client area width xxx layout is being called with an invalid value the first time it is being called on linux this method resets the layout to null so we make sure we run it only when the value is ok if width 1 return table column table columns table get columns int size math min columns size table columns length int widths new int size int fixed width 0 int number of weight columns 0 int total weight 0 first calc space occupied by fixed columns for int i 0 i size i column layout data col column layout data columns get i if col instanceof column pixel data column pixel data cpd column pixel data col int pixels cpd width if cpd add trim pixels column trim widths i pixels fixed width pixels else if col instanceof column weight data column weight data cw column weight data col number of weight columns first time use the weight specified by the column data otherwise use the actual width as the weight int weight first time cw weight table columns i get width int weight cw weight total weight weight else assert is true false unknown column layout data non nls 1 do we have columns that have a weight if number of weight columns 0 now distribute the rest to the columns with weight int rest width fixed width int total distributed 0 for int i 0 i size i column layout data col column layout data columns get i if col instanceof column weight data column weight data cw column weight data col calculate weight as above int weight first time cw weight table columns i get width int weight cw weight int pixels total weight 0 0 weight rest total weight if pixels cw minimum width pixels cw minimum width total distributed pixels widths i pixels distribute any remaining pixels to columns with weight int diff rest total distributed for int i 0 diff 0 i if i size i 0 column layout data col column layout data columns get i if col instanceof column weight data widths i diff system out print width width int total 0 for int i 0 i widths length i system out print widths i total widths i system out println total total first time false for int i 0 i size i table columns i set width widths i firsttime getclientarea tablecolumn tablecolumns getcolumns tablecolumns fixedwidth numberofweightcolumns totalweight columnlayoutdata columnlayoutdata columnpixeldata columnpixeldata columnpixeldata addtrim column_trim fixedwidth columnweightdata columnweightdata columnweightdata numberofweightcolumns firsttime tablecolumns getwidth totalweight istrue numberofweightcolumns fixedwidth totaldistributed columnlayoutdata columnlayoutdata columnweightdata columnweightdata columnweightdata firsttime tablecolumns getwidth totalweight totalweight minimumwidth minimumwidth totaldistributed totaldistributed columnlayoutdata columnlayoutdata columnweightdata firsttime tablecolumns setwidth creates a new table layout public table layout tablelayout adds a new column of data to this table layout param data the column layout data public void add column data column layout data data columns add data addcolumndata columnlayoutdata public point compute size composite c int w hint int h hint boolean flush if w hint swt default h hint swt default return new point w hint h hint table table table c to avoid recursions table set layout null use native layout algorithm point result table compute size w hint h hint flush table set layout this int width 0 int size columns size for int i 0 i size i column layout data layout data column layout data columns get i if layout data instanceof column pixel data column pixel data col column pixel data layout data width col width if col add trim width column trim else if layout data instanceof column weight data column weight data col column weight data layout data width col minimum width else assert is true false unknown column layout data non nls 1 if width result x result x width return result computesize whint hhint whint hhint whint hhint setlayout computesize whint hhint setlayout columnlayoutdata layoutdata columnlayoutdata layoutdata columnpixeldata columnpixeldata columnpixeldata layoutdata addtrim column_trim layoutdata columnweightdata columnweightdata columnweightdata layoutdata minimumwidth istrue public void layout composite c boolean flush only do initial layout trying to maintain proportions when resizing is too hard causes lots of widget flicker causes scroll bars to appear and occasionally stick around on windows requires hooking column resizing as well and may not be what the user wants anyway if first time return table table table c int width table get client area width xxx layout is being called with an invalid value the first time it is being called on linux this method resets the layout to null so we make sure we run it only when the value is ok if width 1 return table column table columns table get columns int size math min columns size table columns length int widths new int size int fixed width 0 int number of weight columns 0 int total weight 0 first calc space occupied by fixed columns for int i 0 i size i column layout data col column layout data columns get i if col instanceof column pixel data column pixel data cpd column pixel data col int pixels cpd width if cpd add trim pixels column trim widths i pixels fixed width pixels else if col instanceof column weight data column weight data cw column weight data col number of weight columns first time use the weight specified by the column data otherwise use the actual width as the weight int weight first time cw weight table columns i get width int weight cw weight total weight weight else assert is true false unknown column layout data non nls 1 do we have columns that have a weight if number of weight columns 0 now distribute the rest to the columns with weight int rest width fixed width int total distributed 0 for int i 0 i size i column layout data col column layout data columns get i if col instanceof column weight data column weight data cw column weight data col calculate weight as above int weight first time cw weight table columns i get width int weight cw weight int pixels total weight 0 0 weight rest total weight if pixels cw minimum width pixels cw minimum width total distributed pixels widths i pixels distribute any remaining pixels to columns with weight int diff rest total distributed for int i 0 diff 0 i if i size i 0 column layout data col column layout data columns get i if col instanceof column weight data widths i diff system out print width width int total 0 for int i 0 i widths length i system out print widths i total widths i system out println total total first time false for int i 0 i size i table columns i set width widths i firsttime getclientarea tablecolumn tablecolumns getcolumns tablecolumns fixedwidth numberofweightcolumns totalweight columnlayoutdata columnlayoutdata columnpixeldata columnpixeldata columnpixeldata addtrim column_trim fixedwidth columnweightdata columnweightdata columnweightdata numberofweightcolumns firsttime tablecolumns getwidth totalweight istrue numberofweightcolumns fixedwidth totaldistributed columnlayoutdata columnlayoutdata columnweightdata columnweightdata columnweightdata firsttime tablecolumns getwidth totalweight totalweight minimumwidth minimumwidth totaldistributed totaldistributed columnlayoutdata columnlayoutdata columnweightdata firsttime tablecolumns setwidth creates a new table layout public table layout tablelayout adds a new column of data to this table layout param data the column layout data public void add column data column layout data data columns add data addcolumndata columnlayoutdata public point compute size composite c int w hint int h hint boolean flush if w hint swt default h hint swt default return new point w hint h hint table table table c to avoid recursions table set layout null use native layout algorithm point result table compute size w hint h hint flush table set layout this int width 0 int size columns size for int i 0 i size i column layout data layout data column layout data columns get i if layout data instanceof column pixel data column pixel data col column pixel data layout data width col width if col add trim width column trim else if layout data instanceof column weight data column weight data col column weight data layout data width col minimum width else assert is true false unknown column layout data non nls 1 if width result x result x width return result computesize whint hhint whint hhint whint hhint setlayout computesize whint hhint setlayout columnlayoutdata layoutdata columnlayoutdata layoutdata columnpixeldata columnpixeldata columnpixeldata layoutdata addtrim column_trim layoutdata columnweightdata columnweightdata columnweightdata layoutdata minimumwidth istrue public void layout composite c boolean flush only do initial layout trying to maintain proportions when resizing is too hard causes lots of widget flicker causes scroll bars to appear and occasionally stick around on windows requires hooking column resizing as well and may not be what the user wants anyway if first time return table table table c int width table get client area width xxx layout is being called with an invalid value the first time it is being called on linux this method resets the layout to null so we make sure we run it only when the value is ok if width 1 return table column table columns table get columns int size math min columns size table columns length int widths new int size int fixed width 0 int number of weight columns 0 int total weight 0 first calc space occupied by fixed columns for int i 0 i size i column layout data col column layout data columns get i if col instanceof column pixel data column pixel data cpd column pixel data col int pixels cpd width if cpd add trim pixels column trim widths i pixels fixed width pixels else if col instanceof column weight data column weight data cw column weight data col number of weight columns first time use the weight specified by the column data otherwise use the actual width as the weight int weight first time cw weight table columns i get width int weight cw weight total weight weight else assert is true false unknown column layout data non nls 1 do we have columns that have a weight if number of weight columns 0 now distribute the rest to the columns with weight int rest width fixed width int total distributed 0 for int i 0 i size i column layout data col column layout data columns get i if col instanceof column weight data column weight data cw column weight data col calculate weight as above int weight first time cw weight table columns i get width int weight cw weight int pixels total weight 0 0 weight rest total weight if pixels cw minimum width pixels cw minimum width total distributed pixels widths i pixels distribute any remaining pixels to columns with weight int diff rest total distributed for int i 0 diff 0 i if i size i 0 column layout data col column layout data columns get i if col instanceof column weight data widths i diff system out print width width int total 0 for int i 0 i widths length i system out print widths i total widths i system out println total total first time false for int i 0 i size i table columns i set width widths i firsttime getclientarea tablecolumn tablecolumns getcolumns tablecolumns fixedwidth numberofweightcolumns totalweight columnlayoutdata columnlayoutdata columnpixeldata columnpixeldata columnpixeldata addtrim column_trim fixedwidth columnweightdata columnweightdata columnweightdata numberofweightcolumns firsttime tablecolumns getwidth totalweight istrue numberofweightcolumns fixedwidth totaldistributed columnlayoutdata columnlayoutdata columnweightdata columnweightdata columnweightdata firsttime tablecolumns getwidth totalweight totalweight minimumwidth minimumwidth totaldistributed totaldistributed columnlayoutdata columnlayoutdata columnweightdata firsttime tablecolumns setwidth creates a new table layout public table layout tablelayout adds a new column of data to this table layout param data the column layout data public void add column data column layout data data columns add data addcolumndata columnlayoutdata public point compute size composite c int w hint int h hint boolean flush if w hint swt default h hint swt default return new point w hint h hint table table table c to avoid recursions table set layout null use native layout algorithm point result table compute size w hint h hint flush table set layout this int width 0 int size columns size for int i 0 i size i column layout data layout data column layout data columns get i if layout data instanceof column pixel data column pixel data col column pixel data layout data width col width if col add trim width column trim else if layout data instanceof column weight data column weight data col column weight data layout data width col minimum width else assert is true false unknown column layout data non nls 1 if width result x result x width return result computesize whint hhint whint hhint whint hhint setlayout computesize whint hhint setlayout columnlayoutdata layoutdata columnlayoutdata layoutdata columnpixeldata columnpixeldata columnpixeldata layoutdata addtrim column_trim layoutdata columnweightdata columnweightdata columnweightdata layoutdata minimumwidth istrue public void layout composite c boolean flush only do initial layout trying to maintain proportions when resizing is too hard causes lots of widget flicker causes scroll bars to appear and occasionally stick around on windows requires hooking column resizing as well and may not be what the user wants anyway if first time return table table table c int width table get client area width xxx layout is being called with an invalid value the first time it is being called on linux this method resets the layout to null so we make sure we run it only when the value is ok if width 1 return table column table columns table get columns int size math min columns size table columns length int widths new int size int fixed width 0 int number of weight columns 0 int total weight 0 first calc space occupied by fixed columns for int i 0 i size i column layout data col column layout data columns get i if col instanceof column pixel data column pixel data cpd column pixel data col int pixels cpd width if cpd add trim pixels column trim widths i pixels fixed width pixels else if col instanceof column weight data column weight data cw column weight data col number of weight columns first time use the weight specified by the column data otherwise use the actual width as the weight int weight first time cw weight table columns i get width int weight cw weight total weight weight else assert is true false unknown column layout data non nls 1 do we have columns that have a weight if number of weight columns 0 now distribute the rest to the columns with weight int rest width fixed width int total distributed 0 for int i 0 i size i column layout data col column layout data columns get i if col instanceof column weight data column weight data cw column weight data col calculate weight as above int weight first time cw weight table columns i get width int weight cw weight int pixels total weight 0 0 weight rest total weight if pixels cw minimum width pixels cw minimum width total distributed pixels widths i pixels distribute any remaining pixels to columns with weight int diff rest total distributed for int i 0 diff 0 i if i size i 0 column layout data col column layout data columns get i if col instanceof column weight data widths i diff system out print width width int total 0 for int i 0 i widths length i system out print widths i total widths i system out println total total first time false for int i 0 i size i table columns i set width widths i firsttime getclientarea tablecolumn tablecolumns getcolumns tablecolumns fixedwidth numberofweightcolumns totalweight columnlayoutdata columnlayoutdata columnpixeldata columnpixeldata columnpixeldata addtrim column_trim fixedwidth columnweightdata columnweightdata columnweightdata numberofweightcolumns firsttime tablecolumns getwidth totalweight istrue numberofweightcolumns fixedwidth totaldistributed columnlayoutdata columnlayoutdata columnweightdata columnweightdata columnweightdata firsttime tablecolumns getwidth totalweight totalweight minimumwidth minimumwidth totaldistributed totaldistributed columnlayoutdata columnlayoutdata columnweightdata firsttime tablecolumns setwidth creates a new table layout public table layout tablelayout adds a new column of data to this table layout param data the column layout data public void add column data column layout data data columns add data addcolumndata columnlayoutdata public point compute size composite c int w hint int h hint boolean flush if w hint swt default h hint swt default return new point w hint h hint table table table c to avoid recursions table set layout null use native layout algorithm point result table compute size w hint h hint flush table set layout this int width 0 int size columns size for int i 0 i size i column layout data layout data column layout data columns get i if layout data instanceof column pixel data column pixel data col column pixel data layout data width col width if col add trim width column trim else if layout data instanceof column weight data column weight data col column weight data layout data width col minimum width else assert is true false unknown column layout data non nls 1 if width result x result x width return result computesize whint hhint whint hhint whint hhint setlayout computesize whint hhint setlayout columnlayoutdata layoutdata columnlayoutdata layoutdata columnpixeldata columnpixeldata columnpixeldata layoutdata addtrim column_trim layoutdata columnweightdata columnweightdata columnweightdata layoutdata minimumwidth istrue public void layout composite c boolean flush only do initial layout trying to maintain proportions when resizing is too hard causes lots of widget flicker causes scroll bars to appear and occasionally stick around on windows requires hooking column resizing as well and may not be what the user wants anyway if first time return table table table c int width table get client area width xxx layout is being called with an invalid value the first time it is being called on linux this method resets the layout to null so we make sure we run it only when the value is ok if width 1 return table column table columns table get columns int size math min columns size table columns length int widths new int size int fixed width 0 int number of weight columns 0 int total weight 0 first calc space occupied by fixed columns for int i 0 i size i column layout data col column layout data columns get i if col instanceof column pixel data column pixel data cpd column pixel data col int pixels cpd width if cpd add trim pixels column trim widths i pixels fixed width pixels else if col instanceof column weight data column weight data cw column weight data col number of weight columns first time use the weight specified by the column data otherwise use the actual width as the weight int weight first time cw weight table columns i get width int weight cw weight total weight weight else assert is true false unknown column layout data non nls 1 do we have columns that have a weight if number of weight columns 0 now distribute the rest to the columns with weight int rest width fixed width int total distributed 0 for int i 0 i size i column layout data col column layout data columns get i if col instanceof column weight data column weight data cw column weight data col calculate weight as above int weight first time cw weight table columns i get width int weight cw weight int pixels total weight 0 0 weight rest total weight if pixels cw minimum width pixels cw minimum width total distributed pixels widths i pixels distribute any remaining pixels to columns with weight int diff rest total distributed for int i 0 diff 0 i if i size i 0 column layout data col column layout data columns get i if col instanceof column weight data widths i diff system out print width width int total 0 for int i 0 i widths length i system out print widths i total widths i system out println total total first time false for int i 0 i size i table columns i set width widths i firsttime getclientarea tablecolumn tablecolumns getcolumns tablecolumns fixedwidth numberofweightcolumns totalweight columnlayoutdata columnlayoutdata columnpixeldata columnpixeldata columnpixeldata addtrim column_trim fixedwidth columnweightdata columnweightdata columnweightdata numberofweightcolumns firsttime tablecolumns getwidth totalweight istrue numberofweightcolumns fixedwidth totaldistributed columnlayoutdata columnlayoutdata columnweightdata columnweightdata columnweightdata firsttime tablecolumns getwidth totalweight totalweight minimumwidth minimumwidth totaldistributed totaldistributed columnlayoutdata columnlayoutdata columnweightdata firsttime tablecolumns setwidth creates a new table layout public table layout tablelayout adds a new column of data to this table layout param data the column layout data public void add column data column layout data data columns add data addcolumndata columnlayoutdata public point compute size composite c int w hint int h hint boolean flush if w hint swt default h hint swt default return new point w hint h hint table table table c to avoid recursions table set layout null use native layout algorithm point result table compute size w hint h hint flush table set layout this int width 0 int size columns size for int i 0 i size i column layout data layout data column layout data columns get i if layout data instanceof column pixel data column pixel data col column pixel data layout data width col width if col add trim width column trim else if layout data instanceof column weight data column weight data col column weight data layout data width col minimum width else assert is true false unknown column layout data non nls 1 if width result x result x width return result computesize whint hhint whint hhint whint hhint setlayout computesize whint hhint setlayout columnlayoutdata layoutdata columnlayoutdata layoutdata columnpixeldata columnpixeldata columnpixeldata layoutdata addtrim column_trim layoutdata columnweightdata columnweightdata columnweightdata layoutdata minimumwidth istrue public void layout composite c boolean flush only do initial layout trying to maintain proportions when resizing is too hard causes lots of widget flicker causes scroll bars to appear and occasionally stick around on windows requires hooking column resizing as well and may not be what the user wants anyway if first time return table table table c int width table get client area width xxx layout is being called with an invalid value the first time it is being called on linux this method resets the layout to null so we make sure we run it only when the value is ok if width 1 return table column table columns table get columns int size math min columns size table columns length int widths new int size int fixed width 0 int number of weight columns 0 int total weight 0 first calc space occupied by fixed columns for int i 0 i size i column layout data col column layout data columns get i if col instanceof column pixel data column pixel data cpd column pixel data col int pixels cpd width if cpd add trim pixels column trim widths i pixels fixed width pixels else if col instanceof column weight data column weight data cw column weight data col number of weight columns first time use the weight specified by the column data otherwise use the actual width as the weight int weight first time cw weight table columns i get width int weight cw weight total weight weight else assert is true false unknown column layout data non nls 1 do we have columns that have a weight if number of weight columns 0 now distribute the rest to the columns with weight int rest width fixed width int total distributed 0 for int i 0 i size i column layout data col column layout data columns get i if col instanceof column weight data column weight data cw column weight data col calculate weight as above int weight first time cw weight table columns i get width int weight cw weight int pixels total weight 0 0 weight rest total weight if pixels cw minimum width pixels cw minimum width total distributed pixels widths i pixels distribute any remaining pixels to columns with weight int diff rest total distributed for int i 0 diff 0 i if i size i 0 column layout data col column layout data columns get i if col instanceof column weight data widths i diff system out print width width int total 0 for int i 0 i widths length i system out print widths i total widths i system out println total total first time false for int i 0 i size i table columns i set width widths i firsttime getclientarea tablecolumn tablecolumns getcolumns tablecolumns fixedwidth numberofweightcolumns totalweight columnlayoutdata columnlayoutdata columnpixeldata columnpixeldata columnpixeldata addtrim column_trim fixedwidth columnweightdata columnweightdata columnweightdata numberofweightcolumns firsttime tablecolumns getwidth totalweight istrue numberofweightcolumns fixedwidth totaldistributed columnlayoutdata columnlayoutdata columnweightdata columnweightdata columnweightdata firsttime tablecolumns getwidth totalweight totalweight minimumwidth minimumwidth totaldistributed totaldistributed columnlayoutdata columnlayoutdata columnweightdata firsttime tablecolumns setwidth creates a new table layout public table layout tablelayout adds a new column of data to this table layout param data the column layout data public void add column data column layout data data columns add data addcolumndata columnlayoutdata public point compute size composite c int w hint int h hint boolean flush if w hint swt default h hint swt default return new point w hint h hint table table table c to avoid recursions table set layout null use native layout algorithm point result table compute size w hint h hint flush table set layout this int width 0 int size columns size for int i 0 i size i column layout data layout data column layout data columns get i if layout data instanceof column pixel data column pixel data col column pixel data layout data width col width if col add trim width column trim else if layout data instanceof column weight data column weight data col column weight data layout data width col minimum width else assert is true false unknown column layout data non nls 1 if width result x result x width return result computesize whint hhint whint hhint whint hhint setlayout computesize whint hhint setlayout columnlayoutdata layoutdata columnlayoutdata layoutdata columnpixeldata columnpixeldata columnpixeldata layoutdata addtrim column_trim layoutdata columnweightdata columnweightdata columnweightdata layoutdata minimumwidth istrue public void layout composite c boolean flush only do initial layout trying to maintain proportions when resizing is too hard causes lots of widget flicker causes scroll bars to appear and occasionally stick around on windows requires hooking column resizing as well and may not be what the user wants anyway if first time return table table table c int width table get client area width xxx layout is being called with an invalid value the first time it is being called on linux this method resets the layout to null so we make sure we run it only when the value is ok if width 1 return table column table columns table get columns int size math min columns size table columns length int widths new int size int fixed width 0 int number of weight columns 0 int total weight 0 first calc space occupied by fixed columns for int i 0 i size i column layout data col column layout data columns get i if col instanceof column pixel data column pixel data cpd column pixel data col int pixels cpd width if cpd add trim pixels column trim widths i pixels fixed width pixels else if col instanceof column weight data column weight data cw column weight data col number of weight columns first time use the weight specified by the column data otherwise use the actual width as the weight int weight first time cw weight table columns i get width int weight cw weight total weight weight else assert is true false unknown column layout data non nls 1 do we have columns that have a weight if number of weight columns 0 now distribute the rest to the columns with weight int rest width fixed width int total distributed 0 for int i 0 i size i column layout data col column layout data columns get i if col instanceof column weight data column weight data cw column weight data col calculate weight as above int weight first time cw weight table columns i get width int weight cw weight int pixels total weight 0 0 weight rest total weight if pixels cw minimum width pixels cw minimum width total distributed pixels widths i pixels distribute any remaining pixels to columns with weight int diff rest total distributed for int i 0 diff 0 i if i size i 0 column layout data col column layout data columns get i if col instanceof column weight data widths i diff system out print width width int total 0 for int i 0 i widths length i system out print widths i total widths i system out println total total first time false for int i 0 i size i table columns i set width widths i firsttime getclientarea tablecolumn tablecolumns getcolumns tablecolumns fixedwidth numberofweightcolumns totalweight columnlayoutdata columnlayoutdata columnpixeldata columnpixeldata columnpixeldata addtrim column_trim fixedwidth columnweightdata columnweightdata columnweightdata numberofweightcolumns firsttime tablecolumns getwidth totalweight istrue numberofweightcolumns fixedwidth totaldistributed columnlayoutdata columnlayoutdata columnweightdata columnweightdata columnweightdata firsttime tablecolumns getwidth totalweight totalweight minimumwidth minimumwidth totaldistributed totaldistributed columnlayoutdata columnlayoutdata columnweightdata firsttime tablecolumns setwidth creates a new table layout public table layout tablelayout adds a new column of data to this table layout param data the column layout data public void add column data column layout data data columns add data addcolumndata columnlayoutdata public point compute size composite c int w hint int h hint boolean flush if w hint swt default h hint swt default return new point w hint h hint table table table c to avoid recursions table set layout null use native layout algorithm point result table compute size w hint h hint flush table set layout this int width 0 int size columns size for int i 0 i size i column layout data layout data column layout data columns get i if layout data instanceof column pixel data column pixel data col column pixel data layout data width col width if col add trim width column trim else if layout data instanceof column weight data column weight data col column weight data layout data width col minimum width else assert is true false unknown column layout data non nls 1 if width result x result x width return result computesize whint hhint whint hhint whint hhint setlayout computesize whint hhint setlayout columnlayoutdata layoutdata columnlayoutdata layoutdata columnpixeldata columnpixeldata columnpixeldata layoutdata addtrim column_trim layoutdata columnweightdata columnweightdata columnweightdata layoutdata minimumwidth istrue public void layout composite c boolean flush only do initial layout trying to maintain proportions when resizing is too hard causes lots of widget flicker causes scroll bars to appear and occasionally stick around on windows requires hooking column resizing as well and may not be what the user wants anyway if first time return table table table c int width table get client area width xxx layout is being called with an invalid value the first time it is being called on linux this method resets the layout to null so we make sure we run it only when the value is ok if width 1 return table column table columns table get columns int size math min columns size table columns length int widths new int size int fixed width 0 int number of weight columns 0 int total weight 0 first calc space occupied by fixed columns for int i 0 i size i column layout data col column layout data columns get i if col instanceof column pixel data column pixel data cpd column pixel data col int pixels cpd width if cpd add trim pixels column trim widths i pixels fixed width pixels else if col instanceof column weight data column weight data cw column weight data col number of weight columns first time use the weight specified by the column data otherwise use the actual width as the weight int weight first time cw weight table columns i get width int weight cw weight total weight weight else assert is true false unknown column layout data non nls 1 do we have columns that have a weight if number of weight columns 0 now distribute the rest to the columns with weight int rest width fixed width int total distributed 0 for int i 0 i size i column layout data col column layout data columns get i if col instanceof column weight data column weight data cw column weight data col calculate weight as above int weight first time cw weight table columns i get width int weight cw weight int pixels total weight 0 0 weight rest total weight if pixels cw minimum width pixels cw minimum width total distributed pixels widths i pixels distribute any remaining pixels to columns with weight int diff rest total distributed for int i 0 diff 0 i if i size i 0 column layout data col column layout data columns get i if col instanceof column weight data widths i diff system out print width width int total 0 for int i 0 i widths length i system out print widths i total widths i system out println total total first time false for int i 0 i size i table columns i set width widths i firsttime getclientarea tablecolumn tablecolumns getcolumns tablecolumns fixedwidth numberofweightcolumns totalweight columnlayoutdata columnlayoutdata columnpixeldata columnpixeldata columnpixeldata addtrim column_trim fixedwidth columnweightdata columnweightdata columnweightdata numberofweightcolumns firsttime tablecolumns getwidth totalweight istrue numberofweightcolumns fixedwidth totaldistributed columnlayoutdata columnlayoutdata columnweightdata columnweightdata columnweightdata firsttime tablecolumns getwidth totalweight totalweight minimumwidth minimumwidth totaldistributed totaldistributed columnlayoutdata columnlayoutdata columnweightdata firsttime tablecolumns setwidth creates a new table layout public table layout tablelayout adds a new column of data to this table layout param data the column layout data public void add column data column layout data data columns add data addcolumndata columnlayoutdata public point compute size composite c int w hint int h hint boolean flush if w hint swt default h hint swt default return new point w hint h hint table table table c to avoid recursions table set layout null use native layout algorithm point result table compute size w hint h hint flush table set layout this int width 0 int size columns size for int i 0 i size i column layout data layout data column layout data columns get i if layout data instanceof column pixel data column pixel data col column pixel data layout data width col width if col add trim width column trim else if layout data instanceof column weight data column weight data col column weight data layout data width col minimum width else assert is true false unknown column layout data non nls 1 if width result x result x width return result computesize whint hhint whint hhint whint hhint setlayout computesize whint hhint setlayout columnlayoutdata layoutdata columnlayoutdata layoutdata columnpixeldata columnpixeldata columnpixeldata layoutdata addtrim column_trim layoutdata columnweightdata columnweightdata columnweightdata layoutdata minimumwidth istrue public void layout composite c boolean flush only do initial layout trying to maintain proportions when resizing is too hard causes lots of widget flicker causes scroll bars to appear and occasionally stick around on windows requires hooking column resizing as well and may not be what the user wants anyway if first time return table table table c int width table get client area width xxx layout is being called with an invalid value the first time it is being called on linux this method resets the layout to null so we make sure we run it only when the value is ok if width 1 return table column table columns table get columns int size math min columns size table columns length int widths new int size int fixed width 0 int number of weight columns 0 int total weight 0 first calc space occupied by fixed columns for int i 0 i size i column layout data col column layout data columns get i if col instanceof column pixel data column pixel data cpd column pixel data col int pixels cpd width if cpd add trim pixels column trim widths i pixels fixed width pixels else if col instanceof column weight data column weight data cw column weight data col number of weight columns first time use the weight specified by the column data otherwise use the actual width as the weight int weight first time cw weight table columns i get width int weight cw weight total weight weight else assert is true false unknown column layout data non nls 1 do we have columns that have a weight if number of weight columns 0 now distribute the rest to the columns with weight int rest width fixed width int total distributed 0 for int i 0 i size i column layout data col column layout data columns get i if col instanceof column weight data column weight data cw column weight data col calculate weight as above int weight first time cw weight table columns i get width int weight cw weight int pixels total weight 0 0 weight rest total weight if pixels cw minimum width pixels cw minimum width total distributed pixels widths i pixels distribute any remaining pixels to columns with weight int diff rest total distributed for int i 0 diff 0 i if i size i 0 column layout data col column layout data columns get i if col instanceof column weight data widths i diff system out print width width int total 0 for int i 0 i widths length i system out print widths i total widths i system out println total total first time false for int i 0 i size i table columns i set width widths i firsttime getclientarea tablecolumn tablecolumns getcolumns tablecolumns fixedwidth numberofweightcolumns totalweight columnlayoutdata columnlayoutdata columnpixeldata columnpixeldata columnpixeldata addtrim column_trim fixedwidth columnweightdata columnweightdata columnweightdata numberofweightcolumns firsttime tablecolumns getwidth totalweight istrue numberofweightcolumns fixedwidth totaldistributed columnlayoutdata columnlayoutdata columnweightdata columnweightdata columnweightdata firsttime tablecolumns getwidth totalweight totalweight minimumwidth minimumwidth totaldistributed totaldistributed columnlayoutdata columnlayoutdata columnweightdata firsttime tablecolumns setwidth protected point compute size composite composite int w hint int h hint boolean flush cache if h hint swt default return new point w hint h hint control children composite get children int h 0 int size children length for int i 0 i size i h math max h children i compute size swt default swt default y return new point w hint h margin 2 computesize whint hhint flushcache hhint whint hhint getchildren computesize whint protected void layout composite composite boolean flush cache control children composite get children rectangle r composite get client area int size children length point sizes new point size for int i 0 i size i sizes i children i compute size swt default swt default int h r height margin 2 put busy icon at right with a little extra spacing int busy size 1 children busy set bounds r x r width margin sizes busy x r y margin h sizes busy y 2 sizes busy x sizes busy y find combo int combo 1 int tw r width margin 2 size 1 spacing sizes size 1 x extra busy spacing for int i 0 i size 1 i if children i instanceof combo combo i else tw sizes i x if combo 0 sizes combo x tw space out other children with their standard size give combo all remaining space if it exists int x margin for int i 0 i size 1 i children i set bounds r x x r y margin h sizes i y 2 sizes i x sizes i y x spacing sizes i x flushcache getchildren getclientarea computesize setbounds extra_busy_spacing setbounds creates the new instance param parent the parent composite param style the style to use public fallback scrolled composite composite parent int style super parent style add listener swt resize new listener public void handle event event e reflow true set expand vertical true set expand horizontal true initialize scroll bars fallbackscrolledcomposite addlistener handleevent setexpandvertical setexpandhorizontal initializescrollbars super parent style add listener swt resize new listener public void handle event event e reflow true addlistener handleevent sets the foreground of the control and its content param fg the new foreground color public void set foreground color fg super set foreground fg if get content null get content set foreground fg setforeground setforeground getcontent getcontent setforeground sets the background of the control and its content param bg the new background color public void set background color bg super set background bg if get content null get content set background bg setbackground setbackground getcontent getcontent setbackground sets the font of the form this font will be used to render the title text it will not affect the body public void set font font font super set font font if get content null get content set font font setfont setfont getcontent getcontent setfont overrides super to pass the proper colors and font public void set content control content super set content content if content null content set foreground get foreground content set background get background content set font get font setcontent setcontent setforeground getforeground setbackground getbackground setfont getfont if content is set transfers focus to the content public boolean set focus if get content null return get content set focus return super set focus setfocus getcontent getcontent setfocus setfocus recomputes the body layout and the scroll bars the method should be used when changes somewhere in the form body invalidate the current layout and or scroll bars param flush cache if code true code drop the cached data public void reflow boolean flush cache composite c composite get content rectangle client area get client area if c null return point new size c compute size client area width swt default flush cache set min size new size update page increment layout flush cache flushcache flushcache getcontent clientarea getclientarea newsize computesize clientarea flushcache setminsize newsize updatepageincrement flushcache private void update page increment scroll bar vbar get vertical bar if vbar null rectangle client area get client area int increment client area height 5 vbar set page increment increment updatepageincrement scrollbar getverticalbar clientarea getclientarea clientarea setpageincrement private void initialize scroll bars scroll bar hbar get horizontal bar if hbar null hbar set increment h scroll increment scroll bar vbar get vertical bar if vbar null vbar set increment v scroll increment update page increment initializescrollbars scrollbar gethorizontalbar setincrement h_scroll_increment scrollbar getverticalbar setincrement v_scroll_increment updatepageincrement private int last valid operation dnd drop none protected web browser view drop adapter browser viewer view this view view lastvalidoperation drop_none webbrowserviewdropadapter browserviewer private void do drop validation drop target event event update last valid operation if event detail dnd drop none last valid operation event detail valid drop and set event detail accordingly if validate drop event detail event current data type current operation last valid operation else current operation dnd drop none event detail current operation dodropvalidation droptargetevent drop_none lastvalidoperation validatedrop currentdatatype currentoperation lastvalidoperation currentoperation drop_none currentoperation should still be enabled public void drag operation changed drop target event event do drop validation event dragoperationchanged droptargetevent dodropvalidation public void drag over drop target event event set the location feedback event feedback dnd feedback select see if anything has really changed before doing validation do drop validation event dragover droptargetevent feedback_select dodropvalidation public void drop drop target event event perform the drop behaviour if perform drop event data event detail dnd drop none current operation event detail droptargetevent performdrop drop_none currentoperation last chance for the action to disable itself public void drop accept drop target event event if validate drop event detail event current data type event detail dnd drop none dropaccept droptargetevent validatedrop currentdatatype drop_none public void drag enter drop target event event if event detail dnd drop default event detail dnd drop copy do drop validation event dragenter droptargetevent drop_default drop_copy dodropvalidation performs any work associated with the drop p subclasses must implement this method to provide drop behavior p param data the drop data return code true code if the drop was successful and code false code otherwise protected boolean perform drop object data if data instanceof string string s string data if s null s length 0 return true file f new file s 0 try view seturl f tourl to external form catch exception e todo return true performdrop toexternalform validates dropping on the given object this method is called whenever some aspect of the drop operation changes p subclasses must implement this method to define which drops make sense p param target the object that the mouse is currently hovering over or code null code if the mouse is hovering over empty space param operation the current drag operation copy move etc param transfer type the current transfer type return code true code if the drop is valid and code false code otherwise protected boolean validate drop int operation transfer data transfer type if file transfer get instance is supported type transfer type return true if resource transfer get instance is supported type transfer type return true if local selection transfer get instance is supported type transfer type return true return false transfertype validatedrop transferdata transfertype filetransfer getinstance issupportedtype transfertype resourcetransfer getinstance issupportedtype transfertype localselectiontransfer getinstance issupportedtype transfertype creates a new property change event param source the object whose property has changed param property the property that has changed must not be code null code param old value the old value of the property or code null code if none param new value the new value of the property or code null code if none protected property change event object source string property object old value object new value super source if property null throw new illegal argument exception this property name property this old value old value this new value new value oldvalue newvalue propertychangeevent oldvalue newvalue illegalargumentexception propertyname oldvalue oldvalue newvalue newvalue returns the name of the property that changed p warning there is no guarantee that the property name returned is a constant string callers must compare property names using code equals code not p return the name of the property that changed public string get property return property name getproperty propertyname returns the new value of the property return the new value or code null code if not known or not relevant public object get new value return new value getnewvalue newvalue returns the old value of the property return the old value or code null code if not known or not relevant public object get old value return old value getoldvalue oldvalue notification that a property has changed p this method gets called when the observed object fires a property change event p param event the property change event object describing which property changed and how exports all non default valued preferences for all installed plugins to the provided file if a file already exists at the given location it will be deleted if there are no preferences to export no file will be written p the file that is written can be read later using the import preferences method p param path the absolute file system path of the file to export preferences to exception core exception if this method fails reasons include ul li the file could not be written li ul see import preferences i path see validate preference versions i path public static void export preferences i path path throws core exception file file path to file if file exists file delete file get parent file mkdirs i preferences service service platform get preferences service output stream output null file output stream fos null try fos new file output stream file output new buffered output stream fos i eclipse preferences node i eclipse preferences service get root node node plugin plugin preference scope service export preferences node output string null output flush fos getfd sync catch io exception e string message nls bind messages preferences errorwriting file e get message i status status new status i status error platform pi runtime i status error message e throw new core exception status finally if output null try output close catch io exception e ignore importpreferences coreexception importpreferences ipath validatepreferenceversions ipath exportpreferences ipath coreexception tofile getparentfile ipreferencesservice getpreferencesservice outputstream fileoutputstream fileoutputstream bufferedoutputstream ieclipsepreferences ieclipsepreferences getrootnode plugin_preference_scope exportpreferences ioexception preferences_errorwriting getmessage istatus istatus pi_runtime istatus coreexception ioexception loads the plugin preferences from the given file and replaces all non default valued preferences for all plugins with the values from this file p if the file contains preferences for plug ins that don t exist in the current install they are ignored this method does not validate if the plug in versions in the preference file match the currently installed plug ins clients should first call validate preference versions on the file to ensure that the versions are compatible p p the file must have been written by the export preferences method p param path the absolute file system path of the file to import preferences from exception core exception if this method fails reasons include ul li the file does not exist li li the file could not be read li ul see export preferences i path see validate preference versions i path public static void import preferences i path path throws core exception if path to file exists string msg nls bind messages preferences filenotfound path toos string throw new core exception new status i status error platform pi runtime 1 msg null i preferences service service platform get preferences service input stream input null try input new buffered input stream new file input stream path to file service import preferences input catch file not found exception e string msg nls bind messages preferences filenotfound path toos string throw new core exception new status i status error platform pi runtime 1 msg e finally if input null try input close catch io exception e ignore validatepreferenceversions exportpreferences coreexception exportpreferences ipath validatepreferenceversions ipath importpreferences ipath coreexception tofile preferences_filenotfound toosstring coreexception istatus pi_runtime ipreferencesservice getpreferencesservice inputstream bufferedinputstream fileinputstream tofile importpreferences filenotfoundexception preferences_filenotfound toosstring coreexception istatus pi_runtime ioexception validates that the preference versions in the given file match the versions of the currently installed plugins returns an ok status if all preferences match the currently installed plugins otherwise a multi status describing what plugins have preferences that don t match p if the returned status has a code i status warning code severity it means that some preferences may not be applicable but for the most part they will be compatible if the returned status has a code i status error code severity it means that the preferences will probably not be compatible p if the file contains preferences for plug ins that don t exist in the current install they are ignored p p the file must have been written by the export preferences method p param file the absolute file system path of the preference file to validate see export preferences i path see import preferences i path public static i status validate preference versions i path file preferences service service preferences service platform get preferences service return service validate versions file multistatus istatus istatus exportpreferences exportpreferences ipath importpreferences ipath istatus validatepreferenceversions ipath preferencesservice preferencesservice getpreferencesservice validateversions creates an empty preference table p use the methods code load input stream code and code store input stream code to load and store these preferences p see load input stream see store output stream string public preferences default properties new properties properties new properties default properties inputstream inputstream inputstream outputstream defaultproperties defaultproperties adds a property change listener to this preference object has no affect if the identical listener is already registered p em note em depending on the means in which the property values changed the old and new values for the property can be either typed a string representation of the value or code null code clients who wish to behave properly in all cases should all three cases in their implementation of the property change listener p param listener a property change listener public void add property change listener i property change listener listener listeners add listener addpropertychangelistener ipropertychangelistener removes the given listener from this preference object has no affect if the listener is not registered param listener a property change listener public void remove property change listener i property change listener listener listeners remove listener removepropertychangelistener ipropertychangelistener returns whether the given property is known to this preference object either by having an explicit setting or by having a default setting returns code false code if the given name is code null code param name the name of the property or code null code return code true code if either a current value or a default value is known for the named property and code false code otherwise public boolean contains string name return properties contains key name default properties contains key name containskey defaultproperties containskey fires a property change event corresponding to a change to the current value of the property with the given name param name the name of the property to be used as the property in the event object param old value the old value or code null code if not known or not relevant param new value the new value or code null code if not known or not relevant protected void fire property change event string name object old value object new value if name null throw new illegal argument exception object change listeners this listeners get listeners do we even need to fire an event if change listeners length 0 return final property change event pe new property change event this name old value new value for int i 0 i change listeners length i final i property change listener l i property change listener change listeners i i safe runnable job new i safe runnable public void handle exception throwable exception already being logged in platform run public void run throws exception l property change pe platform run job oldvalue newvalue firepropertychangeevent oldvalue newvalue illegalargumentexception changelisteners getlisteners changelisteners propertychangeevent propertychangeevent oldvalue newvalue changelisteners ipropertychangelistener ipropertychangelistener changelisteners isaferunnable isaferunnable handleexception propertychange final i property change listener l i property change listener change listeners i i safe runnable job new i safe runnable public void handle exception throwable exception already being logged in platform run ipropertychangelistener ipropertychangelistener changelisteners isaferunnable isaferunnable handleexception public void run throws exception l property change pe propertychange returns the current value of the boolean valued property with the given name returns the default default value code false code if there is no property with the given name or if the current value cannot be treated as a boolean the given name must not be code null code param name the name of the property return the boolean valued property public boolean get boolean string name string value properties get property name if value null return boolean default default return value equals preferences true getboolean getproperty boolean_default_default sets the current value of the boolean valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name boolean value boolean default value get default boolean name boolean old value get boolean name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name value preferences true preferences false if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name old value boolean true boolean false value boolean true boolean false settodefault setvalue defaultvalue getdefaultboolean oldvalue getboolean defaultvalue oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the boolean valued property with the given name returns the default default value code false code if there is no default property with the given name or if the default value cannot be treated as a boolean the given name must not be code null code param name the name of the property return the default value of the named property public boolean get default boolean string name string value default properties get property name if value null return boolean default default return value equals preferences true getdefaultboolean defaultproperties getproperty boolean_default_default sets the default value for the boolean valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name boolean value default properties put name value preferences true preferences false setdefault defaultproperties returns the current value of the double valued property with the given name returns the default default value code 0 0 code if there is no property with the given name or if the current value cannot be treated as a double the given name must not be code null code param name the name of the property return the double valued property public double get double string name return convert to double properties get property name double default default getdouble converttodouble getproperty double_default_default sets the current value of the double valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property must be a number not a nan public void set value string name double value if double is nan value throw new illegal argument exception double default value get default double name double old value get double name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name double to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new double old value new double value settodefault setvalue isnan illegalargumentexception defaultvalue getdefaultdouble oldvalue getdouble defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the double valued property with the given name returns the default default value code 0 0 code if there is no default property with the given name or if the default value cannot be treated as a double the given name must not be code null code param name the name of the property return the default value of the named property public double get default double string name return convert to double default properties get property name double default default getdefaultdouble converttodouble defaultproperties getproperty double_default_default sets the default value for the double valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property must be a number not a nan public void set default string name double value if double is nan value throw new illegal argument exception default properties put name double to string value setdefault isnan illegalargumentexception defaultproperties tostring converts the given raw property value string to a double param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to a double or the given code default value code if the raw value is code null code or cannot be parsed as a double private double convert to double string raw property value double default value double result default value if raw property value null try result double parse double raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttodouble rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parsedouble rawpropertyvalue numberformatexception returns the current value of the float valued property with the given name returns the default default value code 0 0f code if there is no property with the given name or if the current value cannot be treated as a float the given name must not be code null code param name the name of the property return the float valued property public float get float string name return convert to float properties get property name float default default getfloat converttofloat getproperty float_default_default sets the current value of the float valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property must be a number not a nan public void set value string name float value if float is nan value throw new illegal argument exception float default value get default float name float old value get float name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name float to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new float old value new float value settodefault setvalue isnan illegalargumentexception defaultvalue getdefaultfloat oldvalue getfloat defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the float valued property with the given name returns the default default value code 0 0f code if there is no default property with the given name or if the default value cannot be treated as a float the given name must not be code null code param name the name of the property return the default value of the named property public float get default float string name return convert to float default properties get property name float default default getdefaultfloat converttofloat defaultproperties getproperty float_default_default sets the default value for the float valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property must be a number not a nan public void set default string name float value if float is nan value throw new illegal argument exception default properties put name float to string value setdefault isnan illegalargumentexception defaultproperties tostring converts the given raw property value string to a float param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to a float or the given code default value code if the raw value is code null code or cannot be parsed as a float private float convert to float string raw property value float default value float result default value if raw property value null try result float parse float raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttofloat rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parsefloat rawpropertyvalue numberformatexception returns the current value of the integer valued property with the given name returns the default default value code 0 code if there is no property with the given name or if the current value cannot be treated as an integer the given name must not be code null code param name the name of the property return the int valued property public int get int string name return convert to int properties get property name int default default getint converttoint getproperty int_default_default sets the current value of the integer valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name int value int default value get default int name int old value get int name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name integer to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new integer old value new integer value settodefault setvalue defaultvalue getdefaultint oldvalue getint defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the integer valued property with the given name returns the default default value code 0 code if there is no default property with the given name or if the default value cannot be treated as an integer the given name must not be code null code param name the name of the property return the default value of the named property public int get default int string name return convert to int default properties get property name int default default getdefaultint converttoint defaultproperties getproperty int_default_default sets the default value for the integer valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name int value default properties put name integer to string value setdefault defaultproperties tostring converts the given raw property value string to an int param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to an int or the given code default value code if the raw value is code null code or cannot be parsed as an int private int convert to int string raw property value int default value int result default value if raw property value null try result integer parse int raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttoint rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parseint rawpropertyvalue numberformatexception returns the current value of the long valued property with the given name returns the default default value code 0l code if there is no property with the given name or if the current value cannot be treated as a long the given name must not be code null code param name the name of the property return the long valued property public long get long string name return convert to long properties get property name long default default getlong converttolong getproperty long_default_default sets the current value of the long valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name long value long default value get default long name long old value get long name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name long to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new long old value new long value settodefault setvalue defaultvalue getdefaultlong oldvalue getlong defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the long valued property with the given name returns the default default value code 0l code if there is no default property with the given name or if the default value cannot be treated as a long the given name must not be code null code param name the name of the property return the default value of the named property public long get default long string name return convert to long default properties get property name long default default getdefaultlong converttolong defaultproperties getproperty long_default_default sets the default value for the long valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name long value default properties put name long to string value setdefault defaultproperties tostring converts the given raw property value string to a long param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to a long or the given code default value code if the raw value is code null code or cannot be parsed as a long private long convert to long string raw property value long default value long result default value if raw property value null try result long parse long raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttolong rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parselong rawpropertyvalue numberformatexception returns the current value of the string valued property with the given name returns the default default value the empty string code code if there is no property with the given name the given name must not be code null code param name the name of the property return the string valued property public string get string string name string value properties get property name return value null value string default default getstring getproperty string_default_default sets the current value of the string valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name string value if value null throw new illegal argument exception string default value get default string name string old value get string name if value equals default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name value if old value equals value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name old value value settodefault setvalue illegalargumentexception defaultvalue getdefaultstring oldvalue getstring defaultvalue oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the string valued property with the given name returns the default default value the empty string code code is no default property with the given name or if the default value cannot be treated as a string the given name must not be code null code param name the name of the property return the default value of the named property public string get default string string name string value default properties get property name return value null value string default default getdefaultstring defaultproperties getproperty string_default_default sets the default value for the string valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name string value if value null throw new illegal argument exception default properties put name value setdefault illegalargumentexception defaultproperties returns whether the property with the given name has the default value in virtue of having no explicitly set value returns code false code if the given name is code null code param name the name of the property or code null code return code true code if the property has no explicitly set value and code false code otherwise including the case where the property is unknown to this object public boolean is default string name return properties contains key name isdefault containskey sets the current value of the property with the given name back to its default value has no effect if the property does not have its own current value the given name must not be code null code p note that the recommended way of re initializing a property to the appropriate default value is to call code set to default code this is implemented by removing the named value from the object thereby exposing the default value p p a property change event is always reported in the event object the property name is the name of the property and the old and new values are either strings or code null code indicating the default default value p param name the name of the property public void set to default string name object old property value properties remove name if old property value null dirty true string new value default properties get property name null n b new value null if there is no default value can t determine correct default default without knowing type fire property change event name old property value new value settodefault settodefault oldpropertyvalue oldpropertyvalue newvalue defaultproperties getproperty newvalue firepropertychangeevent oldpropertyvalue newvalue returns a list of all properties known to this preference object which have current values other than their default value return an array of property names public string property names return string properties key set to array empty string array propertynames keyset toarray empty_string_array returns a list of all properties known to this preference object which have an explicit default value set return an array of property names public string default property names return string default properties key set to array empty string array defaultpropertynames defaultproperties keyset toarray empty_string_array returns whether the current values in this preference object require saving return code true code if at least one of the properties known to this preference object has a current value different from its default value and code false code otherwise public boolean needs saving return dirty needssaving saves the non default valued properties known to this preference object to the given output stream using code properties store output stream string code p note that the output is unconditionally written even when code needs saving code is code false code p param out the output stream param header a comment to be included in the output or code null code if none exception io exception if there is a problem saving this preference object see properties store output stream string public void store output stream out string header throws io exception properties store out header dirty false outputstream needssaving ioexception outputstream outputstream ioexception loads the non default valued properties for this preference object from the given input stream using code java util properties load input stream code default property values are not affected param in the input stream exception io exception if there is a problem loading this preference object see java util properties load input stream public void load input stream in throws io exception properties load in dirty false inputstream ioexception inputstream inputstream ioexception creates a new property change event param source the object whose property has changed param property the property that has changed must not be code null code param old value the old value of the property or code null code if none param new value the new value of the property or code null code if none protected property change event object source string property object old value object new value super source if property null throw new illegal argument exception this property name property this old value old value this new value new value oldvalue newvalue propertychangeevent oldvalue newvalue illegalargumentexception propertyname oldvalue oldvalue newvalue newvalue returns the name of the property that changed p warning there is no guarantee that the property name returned is a constant string callers must compare property names using code equals code not p return the name of the property that changed public string get property return property name getproperty propertyname returns the new value of the property return the new value or code null code if not known or not relevant public object get new value return new value getnewvalue newvalue returns the old value of the property return the old value or code null code if not known or not relevant public object get old value return old value getoldvalue oldvalue notification that a property has changed p this method gets called when the observed object fires a property change event p param event the property change event object describing which property changed and how exports all non default valued preferences for all installed plugins to the provided file if a file already exists at the given location it will be deleted if there are no preferences to export no file will be written p the file that is written can be read later using the import preferences method p param path the absolute file system path of the file to export preferences to exception core exception if this method fails reasons include ul li the file could not be written li ul see import preferences i path see validate preference versions i path public static void export preferences i path path throws core exception file file path to file if file exists file delete file get parent file mkdirs i preferences service service platform get preferences service output stream output null file output stream fos null try fos new file output stream file output new buffered output stream fos i eclipse preferences node i eclipse preferences service get root node node plugin plugin preference scope service export preferences node output string null output flush fos getfd sync catch io exception e string message nls bind messages preferences errorwriting file e get message i status status new status i status error platform pi runtime i status error message e throw new core exception status finally if output null try output close catch io exception e ignore importpreferences coreexception importpreferences ipath validatepreferenceversions ipath exportpreferences ipath coreexception tofile getparentfile ipreferencesservice getpreferencesservice outputstream fileoutputstream fileoutputstream bufferedoutputstream ieclipsepreferences ieclipsepreferences getrootnode plugin_preference_scope exportpreferences ioexception preferences_errorwriting getmessage istatus istatus pi_runtime istatus coreexception ioexception loads the plugin preferences from the given file and replaces all non default valued preferences for all plugins with the values from this file p if the file contains preferences for plug ins that don t exist in the current install they are ignored this method does not validate if the plug in versions in the preference file match the currently installed plug ins clients should first call validate preference versions on the file to ensure that the versions are compatible p p the file must have been written by the export preferences method p param path the absolute file system path of the file to import preferences from exception core exception if this method fails reasons include ul li the file does not exist li li the file could not be read li ul see export preferences i path see validate preference versions i path public static void import preferences i path path throws core exception if path to file exists string msg nls bind messages preferences filenotfound path toos string throw new core exception new status i status error platform pi runtime 1 msg null i preferences service service platform get preferences service input stream input null try input new buffered input stream new file input stream path to file service import preferences input catch file not found exception e string msg nls bind messages preferences filenotfound path toos string throw new core exception new status i status error platform pi runtime 1 msg e finally if input null try input close catch io exception e ignore validatepreferenceversions exportpreferences coreexception exportpreferences ipath validatepreferenceversions ipath importpreferences ipath coreexception tofile preferences_filenotfound toosstring coreexception istatus pi_runtime ipreferencesservice getpreferencesservice inputstream bufferedinputstream fileinputstream tofile importpreferences filenotfoundexception preferences_filenotfound toosstring coreexception istatus pi_runtime ioexception validates that the preference versions in the given file match the versions of the currently installed plugins returns an ok status if all preferences match the currently installed plugins otherwise a multi status describing what plugins have preferences that don t match p if the returned status has a code i status warning code severity it means that some preferences may not be applicable but for the most part they will be compatible if the returned status has a code i status error code severity it means that the preferences will probably not be compatible p if the file contains preferences for plug ins that don t exist in the current install they are ignored p p the file must have been written by the export preferences method p param file the absolute file system path of the preference file to validate see export preferences i path see import preferences i path public static i status validate preference versions i path file preferences service service preferences service platform get preferences service return service validate versions file multistatus istatus istatus exportpreferences exportpreferences ipath importpreferences ipath istatus validatepreferenceversions ipath preferencesservice preferencesservice getpreferencesservice validateversions creates an empty preference table p use the methods code load input stream code and code store input stream code to load and store these preferences p see load input stream see store output stream string public preferences default properties new properties properties new properties default properties inputstream inputstream inputstream outputstream defaultproperties defaultproperties adds a property change listener to this preference object has no affect if the identical listener is already registered p em note em depending on the means in which the property values changed the old and new values for the property can be either typed a string representation of the value or code null code clients who wish to behave properly in all cases should all three cases in their implementation of the property change listener p param listener a property change listener public void add property change listener i property change listener listener listeners add listener addpropertychangelistener ipropertychangelistener removes the given listener from this preference object has no affect if the listener is not registered param listener a property change listener public void remove property change listener i property change listener listener listeners remove listener removepropertychangelistener ipropertychangelistener returns whether the given property is known to this preference object either by having an explicit setting or by having a default setting returns code false code if the given name is code null code param name the name of the property or code null code return code true code if either a current value or a default value is known for the named property and code false code otherwise public boolean contains string name return properties contains key name default properties contains key name containskey defaultproperties containskey fires a property change event corresponding to a change to the current value of the property with the given name param name the name of the property to be used as the property in the event object param old value the old value or code null code if not known or not relevant param new value the new value or code null code if not known or not relevant protected void fire property change event string name object old value object new value if name null throw new illegal argument exception object change listeners this listeners get listeners do we even need to fire an event if change listeners length 0 return final property change event pe new property change event this name old value new value for int i 0 i change listeners length i final i property change listener l i property change listener change listeners i i safe runnable job new i safe runnable public void handle exception throwable exception already being logged in platform run public void run throws exception l property change pe platform run job oldvalue newvalue firepropertychangeevent oldvalue newvalue illegalargumentexception changelisteners getlisteners changelisteners propertychangeevent propertychangeevent oldvalue newvalue changelisteners ipropertychangelistener ipropertychangelistener changelisteners isaferunnable isaferunnable handleexception propertychange final i property change listener l i property change listener change listeners i i safe runnable job new i safe runnable public void handle exception throwable exception already being logged in platform run ipropertychangelistener ipropertychangelistener changelisteners isaferunnable isaferunnable handleexception public void run throws exception l property change pe propertychange returns the current value of the boolean valued property with the given name returns the default default value code false code if there is no property with the given name or if the current value cannot be treated as a boolean the given name must not be code null code param name the name of the property return the boolean valued property public boolean get boolean string name string value properties get property name if value null return boolean default default return value equals preferences true getboolean getproperty boolean_default_default sets the current value of the boolean valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name boolean value boolean default value get default boolean name boolean old value get boolean name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name value preferences true preferences false if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name old value boolean true boolean false value boolean true boolean false settodefault setvalue defaultvalue getdefaultboolean oldvalue getboolean defaultvalue oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the boolean valued property with the given name returns the default default value code false code if there is no default property with the given name or if the default value cannot be treated as a boolean the given name must not be code null code param name the name of the property return the default value of the named property public boolean get default boolean string name string value default properties get property name if value null return boolean default default return value equals preferences true getdefaultboolean defaultproperties getproperty boolean_default_default sets the default value for the boolean valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name boolean value default properties put name value preferences true preferences false setdefault defaultproperties returns the current value of the double valued property with the given name returns the default default value code 0 0 code if there is no property with the given name or if the current value cannot be treated as a double the given name must not be code null code param name the name of the property return the double valued property public double get double string name return convert to double properties get property name double default default getdouble converttodouble getproperty double_default_default sets the current value of the double valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property must be a number not a nan public void set value string name double value if double is nan value throw new illegal argument exception double default value get default double name double old value get double name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name double to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new double old value new double value settodefault setvalue isnan illegalargumentexception defaultvalue getdefaultdouble oldvalue getdouble defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the double valued property with the given name returns the default default value code 0 0 code if there is no default property with the given name or if the default value cannot be treated as a double the given name must not be code null code param name the name of the property return the default value of the named property public double get default double string name return convert to double default properties get property name double default default getdefaultdouble converttodouble defaultproperties getproperty double_default_default sets the default value for the double valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property must be a number not a nan public void set default string name double value if double is nan value throw new illegal argument exception default properties put name double to string value setdefault isnan illegalargumentexception defaultproperties tostring converts the given raw property value string to a double param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to a double or the given code default value code if the raw value is code null code or cannot be parsed as a double private double convert to double string raw property value double default value double result default value if raw property value null try result double parse double raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttodouble rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parsedouble rawpropertyvalue numberformatexception returns the current value of the float valued property with the given name returns the default default value code 0 0f code if there is no property with the given name or if the current value cannot be treated as a float the given name must not be code null code param name the name of the property return the float valued property public float get float string name return convert to float properties get property name float default default getfloat converttofloat getproperty float_default_default sets the current value of the float valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property must be a number not a nan public void set value string name float value if float is nan value throw new illegal argument exception float default value get default float name float old value get float name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name float to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new float old value new float value settodefault setvalue isnan illegalargumentexception defaultvalue getdefaultfloat oldvalue getfloat defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the float valued property with the given name returns the default default value code 0 0f code if there is no default property with the given name or if the default value cannot be treated as a float the given name must not be code null code param name the name of the property return the default value of the named property public float get default float string name return convert to float default properties get property name float default default getdefaultfloat converttofloat defaultproperties getproperty float_default_default sets the default value for the float valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property must be a number not a nan public void set default string name float value if float is nan value throw new illegal argument exception default properties put name float to string value setdefault isnan illegalargumentexception defaultproperties tostring converts the given raw property value string to a float param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to a float or the given code default value code if the raw value is code null code or cannot be parsed as a float private float convert to float string raw property value float default value float result default value if raw property value null try result float parse float raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttofloat rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parsefloat rawpropertyvalue numberformatexception returns the current value of the integer valued property with the given name returns the default default value code 0 code if there is no property with the given name or if the current value cannot be treated as an integer the given name must not be code null code param name the name of the property return the int valued property public int get int string name return convert to int properties get property name int default default getint converttoint getproperty int_default_default sets the current value of the integer valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name int value int default value get default int name int old value get int name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name integer to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new integer old value new integer value settodefault setvalue defaultvalue getdefaultint oldvalue getint defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the integer valued property with the given name returns the default default value code 0 code if there is no default property with the given name or if the default value cannot be treated as an integer the given name must not be code null code param name the name of the property return the default value of the named property public int get default int string name return convert to int default properties get property name int default default getdefaultint converttoint defaultproperties getproperty int_default_default sets the default value for the integer valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name int value default properties put name integer to string value setdefault defaultproperties tostring converts the given raw property value string to an int param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to an int or the given code default value code if the raw value is code null code or cannot be parsed as an int private int convert to int string raw property value int default value int result default value if raw property value null try result integer parse int raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttoint rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parseint rawpropertyvalue numberformatexception returns the current value of the long valued property with the given name returns the default default value code 0l code if there is no property with the given name or if the current value cannot be treated as a long the given name must not be code null code param name the name of the property return the long valued property public long get long string name return convert to long properties get property name long default default getlong converttolong getproperty long_default_default sets the current value of the long valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name long value long default value get default long name long old value get long name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name long to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new long old value new long value settodefault setvalue defaultvalue getdefaultlong oldvalue getlong defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the long valued property with the given name returns the default default value code 0l code if there is no default property with the given name or if the default value cannot be treated as a long the given name must not be code null code param name the name of the property return the default value of the named property public long get default long string name return convert to long default properties get property name long default default getdefaultlong converttolong defaultproperties getproperty long_default_default sets the default value for the long valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name long value default properties put name long to string value setdefault defaultproperties tostring converts the given raw property value string to a long param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to a long or the given code default value code if the raw value is code null code or cannot be parsed as a long private long convert to long string raw property value long default value long result default value if raw property value null try result long parse long raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttolong rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parselong rawpropertyvalue numberformatexception returns the current value of the string valued property with the given name returns the default default value the empty string code code if there is no property with the given name the given name must not be code null code param name the name of the property return the string valued property public string get string string name string value properties get property name return value null value string default default getstring getproperty string_default_default sets the current value of the string valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name string value if value null throw new illegal argument exception string default value get default string name string old value get string name if value equals default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name value if old value equals value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name old value value settodefault setvalue illegalargumentexception defaultvalue getdefaultstring oldvalue getstring defaultvalue oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the string valued property with the given name returns the default default value the empty string code code is no default property with the given name or if the default value cannot be treated as a string the given name must not be code null code param name the name of the property return the default value of the named property public string get default string string name string value default properties get property name return value null value string default default getdefaultstring defaultproperties getproperty string_default_default sets the default value for the string valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name string value if value null throw new illegal argument exception default properties put name value setdefault illegalargumentexception defaultproperties returns whether the property with the given name has the default value in virtue of having no explicitly set value returns code false code if the given name is code null code param name the name of the property or code null code return code true code if the property has no explicitly set value and code false code otherwise including the case where the property is unknown to this object public boolean is default string name return properties contains key name isdefault containskey sets the current value of the property with the given name back to its default value has no effect if the property does not have its own current value the given name must not be code null code p note that the recommended way of re initializing a property to the appropriate default value is to call code set to default code this is implemented by removing the named value from the object thereby exposing the default value p p a property change event is always reported in the event object the property name is the name of the property and the old and new values are either strings or code null code indicating the default default value p param name the name of the property public void set to default string name object old property value properties remove name if old property value null dirty true string new value default properties get property name null n b new value null if there is no default value can t determine correct default default without knowing type fire property change event name old property value new value settodefault settodefault oldpropertyvalue oldpropertyvalue newvalue defaultproperties getproperty newvalue firepropertychangeevent oldpropertyvalue newvalue returns a list of all properties known to this preference object which have current values other than their default value return an array of property names public string property names return string properties key set to array empty string array propertynames keyset toarray empty_string_array returns a list of all properties known to this preference object which have an explicit default value set return an array of property names public string default property names return string default properties key set to array empty string array defaultpropertynames defaultproperties keyset toarray empty_string_array returns whether the current values in this preference object require saving return code true code if at least one of the properties known to this preference object has a current value different from its default value and code false code otherwise public boolean needs saving return dirty needssaving saves the non default valued properties known to this preference object to the given output stream using code properties store output stream string code p note that the output is unconditionally written even when code needs saving code is code false code p param out the output stream param header a comment to be included in the output or code null code if none exception io exception if there is a problem saving this preference object see properties store output stream string public void store output stream out string header throws io exception properties store out header dirty false outputstream needssaving ioexception outputstream outputstream ioexception loads the non default valued properties for this preference object from the given input stream using code java util properties load input stream code default property values are not affected param in the input stream exception io exception if there is a problem loading this preference object see java util properties load input stream public void load input stream in throws io exception properties load in dirty false inputstream ioexception inputstream inputstream ioexception creates a new property change event param source the object whose property has changed param property the property that has changed must not be code null code param old value the old value of the property or code null code if none param new value the new value of the property or code null code if none protected property change event object source string property object old value object new value super source if property null throw new illegal argument exception this property name property this old value old value this new value new value oldvalue newvalue propertychangeevent oldvalue newvalue illegalargumentexception propertyname oldvalue oldvalue newvalue newvalue returns the name of the property that changed p warning there is no guarantee that the property name returned is a constant string callers must compare property names using code equals code not p return the name of the property that changed public string get property return property name getproperty propertyname returns the new value of the property return the new value or code null code if not known or not relevant public object get new value return new value getnewvalue newvalue returns the old value of the property return the old value or code null code if not known or not relevant public object get old value return old value getoldvalue oldvalue notification that a property has changed p this method gets called when the observed object fires a property change event p param event the property change event object describing which property changed and how exports all non default valued preferences for all installed plugins to the provided file if a file already exists at the given location it will be deleted if there are no preferences to export no file will be written p the file that is written can be read later using the import preferences method p param path the absolute file system path of the file to export preferences to exception core exception if this method fails reasons include ul li the file could not be written li ul see import preferences i path see validate preference versions i path public static void export preferences i path path throws core exception file file path to file if file exists file delete file get parent file mkdirs i preferences service service platform get preferences service output stream output null file output stream fos null try fos new file output stream file output new buffered output stream fos i eclipse preferences node i eclipse preferences service get root node node plugin plugin preference scope service export preferences node output string null output flush fos getfd sync catch io exception e string message nls bind messages preferences errorwriting file e get message i status status new status i status error platform pi runtime i status error message e throw new core exception status finally if output null try output close catch io exception e ignore importpreferences coreexception importpreferences ipath validatepreferenceversions ipath exportpreferences ipath coreexception tofile getparentfile ipreferencesservice getpreferencesservice outputstream fileoutputstream fileoutputstream bufferedoutputstream ieclipsepreferences ieclipsepreferences getrootnode plugin_preference_scope exportpreferences ioexception preferences_errorwriting getmessage istatus istatus pi_runtime istatus coreexception ioexception loads the plugin preferences from the given file and replaces all non default valued preferences for all plugins with the values from this file p if the file contains preferences for plug ins that don t exist in the current install they are ignored this method does not validate if the plug in versions in the preference file match the currently installed plug ins clients should first call validate preference versions on the file to ensure that the versions are compatible p p the file must have been written by the export preferences method p param path the absolute file system path of the file to import preferences from exception core exception if this method fails reasons include ul li the file does not exist li li the file could not be read li ul see export preferences i path see validate preference versions i path public static void import preferences i path path throws core exception if path to file exists string msg nls bind messages preferences filenotfound path toos string throw new core exception new status i status error platform pi runtime 1 msg null i preferences service service platform get preferences service input stream input null try input new buffered input stream new file input stream path to file service import preferences input catch file not found exception e string msg nls bind messages preferences filenotfound path toos string throw new core exception new status i status error platform pi runtime 1 msg e finally if input null try input close catch io exception e ignore validatepreferenceversions exportpreferences coreexception exportpreferences ipath validatepreferenceversions ipath importpreferences ipath coreexception tofile preferences_filenotfound toosstring coreexception istatus pi_runtime ipreferencesservice getpreferencesservice inputstream bufferedinputstream fileinputstream tofile importpreferences filenotfoundexception preferences_filenotfound toosstring coreexception istatus pi_runtime ioexception validates that the preference versions in the given file match the versions of the currently installed plugins returns an ok status if all preferences match the currently installed plugins otherwise a multi status describing what plugins have preferences that don t match p if the returned status has a code i status warning code severity it means that some preferences may not be applicable but for the most part they will be compatible if the returned status has a code i status error code severity it means that the preferences will probably not be compatible p if the file contains preferences for plug ins that don t exist in the current install they are ignored p p the file must have been written by the export preferences method p param file the absolute file system path of the preference file to validate see export preferences i path see import preferences i path public static i status validate preference versions i path file preferences service service preferences service platform get preferences service return service validate versions file multistatus istatus istatus exportpreferences exportpreferences ipath importpreferences ipath istatus validatepreferenceversions ipath preferencesservice preferencesservice getpreferencesservice validateversions creates an empty preference table p use the methods code load input stream code and code store input stream code to load and store these preferences p see load input stream see store output stream string public preferences default properties new properties properties new properties default properties inputstream inputstream inputstream outputstream defaultproperties defaultproperties adds a property change listener to this preference object has no affect if the identical listener is already registered p em note em depending on the means in which the property values changed the old and new values for the property can be either typed a string representation of the value or code null code clients who wish to behave properly in all cases should all three cases in their implementation of the property change listener p param listener a property change listener public void add property change listener i property change listener listener listeners add listener addpropertychangelistener ipropertychangelistener removes the given listener from this preference object has no affect if the listener is not registered param listener a property change listener public void remove property change listener i property change listener listener listeners remove listener removepropertychangelistener ipropertychangelistener returns whether the given property is known to this preference object either by having an explicit setting or by having a default setting returns code false code if the given name is code null code param name the name of the property or code null code return code true code if either a current value or a default value is known for the named property and code false code otherwise public boolean contains string name return properties contains key name default properties contains key name containskey defaultproperties containskey fires a property change event corresponding to a change to the current value of the property with the given name param name the name of the property to be used as the property in the event object param old value the old value or code null code if not known or not relevant param new value the new value or code null code if not known or not relevant protected void fire property change event string name object old value object new value if name null throw new illegal argument exception object change listeners this listeners get listeners do we even need to fire an event if change listeners length 0 return final property change event pe new property change event this name old value new value for int i 0 i change listeners length i final i property change listener l i property change listener change listeners i i safe runnable job new i safe runnable public void handle exception throwable exception already being logged in platform run public void run throws exception l property change pe platform run job oldvalue newvalue firepropertychangeevent oldvalue newvalue illegalargumentexception changelisteners getlisteners changelisteners propertychangeevent propertychangeevent oldvalue newvalue changelisteners ipropertychangelistener ipropertychangelistener changelisteners isaferunnable isaferunnable handleexception propertychange final i property change listener l i property change listener change listeners i i safe runnable job new i safe runnable public void handle exception throwable exception already being logged in platform run ipropertychangelistener ipropertychangelistener changelisteners isaferunnable isaferunnable handleexception public void run throws exception l property change pe propertychange returns the current value of the boolean valued property with the given name returns the default default value code false code if there is no property with the given name or if the current value cannot be treated as a boolean the given name must not be code null code param name the name of the property return the boolean valued property public boolean get boolean string name string value properties get property name if value null return boolean default default return value equals preferences true getboolean getproperty boolean_default_default sets the current value of the boolean valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name boolean value boolean default value get default boolean name boolean old value get boolean name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name value preferences true preferences false if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name old value boolean true boolean false value boolean true boolean false settodefault setvalue defaultvalue getdefaultboolean oldvalue getboolean defaultvalue oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the boolean valued property with the given name returns the default default value code false code if there is no default property with the given name or if the default value cannot be treated as a boolean the given name must not be code null code param name the name of the property return the default value of the named property public boolean get default boolean string name string value default properties get property name if value null return boolean default default return value equals preferences true getdefaultboolean defaultproperties getproperty boolean_default_default sets the default value for the boolean valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name boolean value default properties put name value preferences true preferences false setdefault defaultproperties returns the current value of the double valued property with the given name returns the default default value code 0 0 code if there is no property with the given name or if the current value cannot be treated as a double the given name must not be code null code param name the name of the property return the double valued property public double get double string name return convert to double properties get property name double default default getdouble converttodouble getproperty double_default_default sets the current value of the double valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property must be a number not a nan public void set value string name double value if double is nan value throw new illegal argument exception double default value get default double name double old value get double name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name double to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new double old value new double value settodefault setvalue isnan illegalargumentexception defaultvalue getdefaultdouble oldvalue getdouble defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the double valued property with the given name returns the default default value code 0 0 code if there is no default property with the given name or if the default value cannot be treated as a double the given name must not be code null code param name the name of the property return the default value of the named property public double get default double string name return convert to double default properties get property name double default default getdefaultdouble converttodouble defaultproperties getproperty double_default_default sets the default value for the double valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property must be a number not a nan public void set default string name double value if double is nan value throw new illegal argument exception default properties put name double to string value setdefault isnan illegalargumentexception defaultproperties tostring converts the given raw property value string to a double param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to a double or the given code default value code if the raw value is code null code or cannot be parsed as a double private double convert to double string raw property value double default value double result default value if raw property value null try result double parse double raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttodouble rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parsedouble rawpropertyvalue numberformatexception returns the current value of the float valued property with the given name returns the default default value code 0 0f code if there is no property with the given name or if the current value cannot be treated as a float the given name must not be code null code param name the name of the property return the float valued property public float get float string name return convert to float properties get property name float default default getfloat converttofloat getproperty float_default_default sets the current value of the float valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property must be a number not a nan public void set value string name float value if float is nan value throw new illegal argument exception float default value get default float name float old value get float name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name float to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new float old value new float value settodefault setvalue isnan illegalargumentexception defaultvalue getdefaultfloat oldvalue getfloat defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the float valued property with the given name returns the default default value code 0 0f code if there is no default property with the given name or if the default value cannot be treated as a float the given name must not be code null code param name the name of the property return the default value of the named property public float get default float string name return convert to float default properties get property name float default default getdefaultfloat converttofloat defaultproperties getproperty float_default_default sets the default value for the float valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property must be a number not a nan public void set default string name float value if float is nan value throw new illegal argument exception default properties put name float to string value setdefault isnan illegalargumentexception defaultproperties tostring converts the given raw property value string to a float param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to a float or the given code default value code if the raw value is code null code or cannot be parsed as a float private float convert to float string raw property value float default value float result default value if raw property value null try result float parse float raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttofloat rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parsefloat rawpropertyvalue numberformatexception returns the current value of the integer valued property with the given name returns the default default value code 0 code if there is no property with the given name or if the current value cannot be treated as an integer the given name must not be code null code param name the name of the property return the int valued property public int get int string name return convert to int properties get property name int default default getint converttoint getproperty int_default_default sets the current value of the integer valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name int value int default value get default int name int old value get int name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name integer to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new integer old value new integer value settodefault setvalue defaultvalue getdefaultint oldvalue getint defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the integer valued property with the given name returns the default default value code 0 code if there is no default property with the given name or if the default value cannot be treated as an integer the given name must not be code null code param name the name of the property return the default value of the named property public int get default int string name return convert to int default properties get property name int default default getdefaultint converttoint defaultproperties getproperty int_default_default sets the default value for the integer valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name int value default properties put name integer to string value setdefault defaultproperties tostring converts the given raw property value string to an int param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to an int or the given code default value code if the raw value is code null code or cannot be parsed as an int private int convert to int string raw property value int default value int result default value if raw property value null try result integer parse int raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttoint rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parseint rawpropertyvalue numberformatexception returns the current value of the long valued property with the given name returns the default default value code 0l code if there is no property with the given name or if the current value cannot be treated as a long the given name must not be code null code param name the name of the property return the long valued property public long get long string name return convert to long properties get property name long default default getlong converttolong getproperty long_default_default sets the current value of the long valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name long value long default value get default long name long old value get long name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name long to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new long old value new long value settodefault setvalue defaultvalue getdefaultlong oldvalue getlong defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the long valued property with the given name returns the default default value code 0l code if there is no default property with the given name or if the default value cannot be treated as a long the given name must not be code null code param name the name of the property return the default value of the named property public long get default long string name return convert to long default properties get property name long default default getdefaultlong converttolong defaultproperties getproperty long_default_default sets the default value for the long valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name long value default properties put name long to string value setdefault defaultproperties tostring converts the given raw property value string to a long param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to a long or the given code default value code if the raw value is code null code or cannot be parsed as a long private long convert to long string raw property value long default value long result default value if raw property value null try result long parse long raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttolong rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parselong rawpropertyvalue numberformatexception returns the current value of the string valued property with the given name returns the default default value the empty string code code if there is no property with the given name the given name must not be code null code param name the name of the property return the string valued property public string get string string name string value properties get property name return value null value string default default getstring getproperty string_default_default sets the current value of the string valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name string value if value null throw new illegal argument exception string default value get default string name string old value get string name if value equals default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name value if old value equals value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name old value value settodefault setvalue illegalargumentexception defaultvalue getdefaultstring oldvalue getstring defaultvalue oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the string valued property with the given name returns the default default value the empty string code code is no default property with the given name or if the default value cannot be treated as a string the given name must not be code null code param name the name of the property return the default value of the named property public string get default string string name string value default properties get property name return value null value string default default getdefaultstring defaultproperties getproperty string_default_default sets the default value for the string valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name string value if value null throw new illegal argument exception default properties put name value setdefault illegalargumentexception defaultproperties returns whether the property with the given name has the default value in virtue of having no explicitly set value returns code false code if the given name is code null code param name the name of the property or code null code return code true code if the property has no explicitly set value and code false code otherwise including the case where the property is unknown to this object public boolean is default string name return properties contains key name isdefault containskey sets the current value of the property with the given name back to its default value has no effect if the property does not have its own current value the given name must not be code null code p note that the recommended way of re initializing a property to the appropriate default value is to call code set to default code this is implemented by removing the named value from the object thereby exposing the default value p p a property change event is always reported in the event object the property name is the name of the property and the old and new values are either strings or code null code indicating the default default value p param name the name of the property public void set to default string name object old property value properties remove name if old property value null dirty true string new value default properties get property name null n b new value null if there is no default value can t determine correct default default without knowing type fire property change event name old property value new value settodefault settodefault oldpropertyvalue oldpropertyvalue newvalue defaultproperties getproperty newvalue firepropertychangeevent oldpropertyvalue newvalue returns a list of all properties known to this preference object which have current values other than their default value return an array of property names public string property names return string properties key set to array empty string array propertynames keyset toarray empty_string_array returns a list of all properties known to this preference object which have an explicit default value set return an array of property names public string default property names return string default properties key set to array empty string array defaultpropertynames defaultproperties keyset toarray empty_string_array returns whether the current values in this preference object require saving return code true code if at least one of the properties known to this preference object has a current value different from its default value and code false code otherwise public boolean needs saving return dirty needssaving saves the non default valued properties known to this preference object to the given output stream using code properties store output stream string code p note that the output is unconditionally written even when code needs saving code is code false code p param out the output stream param header a comment to be included in the output or code null code if none exception io exception if there is a problem saving this preference object see properties store output stream string public void store output stream out string header throws io exception properties store out header dirty false outputstream needssaving ioexception outputstream outputstream ioexception loads the non default valued properties for this preference object from the given input stream using code java util properties load input stream code default property values are not affected param in the input stream exception io exception if there is a problem loading this preference object see java util properties load input stream public void load input stream in throws io exception properties load in dirty false inputstream ioexception inputstream inputstream ioexception creates a new property change event param source the object whose property has changed param property the property that has changed must not be code null code param old value the old value of the property or code null code if none param new value the new value of the property or code null code if none protected property change event object source string property object old value object new value super source if property null throw new illegal argument exception this property name property this old value old value this new value new value oldvalue newvalue propertychangeevent oldvalue newvalue illegalargumentexception propertyname oldvalue oldvalue newvalue newvalue returns the name of the property that changed p warning there is no guarantee that the property name returned is a constant string callers must compare property names using code equals code not p return the name of the property that changed public string get property return property name getproperty propertyname returns the new value of the property return the new value or code null code if not known or not relevant public object get new value return new value getnewvalue newvalue returns the old value of the property return the old value or code null code if not known or not relevant public object get old value return old value getoldvalue oldvalue notification that a property has changed p this method gets called when the observed object fires a property change event p param event the property change event object describing which property changed and how exports all non default valued preferences for all installed plugins to the provided file if a file already exists at the given location it will be deleted if there are no preferences to export no file will be written p the file that is written can be read later using the import preferences method p param path the absolute file system path of the file to export preferences to exception core exception if this method fails reasons include ul li the file could not be written li ul see import preferences i path see validate preference versions i path public static void export preferences i path path throws core exception file file path to file if file exists file delete file get parent file mkdirs i preferences service service platform get preferences service output stream output null file output stream fos null try fos new file output stream file output new buffered output stream fos i eclipse preferences node i eclipse preferences service get root node node plugin plugin preference scope service export preferences node output string null output flush fos getfd sync catch io exception e string message nls bind messages preferences errorwriting file e get message i status status new status i status error platform pi runtime i status error message e throw new core exception status finally if output null try output close catch io exception e ignore importpreferences coreexception importpreferences ipath validatepreferenceversions ipath exportpreferences ipath coreexception tofile getparentfile ipreferencesservice getpreferencesservice outputstream fileoutputstream fileoutputstream bufferedoutputstream ieclipsepreferences ieclipsepreferences getrootnode plugin_preference_scope exportpreferences ioexception preferences_errorwriting getmessage istatus istatus pi_runtime istatus coreexception ioexception loads the plugin preferences from the given file and replaces all non default valued preferences for all plugins with the values from this file p if the file contains preferences for plug ins that don t exist in the current install they are ignored this method does not validate if the plug in versions in the preference file match the currently installed plug ins clients should first call validate preference versions on the file to ensure that the versions are compatible p p the file must have been written by the export preferences method p param path the absolute file system path of the file to import preferences from exception core exception if this method fails reasons include ul li the file does not exist li li the file could not be read li ul see export preferences i path see validate preference versions i path public static void import preferences i path path throws core exception if path to file exists string msg nls bind messages preferences filenotfound path toos string throw new core exception new status i status error platform pi runtime 1 msg null i preferences service service platform get preferences service input stream input null try input new buffered input stream new file input stream path to file service import preferences input catch file not found exception e string msg nls bind messages preferences filenotfound path toos string throw new core exception new status i status error platform pi runtime 1 msg e finally if input null try input close catch io exception e ignore validatepreferenceversions exportpreferences coreexception exportpreferences ipath validatepreferenceversions ipath importpreferences ipath coreexception tofile preferences_filenotfound toosstring coreexception istatus pi_runtime ipreferencesservice getpreferencesservice inputstream bufferedinputstream fileinputstream tofile importpreferences filenotfoundexception preferences_filenotfound toosstring coreexception istatus pi_runtime ioexception validates that the preference versions in the given file match the versions of the currently installed plugins returns an ok status if all preferences match the currently installed plugins otherwise a multi status describing what plugins have preferences that don t match p if the returned status has a code i status warning code severity it means that some preferences may not be applicable but for the most part they will be compatible if the returned status has a code i status error code severity it means that the preferences will probably not be compatible p if the file contains preferences for plug ins that don t exist in the current install they are ignored p p the file must have been written by the export preferences method p param file the absolute file system path of the preference file to validate see export preferences i path see import preferences i path public static i status validate preference versions i path file preferences service service preferences service platform get preferences service return service validate versions file multistatus istatus istatus exportpreferences exportpreferences ipath importpreferences ipath istatus validatepreferenceversions ipath preferencesservice preferencesservice getpreferencesservice validateversions creates an empty preference table p use the methods code load input stream code and code store input stream code to load and store these preferences p see load input stream see store output stream string public preferences default properties new properties properties new properties default properties inputstream inputstream inputstream outputstream defaultproperties defaultproperties adds a property change listener to this preference object has no affect if the identical listener is already registered p em note em depending on the means in which the property values changed the old and new values for the property can be either typed a string representation of the value or code null code clients who wish to behave properly in all cases should all three cases in their implementation of the property change listener p param listener a property change listener public void add property change listener i property change listener listener listeners add listener addpropertychangelistener ipropertychangelistener removes the given listener from this preference object has no affect if the listener is not registered param listener a property change listener public void remove property change listener i property change listener listener listeners remove listener removepropertychangelistener ipropertychangelistener returns whether the given property is known to this preference object either by having an explicit setting or by having a default setting returns code false code if the given name is code null code param name the name of the property or code null code return code true code if either a current value or a default value is known for the named property and code false code otherwise public boolean contains string name return properties contains key name default properties contains key name containskey defaultproperties containskey fires a property change event corresponding to a change to the current value of the property with the given name param name the name of the property to be used as the property in the event object param old value the old value or code null code if not known or not relevant param new value the new value or code null code if not known or not relevant protected void fire property change event string name object old value object new value if name null throw new illegal argument exception object change listeners this listeners get listeners do we even need to fire an event if change listeners length 0 return final property change event pe new property change event this name old value new value for int i 0 i change listeners length i final i property change listener l i property change listener change listeners i i safe runnable job new i safe runnable public void handle exception throwable exception already being logged in platform run public void run throws exception l property change pe platform run job oldvalue newvalue firepropertychangeevent oldvalue newvalue illegalargumentexception changelisteners getlisteners changelisteners propertychangeevent propertychangeevent oldvalue newvalue changelisteners ipropertychangelistener ipropertychangelistener changelisteners isaferunnable isaferunnable handleexception propertychange final i property change listener l i property change listener change listeners i i safe runnable job new i safe runnable public void handle exception throwable exception already being logged in platform run ipropertychangelistener ipropertychangelistener changelisteners isaferunnable isaferunnable handleexception public void run throws exception l property change pe propertychange returns the current value of the boolean valued property with the given name returns the default default value code false code if there is no property with the given name or if the current value cannot be treated as a boolean the given name must not be code null code param name the name of the property return the boolean valued property public boolean get boolean string name string value properties get property name if value null return boolean default default return value equals preferences true getboolean getproperty boolean_default_default sets the current value of the boolean valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name boolean value boolean default value get default boolean name boolean old value get boolean name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name value preferences true preferences false if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name old value boolean true boolean false value boolean true boolean false settodefault setvalue defaultvalue getdefaultboolean oldvalue getboolean defaultvalue oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the boolean valued property with the given name returns the default default value code false code if there is no default property with the given name or if the default value cannot be treated as a boolean the given name must not be code null code param name the name of the property return the default value of the named property public boolean get default boolean string name string value default properties get property name if value null return boolean default default return value equals preferences true getdefaultboolean defaultproperties getproperty boolean_default_default sets the default value for the boolean valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name boolean value default properties put name value preferences true preferences false setdefault defaultproperties returns the current value of the double valued property with the given name returns the default default value code 0 0 code if there is no property with the given name or if the current value cannot be treated as a double the given name must not be code null code param name the name of the property return the double valued property public double get double string name return convert to double properties get property name double default default getdouble converttodouble getproperty double_default_default sets the current value of the double valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property must be a number not a nan public void set value string name double value if double is nan value throw new illegal argument exception double default value get default double name double old value get double name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name double to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new double old value new double value settodefault setvalue isnan illegalargumentexception defaultvalue getdefaultdouble oldvalue getdouble defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the double valued property with the given name returns the default default value code 0 0 code if there is no default property with the given name or if the default value cannot be treated as a double the given name must not be code null code param name the name of the property return the default value of the named property public double get default double string name return convert to double default properties get property name double default default getdefaultdouble converttodouble defaultproperties getproperty double_default_default sets the default value for the double valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property must be a number not a nan public void set default string name double value if double is nan value throw new illegal argument exception default properties put name double to string value setdefault isnan illegalargumentexception defaultproperties tostring converts the given raw property value string to a double param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to a double or the given code default value code if the raw value is code null code or cannot be parsed as a double private double convert to double string raw property value double default value double result default value if raw property value null try result double parse double raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttodouble rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parsedouble rawpropertyvalue numberformatexception returns the current value of the float valued property with the given name returns the default default value code 0 0f code if there is no property with the given name or if the current value cannot be treated as a float the given name must not be code null code param name the name of the property return the float valued property public float get float string name return convert to float properties get property name float default default getfloat converttofloat getproperty float_default_default sets the current value of the float valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property must be a number not a nan public void set value string name float value if float is nan value throw new illegal argument exception float default value get default float name float old value get float name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name float to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new float old value new float value settodefault setvalue isnan illegalargumentexception defaultvalue getdefaultfloat oldvalue getfloat defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the float valued property with the given name returns the default default value code 0 0f code if there is no default property with the given name or if the default value cannot be treated as a float the given name must not be code null code param name the name of the property return the default value of the named property public float get default float string name return convert to float default properties get property name float default default getdefaultfloat converttofloat defaultproperties getproperty float_default_default sets the default value for the float valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property must be a number not a nan public void set default string name float value if float is nan value throw new illegal argument exception default properties put name float to string value setdefault isnan illegalargumentexception defaultproperties tostring converts the given raw property value string to a float param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to a float or the given code default value code if the raw value is code null code or cannot be parsed as a float private float convert to float string raw property value float default value float result default value if raw property value null try result float parse float raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttofloat rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parsefloat rawpropertyvalue numberformatexception returns the current value of the integer valued property with the given name returns the default default value code 0 code if there is no property with the given name or if the current value cannot be treated as an integer the given name must not be code null code param name the name of the property return the int valued property public int get int string name return convert to int properties get property name int default default getint converttoint getproperty int_default_default sets the current value of the integer valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name int value int default value get default int name int old value get int name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name integer to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new integer old value new integer value settodefault setvalue defaultvalue getdefaultint oldvalue getint defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the integer valued property with the given name returns the default default value code 0 code if there is no default property with the given name or if the default value cannot be treated as an integer the given name must not be code null code param name the name of the property return the default value of the named property public int get default int string name return convert to int default properties get property name int default default getdefaultint converttoint defaultproperties getproperty int_default_default sets the default value for the integer valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name int value default properties put name integer to string value setdefault defaultproperties tostring converts the given raw property value string to an int param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to an int or the given code default value code if the raw value is code null code or cannot be parsed as an int private int convert to int string raw property value int default value int result default value if raw property value null try result integer parse int raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttoint rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parseint rawpropertyvalue numberformatexception returns the current value of the long valued property with the given name returns the default default value code 0l code if there is no property with the given name or if the current value cannot be treated as a long the given name must not be code null code param name the name of the property return the long valued property public long get long string name return convert to long properties get property name long default default getlong converttolong getproperty long_default_default sets the current value of the long valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name long value long default value get default long name long old value get long name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name long to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new long old value new long value settodefault setvalue defaultvalue getdefaultlong oldvalue getlong defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the long valued property with the given name returns the default default value code 0l code if there is no default property with the given name or if the default value cannot be treated as a long the given name must not be code null code param name the name of the property return the default value of the named property public long get default long string name return convert to long default properties get property name long default default getdefaultlong converttolong defaultproperties getproperty long_default_default sets the default value for the long valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name long value default properties put name long to string value setdefault defaultproperties tostring converts the given raw property value string to a long param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to a long or the given code default value code if the raw value is code null code or cannot be parsed as a long private long convert to long string raw property value long default value long result default value if raw property value null try result long parse long raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttolong rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parselong rawpropertyvalue numberformatexception returns the current value of the string valued property with the given name returns the default default value the empty string code code if there is no property with the given name the given name must not be code null code param name the name of the property return the string valued property public string get string string name string value properties get property name return value null value string default default getstring getproperty string_default_default sets the current value of the string valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name string value if value null throw new illegal argument exception string default value get default string name string old value get string name if value equals default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name value if old value equals value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name old value value settodefault setvalue illegalargumentexception defaultvalue getdefaultstring oldvalue getstring defaultvalue oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the string valued property with the given name returns the default default value the empty string code code is no default property with the given name or if the default value cannot be treated as a string the given name must not be code null code param name the name of the property return the default value of the named property public string get default string string name string value default properties get property name return value null value string default default getdefaultstring defaultproperties getproperty string_default_default sets the default value for the string valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name string value if value null throw new illegal argument exception default properties put name value setdefault illegalargumentexception defaultproperties returns whether the property with the given name has the default value in virtue of having no explicitly set value returns code false code if the given name is code null code param name the name of the property or code null code return code true code if the property has no explicitly set value and code false code otherwise including the case where the property is unknown to this object public boolean is default string name return properties contains key name isdefault containskey sets the current value of the property with the given name back to its default value has no effect if the property does not have its own current value the given name must not be code null code p note that the recommended way of re initializing a property to the appropriate default value is to call code set to default code this is implemented by removing the named value from the object thereby exposing the default value p p a property change event is always reported in the event object the property name is the name of the property and the old and new values are either strings or code null code indicating the default default value p param name the name of the property public void set to default string name object old property value properties remove name if old property value null dirty true string new value default properties get property name null n b new value null if there is no default value can t determine correct default default without knowing type fire property change event name old property value new value settodefault settodefault oldpropertyvalue oldpropertyvalue newvalue defaultproperties getproperty newvalue firepropertychangeevent oldpropertyvalue newvalue returns a list of all properties known to this preference object which have current values other than their default value return an array of property names public string property names return string properties key set to array empty string array propertynames keyset toarray empty_string_array returns a list of all properties known to this preference object which have an explicit default value set return an array of property names public string default property names return string default properties key set to array empty string array defaultpropertynames defaultproperties keyset toarray empty_string_array returns whether the current values in this preference object require saving return code true code if at least one of the properties known to this preference object has a current value different from its default value and code false code otherwise public boolean needs saving return dirty needssaving saves the non default valued properties known to this preference object to the given output stream using code properties store output stream string code p note that the output is unconditionally written even when code needs saving code is code false code p param out the output stream param header a comment to be included in the output or code null code if none exception io exception if there is a problem saving this preference object see properties store output stream string public void store output stream out string header throws io exception properties store out header dirty false outputstream needssaving ioexception outputstream outputstream ioexception loads the non default valued properties for this preference object from the given input stream using code java util properties load input stream code default property values are not affected param in the input stream exception io exception if there is a problem loading this preference object see java util properties load input stream public void load input stream in throws io exception properties load in dirty false inputstream ioexception inputstream inputstream ioexception creates a new property change event param source the object whose property has changed param property the property that has changed must not be code null code param old value the old value of the property or code null code if none param new value the new value of the property or code null code if none protected property change event object source string property object old value object new value super source if property null throw new illegal argument exception this property name property this old value old value this new value new value oldvalue newvalue propertychangeevent oldvalue newvalue illegalargumentexception propertyname oldvalue oldvalue newvalue newvalue returns the name of the property that changed p warning there is no guarantee that the property name returned is a constant string callers must compare property names using code equals code not p return the name of the property that changed public string get property return property name getproperty propertyname returns the new value of the property return the new value or code null code if not known or not relevant public object get new value return new value getnewvalue newvalue returns the old value of the property return the old value or code null code if not known or not relevant public object get old value return old value getoldvalue oldvalue notification that a property has changed p this method gets called when the observed object fires a property change event p param event the property change event object describing which property changed and how exports all non default valued preferences for all installed plugins to the provided file if a file already exists at the given location it will be deleted if there are no preferences to export no file will be written p the file that is written can be read later using the import preferences method p param path the absolute file system path of the file to export preferences to exception core exception if this method fails reasons include ul li the file could not be written li ul see import preferences i path see validate preference versions i path public static void export preferences i path path throws core exception file file path to file if file exists file delete file get parent file mkdirs i preferences service service platform get preferences service output stream output null file output stream fos null try fos new file output stream file output new buffered output stream fos i eclipse preferences node i eclipse preferences service get root node node plugin plugin preference scope service export preferences node output string null output flush fos getfd sync catch io exception e string message nls bind messages preferences errorwriting file e get message i status status new status i status error platform pi runtime i status error message e throw new core exception status finally if output null try output close catch io exception e ignore importpreferences coreexception importpreferences ipath validatepreferenceversions ipath exportpreferences ipath coreexception tofile getparentfile ipreferencesservice getpreferencesservice outputstream fileoutputstream fileoutputstream bufferedoutputstream ieclipsepreferences ieclipsepreferences getrootnode plugin_preference_scope exportpreferences ioexception preferences_errorwriting getmessage istatus istatus pi_runtime istatus coreexception ioexception loads the plugin preferences from the given file and replaces all non default valued preferences for all plugins with the values from this file p if the file contains preferences for plug ins that don t exist in the current install they are ignored this method does not validate if the plug in versions in the preference file match the currently installed plug ins clients should first call validate preference versions on the file to ensure that the versions are compatible p p the file must have been written by the export preferences method p param path the absolute file system path of the file to import preferences from exception core exception if this method fails reasons include ul li the file does not exist li li the file could not be read li ul see export preferences i path see validate preference versions i path public static void import preferences i path path throws core exception if path to file exists string msg nls bind messages preferences filenotfound path toos string throw new core exception new status i status error platform pi runtime 1 msg null i preferences service service platform get preferences service input stream input null try input new buffered input stream new file input stream path to file service import preferences input catch file not found exception e string msg nls bind messages preferences filenotfound path toos string throw new core exception new status i status error platform pi runtime 1 msg e finally if input null try input close catch io exception e ignore validatepreferenceversions exportpreferences coreexception exportpreferences ipath validatepreferenceversions ipath importpreferences ipath coreexception tofile preferences_filenotfound toosstring coreexception istatus pi_runtime ipreferencesservice getpreferencesservice inputstream bufferedinputstream fileinputstream tofile importpreferences filenotfoundexception preferences_filenotfound toosstring coreexception istatus pi_runtime ioexception validates that the preference versions in the given file match the versions of the currently installed plugins returns an ok status if all preferences match the currently installed plugins otherwise a multi status describing what plugins have preferences that don t match p if the returned status has a code i status warning code severity it means that some preferences may not be applicable but for the most part they will be compatible if the returned status has a code i status error code severity it means that the preferences will probably not be compatible p if the file contains preferences for plug ins that don t exist in the current install they are ignored p p the file must have been written by the export preferences method p param file the absolute file system path of the preference file to validate see export preferences i path see import preferences i path public static i status validate preference versions i path file preferences service service preferences service platform get preferences service return service validate versions file multistatus istatus istatus exportpreferences exportpreferences ipath importpreferences ipath istatus validatepreferenceversions ipath preferencesservice preferencesservice getpreferencesservice validateversions creates an empty preference table p use the methods code load input stream code and code store input stream code to load and store these preferences p see load input stream see store output stream string public preferences default properties new properties properties new properties default properties inputstream inputstream inputstream outputstream defaultproperties defaultproperties adds a property change listener to this preference object has no affect if the identical listener is already registered p em note em depending on the means in which the property values changed the old and new values for the property can be either typed a string representation of the value or code null code clients who wish to behave properly in all cases should all three cases in their implementation of the property change listener p param listener a property change listener public void add property change listener i property change listener listener listeners add listener addpropertychangelistener ipropertychangelistener removes the given listener from this preference object has no affect if the listener is not registered param listener a property change listener public void remove property change listener i property change listener listener listeners remove listener removepropertychangelistener ipropertychangelistener returns whether the given property is known to this preference object either by having an explicit setting or by having a default setting returns code false code if the given name is code null code param name the name of the property or code null code return code true code if either a current value or a default value is known for the named property and code false code otherwise public boolean contains string name return properties contains key name default properties contains key name containskey defaultproperties containskey fires a property change event corresponding to a change to the current value of the property with the given name param name the name of the property to be used as the property in the event object param old value the old value or code null code if not known or not relevant param new value the new value or code null code if not known or not relevant protected void fire property change event string name object old value object new value if name null throw new illegal argument exception object change listeners this listeners get listeners do we even need to fire an event if change listeners length 0 return final property change event pe new property change event this name old value new value for int i 0 i change listeners length i final i property change listener l i property change listener change listeners i i safe runnable job new i safe runnable public void handle exception throwable exception already being logged in platform run public void run throws exception l property change pe platform run job oldvalue newvalue firepropertychangeevent oldvalue newvalue illegalargumentexception changelisteners getlisteners changelisteners propertychangeevent propertychangeevent oldvalue newvalue changelisteners ipropertychangelistener ipropertychangelistener changelisteners isaferunnable isaferunnable handleexception propertychange final i property change listener l i property change listener change listeners i i safe runnable job new i safe runnable public void handle exception throwable exception already being logged in platform run ipropertychangelistener ipropertychangelistener changelisteners isaferunnable isaferunnable handleexception public void run throws exception l property change pe propertychange returns the current value of the boolean valued property with the given name returns the default default value code false code if there is no property with the given name or if the current value cannot be treated as a boolean the given name must not be code null code param name the name of the property return the boolean valued property public boolean get boolean string name string value properties get property name if value null return boolean default default return value equals preferences true getboolean getproperty boolean_default_default sets the current value of the boolean valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name boolean value boolean default value get default boolean name boolean old value get boolean name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name value preferences true preferences false if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name old value boolean true boolean false value boolean true boolean false settodefault setvalue defaultvalue getdefaultboolean oldvalue getboolean defaultvalue oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the boolean valued property with the given name returns the default default value code false code if there is no default property with the given name or if the default value cannot be treated as a boolean the given name must not be code null code param name the name of the property return the default value of the named property public boolean get default boolean string name string value default properties get property name if value null return boolean default default return value equals preferences true getdefaultboolean defaultproperties getproperty boolean_default_default sets the default value for the boolean valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name boolean value default properties put name value preferences true preferences false setdefault defaultproperties returns the current value of the double valued property with the given name returns the default default value code 0 0 code if there is no property with the given name or if the current value cannot be treated as a double the given name must not be code null code param name the name of the property return the double valued property public double get double string name return convert to double properties get property name double default default getdouble converttodouble getproperty double_default_default sets the current value of the double valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property must be a number not a nan public void set value string name double value if double is nan value throw new illegal argument exception double default value get default double name double old value get double name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name double to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new double old value new double value settodefault setvalue isnan illegalargumentexception defaultvalue getdefaultdouble oldvalue getdouble defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the double valued property with the given name returns the default default value code 0 0 code if there is no default property with the given name or if the default value cannot be treated as a double the given name must not be code null code param name the name of the property return the default value of the named property public double get default double string name return convert to double default properties get property name double default default getdefaultdouble converttodouble defaultproperties getproperty double_default_default sets the default value for the double valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property must be a number not a nan public void set default string name double value if double is nan value throw new illegal argument exception default properties put name double to string value setdefault isnan illegalargumentexception defaultproperties tostring converts the given raw property value string to a double param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to a double or the given code default value code if the raw value is code null code or cannot be parsed as a double private double convert to double string raw property value double default value double result default value if raw property value null try result double parse double raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttodouble rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parsedouble rawpropertyvalue numberformatexception returns the current value of the float valued property with the given name returns the default default value code 0 0f code if there is no property with the given name or if the current value cannot be treated as a float the given name must not be code null code param name the name of the property return the float valued property public float get float string name return convert to float properties get property name float default default getfloat converttofloat getproperty float_default_default sets the current value of the float valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property must be a number not a nan public void set value string name float value if float is nan value throw new illegal argument exception float default value get default float name float old value get float name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name float to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new float old value new float value settodefault setvalue isnan illegalargumentexception defaultvalue getdefaultfloat oldvalue getfloat defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the float valued property with the given name returns the default default value code 0 0f code if there is no default property with the given name or if the default value cannot be treated as a float the given name must not be code null code param name the name of the property return the default value of the named property public float get default float string name return convert to float default properties get property name float default default getdefaultfloat converttofloat defaultproperties getproperty float_default_default sets the default value for the float valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property must be a number not a nan public void set default string name float value if float is nan value throw new illegal argument exception default properties put name float to string value setdefault isnan illegalargumentexception defaultproperties tostring converts the given raw property value string to a float param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to a float or the given code default value code if the raw value is code null code or cannot be parsed as a float private float convert to float string raw property value float default value float result default value if raw property value null try result float parse float raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttofloat rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parsefloat rawpropertyvalue numberformatexception returns the current value of the integer valued property with the given name returns the default default value code 0 code if there is no property with the given name or if the current value cannot be treated as an integer the given name must not be code null code param name the name of the property return the int valued property public int get int string name return convert to int properties get property name int default default getint converttoint getproperty int_default_default sets the current value of the integer valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name int value int default value get default int name int old value get int name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name integer to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new integer old value new integer value settodefault setvalue defaultvalue getdefaultint oldvalue getint defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the integer valued property with the given name returns the default default value code 0 code if there is no default property with the given name or if the default value cannot be treated as an integer the given name must not be code null code param name the name of the property return the default value of the named property public int get default int string name return convert to int default properties get property name int default default getdefaultint converttoint defaultproperties getproperty int_default_default sets the default value for the integer valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name int value default properties put name integer to string value setdefault defaultproperties tostring converts the given raw property value string to an int param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to an int or the given code default value code if the raw value is code null code or cannot be parsed as an int private int convert to int string raw property value int default value int result default value if raw property value null try result integer parse int raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttoint rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parseint rawpropertyvalue numberformatexception returns the current value of the long valued property with the given name returns the default default value code 0l code if there is no property with the given name or if the current value cannot be treated as a long the given name must not be code null code param name the name of the property return the long valued property public long get long string name return convert to long properties get property name long default default getlong converttolong getproperty long_default_default sets the current value of the long valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name long value long default value get default long name long old value get long name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name long to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new long old value new long value settodefault setvalue defaultvalue getdefaultlong oldvalue getlong defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the long valued property with the given name returns the default default value code 0l code if there is no default property with the given name or if the default value cannot be treated as a long the given name must not be code null code param name the name of the property return the default value of the named property public long get default long string name return convert to long default properties get property name long default default getdefaultlong converttolong defaultproperties getproperty long_default_default sets the default value for the long valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name long value default properties put name long to string value setdefault defaultproperties tostring converts the given raw property value string to a long param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to a long or the given code default value code if the raw value is code null code or cannot be parsed as a long private long convert to long string raw property value long default value long result default value if raw property value null try result long parse long raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttolong rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parselong rawpropertyvalue numberformatexception returns the current value of the string valued property with the given name returns the default default value the empty string code code if there is no property with the given name the given name must not be code null code param name the name of the property return the string valued property public string get string string name string value properties get property name return value null value string default default getstring getproperty string_default_default sets the current value of the string valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name string value if value null throw new illegal argument exception string default value get default string name string old value get string name if value equals default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name value if old value equals value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name old value value settodefault setvalue illegalargumentexception defaultvalue getdefaultstring oldvalue getstring defaultvalue oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the string valued property with the given name returns the default default value the empty string code code is no default property with the given name or if the default value cannot be treated as a string the given name must not be code null code param name the name of the property return the default value of the named property public string get default string string name string value default properties get property name return value null value string default default getdefaultstring defaultproperties getproperty string_default_default sets the default value for the string valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name string value if value null throw new illegal argument exception default properties put name value setdefault illegalargumentexception defaultproperties returns whether the property with the given name has the default value in virtue of having no explicitly set value returns code false code if the given name is code null code param name the name of the property or code null code return code true code if the property has no explicitly set value and code false code otherwise including the case where the property is unknown to this object public boolean is default string name return properties contains key name isdefault containskey sets the current value of the property with the given name back to its default value has no effect if the property does not have its own current value the given name must not be code null code p note that the recommended way of re initializing a property to the appropriate default value is to call code set to default code this is implemented by removing the named value from the object thereby exposing the default value p p a property change event is always reported in the event object the property name is the name of the property and the old and new values are either strings or code null code indicating the default default value p param name the name of the property public void set to default string name object old property value properties remove name if old property value null dirty true string new value default properties get property name null n b new value null if there is no default value can t determine correct default default without knowing type fire property change event name old property value new value settodefault settodefault oldpropertyvalue oldpropertyvalue newvalue defaultproperties getproperty newvalue firepropertychangeevent oldpropertyvalue newvalue returns a list of all properties known to this preference object which have current values other than their default value return an array of property names public string property names return string properties key set to array empty string array propertynames keyset toarray empty_string_array returns a list of all properties known to this preference object which have an explicit default value set return an array of property names public string default property names return string default properties key set to array empty string array defaultpropertynames defaultproperties keyset toarray empty_string_array returns whether the current values in this preference object require saving return code true code if at least one of the properties known to this preference object has a current value different from its default value and code false code otherwise public boolean needs saving return dirty needssaving saves the non default valued properties known to this preference object to the given output stream using code properties store output stream string code p note that the output is unconditionally written even when code needs saving code is code false code p param out the output stream param header a comment to be included in the output or code null code if none exception io exception if there is a problem saving this preference object see properties store output stream string public void store output stream out string header throws io exception properties store out header dirty false outputstream needssaving ioexception outputstream outputstream ioexception loads the non default valued properties for this preference object from the given input stream using code java util properties load input stream code default property values are not affected param in the input stream exception io exception if there is a problem loading this preference object see java util properties load input stream public void load input stream in throws io exception properties load in dirty false inputstream ioexception inputstream inputstream ioexception creates a new property change event param source the object whose property has changed param property the property that has changed must not be code null code param old value the old value of the property or code null code if none param new value the new value of the property or code null code if none protected property change event object source string property object old value object new value super source if property null throw new illegal argument exception this property name property this old value old value this new value new value oldvalue newvalue propertychangeevent oldvalue newvalue illegalargumentexception propertyname oldvalue oldvalue newvalue newvalue returns the name of the property that changed p warning there is no guarantee that the property name returned is a constant string callers must compare property names using code equals code not p return the name of the property that changed public string get property return property name getproperty propertyname returns the new value of the property return the new value or code null code if not known or not relevant public object get new value return new value getnewvalue newvalue returns the old value of the property return the old value or code null code if not known or not relevant public object get old value return old value getoldvalue oldvalue notification that a property has changed p this method gets called when the observed object fires a property change event p param event the property change event object describing which property changed and how exports all non default valued preferences for all installed plugins to the provided file if a file already exists at the given location it will be deleted if there are no preferences to export no file will be written p the file that is written can be read later using the import preferences method p param path the absolute file system path of the file to export preferences to exception core exception if this method fails reasons include ul li the file could not be written li ul see import preferences i path see validate preference versions i path public static void export preferences i path path throws core exception file file path to file if file exists file delete file get parent file mkdirs i preferences service service platform get preferences service output stream output null file output stream fos null try fos new file output stream file output new buffered output stream fos i eclipse preferences node i eclipse preferences service get root node node plugin plugin preference scope service export preferences node output string null output flush fos getfd sync catch io exception e string message nls bind messages preferences errorwriting file e get message i status status new status i status error platform pi runtime i status error message e throw new core exception status finally if output null try output close catch io exception e ignore importpreferences coreexception importpreferences ipath validatepreferenceversions ipath exportpreferences ipath coreexception tofile getparentfile ipreferencesservice getpreferencesservice outputstream fileoutputstream fileoutputstream bufferedoutputstream ieclipsepreferences ieclipsepreferences getrootnode plugin_preference_scope exportpreferences ioexception preferences_errorwriting getmessage istatus istatus pi_runtime istatus coreexception ioexception loads the plugin preferences from the given file and replaces all non default valued preferences for all plugins with the values from this file p if the file contains preferences for plug ins that don t exist in the current install they are ignored this method does not validate if the plug in versions in the preference file match the currently installed plug ins clients should first call validate preference versions on the file to ensure that the versions are compatible p p the file must have been written by the export preferences method p param path the absolute file system path of the file to import preferences from exception core exception if this method fails reasons include ul li the file does not exist li li the file could not be read li ul see export preferences i path see validate preference versions i path public static void import preferences i path path throws core exception if path to file exists string msg nls bind messages preferences filenotfound path toos string throw new core exception new status i status error platform pi runtime 1 msg null i preferences service service platform get preferences service input stream input null try input new buffered input stream new file input stream path to file service import preferences input catch file not found exception e string msg nls bind messages preferences filenotfound path toos string throw new core exception new status i status error platform pi runtime 1 msg e finally if input null try input close catch io exception e ignore validatepreferenceversions exportpreferences coreexception exportpreferences ipath validatepreferenceversions ipath importpreferences ipath coreexception tofile preferences_filenotfound toosstring coreexception istatus pi_runtime ipreferencesservice getpreferencesservice inputstream bufferedinputstream fileinputstream tofile importpreferences filenotfoundexception preferences_filenotfound toosstring coreexception istatus pi_runtime ioexception validates that the preference versions in the given file match the versions of the currently installed plugins returns an ok status if all preferences match the currently installed plugins otherwise a multi status describing what plugins have preferences that don t match p if the returned status has a code i status warning code severity it means that some preferences may not be applicable but for the most part they will be compatible if the returned status has a code i status error code severity it means that the preferences will probably not be compatible p if the file contains preferences for plug ins that don t exist in the current install they are ignored p p the file must have been written by the export preferences method p param file the absolute file system path of the preference file to validate see export preferences i path see import preferences i path public static i status validate preference versions i path file preferences service service preferences service platform get preferences service return service validate versions file multistatus istatus istatus exportpreferences exportpreferences ipath importpreferences ipath istatus validatepreferenceversions ipath preferencesservice preferencesservice getpreferencesservice validateversions creates an empty preference table p use the methods code load input stream code and code store input stream code to load and store these preferences p see load input stream see store output stream string public preferences default properties new properties properties new properties default properties inputstream inputstream inputstream outputstream defaultproperties defaultproperties adds a property change listener to this preference object has no affect if the identical listener is already registered p em note em depending on the means in which the property values changed the old and new values for the property can be either typed a string representation of the value or code null code clients who wish to behave properly in all cases should all three cases in their implementation of the property change listener p param listener a property change listener public void add property change listener i property change listener listener listeners add listener addpropertychangelistener ipropertychangelistener removes the given listener from this preference object has no affect if the listener is not registered param listener a property change listener public void remove property change listener i property change listener listener listeners remove listener removepropertychangelistener ipropertychangelistener returns whether the given property is known to this preference object either by having an explicit setting or by having a default setting returns code false code if the given name is code null code param name the name of the property or code null code return code true code if either a current value or a default value is known for the named property and code false code otherwise public boolean contains string name return properties contains key name default properties contains key name containskey defaultproperties containskey fires a property change event corresponding to a change to the current value of the property with the given name param name the name of the property to be used as the property in the event object param old value the old value or code null code if not known or not relevant param new value the new value or code null code if not known or not relevant protected void fire property change event string name object old value object new value if name null throw new illegal argument exception object change listeners this listeners get listeners do we even need to fire an event if change listeners length 0 return final property change event pe new property change event this name old value new value for int i 0 i change listeners length i final i property change listener l i property change listener change listeners i i safe runnable job new i safe runnable public void handle exception throwable exception already being logged in platform run public void run throws exception l property change pe platform run job oldvalue newvalue firepropertychangeevent oldvalue newvalue illegalargumentexception changelisteners getlisteners changelisteners propertychangeevent propertychangeevent oldvalue newvalue changelisteners ipropertychangelistener ipropertychangelistener changelisteners isaferunnable isaferunnable handleexception propertychange final i property change listener l i property change listener change listeners i i safe runnable job new i safe runnable public void handle exception throwable exception already being logged in platform run ipropertychangelistener ipropertychangelistener changelisteners isaferunnable isaferunnable handleexception public void run throws exception l property change pe propertychange returns the current value of the boolean valued property with the given name returns the default default value code false code if there is no property with the given name or if the current value cannot be treated as a boolean the given name must not be code null code param name the name of the property return the boolean valued property public boolean get boolean string name string value properties get property name if value null return boolean default default return value equals preferences true getboolean getproperty boolean_default_default sets the current value of the boolean valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name boolean value boolean default value get default boolean name boolean old value get boolean name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name value preferences true preferences false if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name old value boolean true boolean false value boolean true boolean false settodefault setvalue defaultvalue getdefaultboolean oldvalue getboolean defaultvalue oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the boolean valued property with the given name returns the default default value code false code if there is no default property with the given name or if the default value cannot be treated as a boolean the given name must not be code null code param name the name of the property return the default value of the named property public boolean get default boolean string name string value default properties get property name if value null return boolean default default return value equals preferences true getdefaultboolean defaultproperties getproperty boolean_default_default sets the default value for the boolean valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name boolean value default properties put name value preferences true preferences false setdefault defaultproperties returns the current value of the double valued property with the given name returns the default default value code 0 0 code if there is no property with the given name or if the current value cannot be treated as a double the given name must not be code null code param name the name of the property return the double valued property public double get double string name return convert to double properties get property name double default default getdouble converttodouble getproperty double_default_default sets the current value of the double valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property must be a number not a nan public void set value string name double value if double is nan value throw new illegal argument exception double default value get default double name double old value get double name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name double to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new double old value new double value settodefault setvalue isnan illegalargumentexception defaultvalue getdefaultdouble oldvalue getdouble defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the double valued property with the given name returns the default default value code 0 0 code if there is no default property with the given name or if the default value cannot be treated as a double the given name must not be code null code param name the name of the property return the default value of the named property public double get default double string name return convert to double default properties get property name double default default getdefaultdouble converttodouble defaultproperties getproperty double_default_default sets the default value for the double valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property must be a number not a nan public void set default string name double value if double is nan value throw new illegal argument exception default properties put name double to string value setdefault isnan illegalargumentexception defaultproperties tostring converts the given raw property value string to a double param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to a double or the given code default value code if the raw value is code null code or cannot be parsed as a double private double convert to double string raw property value double default value double result default value if raw property value null try result double parse double raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttodouble rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parsedouble rawpropertyvalue numberformatexception returns the current value of the float valued property with the given name returns the default default value code 0 0f code if there is no property with the given name or if the current value cannot be treated as a float the given name must not be code null code param name the name of the property return the float valued property public float get float string name return convert to float properties get property name float default default getfloat converttofloat getproperty float_default_default sets the current value of the float valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property must be a number not a nan public void set value string name float value if float is nan value throw new illegal argument exception float default value get default float name float old value get float name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name float to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new float old value new float value settodefault setvalue isnan illegalargumentexception defaultvalue getdefaultfloat oldvalue getfloat defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the float valued property with the given name returns the default default value code 0 0f code if there is no default property with the given name or if the default value cannot be treated as a float the given name must not be code null code param name the name of the property return the default value of the named property public float get default float string name return convert to float default properties get property name float default default getdefaultfloat converttofloat defaultproperties getproperty float_default_default sets the default value for the float valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property must be a number not a nan public void set default string name float value if float is nan value throw new illegal argument exception default properties put name float to string value setdefault isnan illegalargumentexception defaultproperties tostring converts the given raw property value string to a float param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to a float or the given code default value code if the raw value is code null code or cannot be parsed as a float private float convert to float string raw property value float default value float result default value if raw property value null try result float parse float raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttofloat rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parsefloat rawpropertyvalue numberformatexception returns the current value of the integer valued property with the given name returns the default default value code 0 code if there is no property with the given name or if the current value cannot be treated as an integer the given name must not be code null code param name the name of the property return the int valued property public int get int string name return convert to int properties get property name int default default getint converttoint getproperty int_default_default sets the current value of the integer valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name int value int default value get default int name int old value get int name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name integer to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new integer old value new integer value settodefault setvalue defaultvalue getdefaultint oldvalue getint defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the integer valued property with the given name returns the default default value code 0 code if there is no default property with the given name or if the default value cannot be treated as an integer the given name must not be code null code param name the name of the property return the default value of the named property public int get default int string name return convert to int default properties get property name int default default getdefaultint converttoint defaultproperties getproperty int_default_default sets the default value for the integer valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name int value default properties put name integer to string value setdefault defaultproperties tostring converts the given raw property value string to an int param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to an int or the given code default value code if the raw value is code null code or cannot be parsed as an int private int convert to int string raw property value int default value int result default value if raw property value null try result integer parse int raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttoint rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parseint rawpropertyvalue numberformatexception returns the current value of the long valued property with the given name returns the default default value code 0l code if there is no property with the given name or if the current value cannot be treated as a long the given name must not be code null code param name the name of the property return the long valued property public long get long string name return convert to long properties get property name long default default getlong converttolong getproperty long_default_default sets the current value of the long valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name long value long default value get default long name long old value get long name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name long to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new long old value new long value settodefault setvalue defaultvalue getdefaultlong oldvalue getlong defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the long valued property with the given name returns the default default value code 0l code if there is no default property with the given name or if the default value cannot be treated as a long the given name must not be code null code param name the name of the property return the default value of the named property public long get default long string name return convert to long default properties get property name long default default getdefaultlong converttolong defaultproperties getproperty long_default_default sets the default value for the long valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name long value default properties put name long to string value setdefault defaultproperties tostring converts the given raw property value string to a long param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to a long or the given code default value code if the raw value is code null code or cannot be parsed as a long private long convert to long string raw property value long default value long result default value if raw property value null try result long parse long raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttolong rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parselong rawpropertyvalue numberformatexception returns the current value of the string valued property with the given name returns the default default value the empty string code code if there is no property with the given name the given name must not be code null code param name the name of the property return the string valued property public string get string string name string value properties get property name return value null value string default default getstring getproperty string_default_default sets the current value of the string valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name string value if value null throw new illegal argument exception string default value get default string name string old value get string name if value equals default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name value if old value equals value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name old value value settodefault setvalue illegalargumentexception defaultvalue getdefaultstring oldvalue getstring defaultvalue oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the string valued property with the given name returns the default default value the empty string code code is no default property with the given name or if the default value cannot be treated as a string the given name must not be code null code param name the name of the property return the default value of the named property public string get default string string name string value default properties get property name return value null value string default default getdefaultstring defaultproperties getproperty string_default_default sets the default value for the string valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name string value if value null throw new illegal argument exception default properties put name value setdefault illegalargumentexception defaultproperties returns whether the property with the given name has the default value in virtue of having no explicitly set value returns code false code if the given name is code null code param name the name of the property or code null code return code true code if the property has no explicitly set value and code false code otherwise including the case where the property is unknown to this object public boolean is default string name return properties contains key name isdefault containskey sets the current value of the property with the given name back to its default value has no effect if the property does not have its own current value the given name must not be code null code p note that the recommended way of re initializing a property to the appropriate default value is to call code set to default code this is implemented by removing the named value from the object thereby exposing the default value p p a property change event is always reported in the event object the property name is the name of the property and the old and new values are either strings or code null code indicating the default default value p param name the name of the property public void set to default string name object old property value properties remove name if old property value null dirty true string new value default properties get property name null n b new value null if there is no default value can t determine correct default default without knowing type fire property change event name old property value new value settodefault settodefault oldpropertyvalue oldpropertyvalue newvalue defaultproperties getproperty newvalue firepropertychangeevent oldpropertyvalue newvalue returns a list of all properties known to this preference object which have current values other than their default value return an array of property names public string property names return string properties key set to array empty string array propertynames keyset toarray empty_string_array returns a list of all properties known to this preference object which have an explicit default value set return an array of property names public string default property names return string default properties key set to array empty string array defaultpropertynames defaultproperties keyset toarray empty_string_array returns whether the current values in this preference object require saving return code true code if at least one of the properties known to this preference object has a current value different from its default value and code false code otherwise public boolean needs saving return dirty needssaving saves the non default valued properties known to this preference object to the given output stream using code properties store output stream string code p note that the output is unconditionally written even when code needs saving code is code false code p param out the output stream param header a comment to be included in the output or code null code if none exception io exception if there is a problem saving this preference object see properties store output stream string public void store output stream out string header throws io exception properties store out header dirty false outputstream needssaving ioexception outputstream outputstream ioexception loads the non default valued properties for this preference object from the given input stream using code java util properties load input stream code default property values are not affected param in the input stream exception io exception if there is a problem loading this preference object see java util properties load input stream public void load input stream in throws io exception properties load in dirty false inputstream ioexception inputstream inputstream ioexception creates a new property change event param source the object whose property has changed param property the property that has changed must not be code null code param old value the old value of the property or code null code if none param new value the new value of the property or code null code if none protected property change event object source string property object old value object new value super source if property null throw new illegal argument exception this property name property this old value old value this new value new value oldvalue newvalue propertychangeevent oldvalue newvalue illegalargumentexception propertyname oldvalue oldvalue newvalue newvalue returns the name of the property that changed p warning there is no guarantee that the property name returned is a constant string callers must compare property names using code equals code not p return the name of the property that changed public string get property return property name getproperty propertyname returns the new value of the property return the new value or code null code if not known or not relevant public object get new value return new value getnewvalue newvalue returns the old value of the property return the old value or code null code if not known or not relevant public object get old value return old value getoldvalue oldvalue notification that a property has changed p this method gets called when the observed object fires a property change event p param event the property change event object describing which property changed and how exports all non default valued preferences for all installed plugins to the provided file if a file already exists at the given location it will be deleted if there are no preferences to export no file will be written p the file that is written can be read later using the import preferences method p param path the absolute file system path of the file to export preferences to exception core exception if this method fails reasons include ul li the file could not be written li ul see import preferences i path see validate preference versions i path public static void export preferences i path path throws core exception file file path to file if file exists file delete file get parent file mkdirs i preferences service service platform get preferences service output stream output null file output stream fos null try fos new file output stream file output new buffered output stream fos i eclipse preferences node i eclipse preferences service get root node node plugin plugin preference scope service export preferences node output string null output flush fos getfd sync catch io exception e string message nls bind messages preferences errorwriting file e get message i status status new status i status error platform pi runtime i status error message e throw new core exception status finally if output null try output close catch io exception e ignore importpreferences coreexception importpreferences ipath validatepreferenceversions ipath exportpreferences ipath coreexception tofile getparentfile ipreferencesservice getpreferencesservice outputstream fileoutputstream fileoutputstream bufferedoutputstream ieclipsepreferences ieclipsepreferences getrootnode plugin_preference_scope exportpreferences ioexception preferences_errorwriting getmessage istatus istatus pi_runtime istatus coreexception ioexception loads the plugin preferences from the given file and replaces all non default valued preferences for all plugins with the values from this file p if the file contains preferences for plug ins that don t exist in the current install they are ignored this method does not validate if the plug in versions in the preference file match the currently installed plug ins clients should first call validate preference versions on the file to ensure that the versions are compatible p p the file must have been written by the export preferences method p param path the absolute file system path of the file to import preferences from exception core exception if this method fails reasons include ul li the file does not exist li li the file could not be read li ul see export preferences i path see validate preference versions i path public static void import preferences i path path throws core exception if path to file exists string msg nls bind messages preferences filenotfound path toos string throw new core exception new status i status error platform pi runtime 1 msg null i preferences service service platform get preferences service input stream input null try input new buffered input stream new file input stream path to file service import preferences input catch file not found exception e string msg nls bind messages preferences filenotfound path toos string throw new core exception new status i status error platform pi runtime 1 msg e finally if input null try input close catch io exception e ignore validatepreferenceversions exportpreferences coreexception exportpreferences ipath validatepreferenceversions ipath importpreferences ipath coreexception tofile preferences_filenotfound toosstring coreexception istatus pi_runtime ipreferencesservice getpreferencesservice inputstream bufferedinputstream fileinputstream tofile importpreferences filenotfoundexception preferences_filenotfound toosstring coreexception istatus pi_runtime ioexception validates that the preference versions in the given file match the versions of the currently installed plugins returns an ok status if all preferences match the currently installed plugins otherwise a multi status describing what plugins have preferences that don t match p if the returned status has a code i status warning code severity it means that some preferences may not be applicable but for the most part they will be compatible if the returned status has a code i status error code severity it means that the preferences will probably not be compatible p if the file contains preferences for plug ins that don t exist in the current install they are ignored p p the file must have been written by the export preferences method p param file the absolute file system path of the preference file to validate see export preferences i path see import preferences i path public static i status validate preference versions i path file preferences service service preferences service platform get preferences service return service validate versions file multistatus istatus istatus exportpreferences exportpreferences ipath importpreferences ipath istatus validatepreferenceversions ipath preferencesservice preferencesservice getpreferencesservice validateversions creates an empty preference table p use the methods code load input stream code and code store input stream code to load and store these preferences p see load input stream see store output stream string public preferences default properties new properties properties new properties default properties inputstream inputstream inputstream outputstream defaultproperties defaultproperties adds a property change listener to this preference object has no affect if the identical listener is already registered p em note em depending on the means in which the property values changed the old and new values for the property can be either typed a string representation of the value or code null code clients who wish to behave properly in all cases should all three cases in their implementation of the property change listener p param listener a property change listener public void add property change listener i property change listener listener listeners add listener addpropertychangelistener ipropertychangelistener removes the given listener from this preference object has no affect if the listener is not registered param listener a property change listener public void remove property change listener i property change listener listener listeners remove listener removepropertychangelistener ipropertychangelistener returns whether the given property is known to this preference object either by having an explicit setting or by having a default setting returns code false code if the given name is code null code param name the name of the property or code null code return code true code if either a current value or a default value is known for the named property and code false code otherwise public boolean contains string name return properties contains key name default properties contains key name containskey defaultproperties containskey fires a property change event corresponding to a change to the current value of the property with the given name param name the name of the property to be used as the property in the event object param old value the old value or code null code if not known or not relevant param new value the new value or code null code if not known or not relevant protected void fire property change event string name object old value object new value if name null throw new illegal argument exception object change listeners this listeners get listeners do we even need to fire an event if change listeners length 0 return final property change event pe new property change event this name old value new value for int i 0 i change listeners length i final i property change listener l i property change listener change listeners i i safe runnable job new i safe runnable public void handle exception throwable exception already being logged in platform run public void run throws exception l property change pe platform run job oldvalue newvalue firepropertychangeevent oldvalue newvalue illegalargumentexception changelisteners getlisteners changelisteners propertychangeevent propertychangeevent oldvalue newvalue changelisteners ipropertychangelistener ipropertychangelistener changelisteners isaferunnable isaferunnable handleexception propertychange final i property change listener l i property change listener change listeners i i safe runnable job new i safe runnable public void handle exception throwable exception already being logged in platform run ipropertychangelistener ipropertychangelistener changelisteners isaferunnable isaferunnable handleexception public void run throws exception l property change pe propertychange returns the current value of the boolean valued property with the given name returns the default default value code false code if there is no property with the given name or if the current value cannot be treated as a boolean the given name must not be code null code param name the name of the property return the boolean valued property public boolean get boolean string name string value properties get property name if value null return boolean default default return value equals preferences true getboolean getproperty boolean_default_default sets the current value of the boolean valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name boolean value boolean default value get default boolean name boolean old value get boolean name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name value preferences true preferences false if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name old value boolean true boolean false value boolean true boolean false settodefault setvalue defaultvalue getdefaultboolean oldvalue getboolean defaultvalue oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the boolean valued property with the given name returns the default default value code false code if there is no default property with the given name or if the default value cannot be treated as a boolean the given name must not be code null code param name the name of the property return the default value of the named property public boolean get default boolean string name string value default properties get property name if value null return boolean default default return value equals preferences true getdefaultboolean defaultproperties getproperty boolean_default_default sets the default value for the boolean valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name boolean value default properties put name value preferences true preferences false setdefault defaultproperties returns the current value of the double valued property with the given name returns the default default value code 0 0 code if there is no property with the given name or if the current value cannot be treated as a double the given name must not be code null code param name the name of the property return the double valued property public double get double string name return convert to double properties get property name double default default getdouble converttodouble getproperty double_default_default sets the current value of the double valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property must be a number not a nan public void set value string name double value if double is nan value throw new illegal argument exception double default value get default double name double old value get double name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name double to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new double old value new double value settodefault setvalue isnan illegalargumentexception defaultvalue getdefaultdouble oldvalue getdouble defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the double valued property with the given name returns the default default value code 0 0 code if there is no default property with the given name or if the default value cannot be treated as a double the given name must not be code null code param name the name of the property return the default value of the named property public double get default double string name return convert to double default properties get property name double default default getdefaultdouble converttodouble defaultproperties getproperty double_default_default sets the default value for the double valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property must be a number not a nan public void set default string name double value if double is nan value throw new illegal argument exception default properties put name double to string value setdefault isnan illegalargumentexception defaultproperties tostring converts the given raw property value string to a double param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to a double or the given code default value code if the raw value is code null code or cannot be parsed as a double private double convert to double string raw property value double default value double result default value if raw property value null try result double parse double raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttodouble rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parsedouble rawpropertyvalue numberformatexception returns the current value of the float valued property with the given name returns the default default value code 0 0f code if there is no property with the given name or if the current value cannot be treated as a float the given name must not be code null code param name the name of the property return the float valued property public float get float string name return convert to float properties get property name float default default getfloat converttofloat getproperty float_default_default sets the current value of the float valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property must be a number not a nan public void set value string name float value if float is nan value throw new illegal argument exception float default value get default float name float old value get float name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name float to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new float old value new float value settodefault setvalue isnan illegalargumentexception defaultvalue getdefaultfloat oldvalue getfloat defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the float valued property with the given name returns the default default value code 0 0f code if there is no default property with the given name or if the default value cannot be treated as a float the given name must not be code null code param name the name of the property return the default value of the named property public float get default float string name return convert to float default properties get property name float default default getdefaultfloat converttofloat defaultproperties getproperty float_default_default sets the default value for the float valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property must be a number not a nan public void set default string name float value if float is nan value throw new illegal argument exception default properties put name float to string value setdefault isnan illegalargumentexception defaultproperties tostring converts the given raw property value string to a float param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to a float or the given code default value code if the raw value is code null code or cannot be parsed as a float private float convert to float string raw property value float default value float result default value if raw property value null try result float parse float raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttofloat rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parsefloat rawpropertyvalue numberformatexception returns the current value of the integer valued property with the given name returns the default default value code 0 code if there is no property with the given name or if the current value cannot be treated as an integer the given name must not be code null code param name the name of the property return the int valued property public int get int string name return convert to int properties get property name int default default getint converttoint getproperty int_default_default sets the current value of the integer valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name int value int default value get default int name int old value get int name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name integer to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new integer old value new integer value settodefault setvalue defaultvalue getdefaultint oldvalue getint defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the integer valued property with the given name returns the default default value code 0 code if there is no default property with the given name or if the default value cannot be treated as an integer the given name must not be code null code param name the name of the property return the default value of the named property public int get default int string name return convert to int default properties get property name int default default getdefaultint converttoint defaultproperties getproperty int_default_default sets the default value for the integer valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name int value default properties put name integer to string value setdefault defaultproperties tostring converts the given raw property value string to an int param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to an int or the given code default value code if the raw value is code null code or cannot be parsed as an int private int convert to int string raw property value int default value int result default value if raw property value null try result integer parse int raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttoint rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parseint rawpropertyvalue numberformatexception returns the current value of the long valued property with the given name returns the default default value code 0l code if there is no property with the given name or if the current value cannot be treated as a long the given name must not be code null code param name the name of the property return the long valued property public long get long string name return convert to long properties get property name long default default getlong converttolong getproperty long_default_default sets the current value of the long valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name long value long default value get default long name long old value get long name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name long to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new long old value new long value settodefault setvalue defaultvalue getdefaultlong oldvalue getlong defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the long valued property with the given name returns the default default value code 0l code if there is no default property with the given name or if the default value cannot be treated as a long the given name must not be code null code param name the name of the property return the default value of the named property public long get default long string name return convert to long default properties get property name long default default getdefaultlong converttolong defaultproperties getproperty long_default_default sets the default value for the long valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name long value default properties put name long to string value setdefault defaultproperties tostring converts the given raw property value string to a long param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to a long or the given code default value code if the raw value is code null code or cannot be parsed as a long private long convert to long string raw property value long default value long result default value if raw property value null try result long parse long raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttolong rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parselong rawpropertyvalue numberformatexception returns the current value of the string valued property with the given name returns the default default value the empty string code code if there is no property with the given name the given name must not be code null code param name the name of the property return the string valued property public string get string string name string value properties get property name return value null value string default default getstring getproperty string_default_default sets the current value of the string valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name string value if value null throw new illegal argument exception string default value get default string name string old value get string name if value equals default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name value if old value equals value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name old value value settodefault setvalue illegalargumentexception defaultvalue getdefaultstring oldvalue getstring defaultvalue oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the string valued property with the given name returns the default default value the empty string code code is no default property with the given name or if the default value cannot be treated as a string the given name must not be code null code param name the name of the property return the default value of the named property public string get default string string name string value default properties get property name return value null value string default default getdefaultstring defaultproperties getproperty string_default_default sets the default value for the string valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name string value if value null throw new illegal argument exception default properties put name value setdefault illegalargumentexception defaultproperties returns whether the property with the given name has the default value in virtue of having no explicitly set value returns code false code if the given name is code null code param name the name of the property or code null code return code true code if the property has no explicitly set value and code false code otherwise including the case where the property is unknown to this object public boolean is default string name return properties contains key name isdefault containskey sets the current value of the property with the given name back to its default value has no effect if the property does not have its own current value the given name must not be code null code p note that the recommended way of re initializing a property to the appropriate default value is to call code set to default code this is implemented by removing the named value from the object thereby exposing the default value p p a property change event is always reported in the event object the property name is the name of the property and the old and new values are either strings or code null code indicating the default default value p param name the name of the property public void set to default string name object old property value properties remove name if old property value null dirty true string new value default properties get property name null n b new value null if there is no default value can t determine correct default default without knowing type fire property change event name old property value new value settodefault settodefault oldpropertyvalue oldpropertyvalue newvalue defaultproperties getproperty newvalue firepropertychangeevent oldpropertyvalue newvalue returns a list of all properties known to this preference object which have current values other than their default value return an array of property names public string property names return string properties key set to array empty string array propertynames keyset toarray empty_string_array returns a list of all properties known to this preference object which have an explicit default value set return an array of property names public string default property names return string default properties key set to array empty string array defaultpropertynames defaultproperties keyset toarray empty_string_array returns whether the current values in this preference object require saving return code true code if at least one of the properties known to this preference object has a current value different from its default value and code false code otherwise public boolean needs saving return dirty needssaving saves the non default valued properties known to this preference object to the given output stream using code properties store output stream string code p note that the output is unconditionally written even when code needs saving code is code false code p param out the output stream param header a comment to be included in the output or code null code if none exception io exception if there is a problem saving this preference object see properties store output stream string public void store output stream out string header throws io exception properties store out header dirty false outputstream needssaving ioexception outputstream outputstream ioexception loads the non default valued properties for this preference object from the given input stream using code java util properties load input stream code default property values are not affected param in the input stream exception io exception if there is a problem loading this preference object see java util properties load input stream public void load input stream in throws io exception properties load in dirty false inputstream ioexception inputstream inputstream ioexception creates a new property change event param source the object whose property has changed param property the property that has changed must not be code null code param old value the old value of the property or code null code if none param new value the new value of the property or code null code if none protected property change event object source string property object old value object new value super source if property null throw new illegal argument exception this property name property this old value old value this new value new value oldvalue newvalue propertychangeevent oldvalue newvalue illegalargumentexception propertyname oldvalue oldvalue newvalue newvalue returns the name of the property that changed p warning there is no guarantee that the property name returned is a constant string callers must compare property names using code equals code not p return the name of the property that changed public string get property return property name getproperty propertyname returns the new value of the property return the new value or code null code if not known or not relevant public object get new value return new value getnewvalue newvalue returns the old value of the property return the old value or code null code if not known or not relevant public object get old value return old value getoldvalue oldvalue notification that a property has changed p this method gets called when the observed object fires a property change event p param event the property change event object describing which property changed and how exports all non default valued preferences for all installed plugins to the provided file if a file already exists at the given location it will be deleted if there are no preferences to export no file will be written p the file that is written can be read later using the import preferences method p param path the absolute file system path of the file to export preferences to exception core exception if this method fails reasons include ul li the file could not be written li ul see import preferences i path see validate preference versions i path public static void export preferences i path path throws core exception file file path to file if file exists file delete file get parent file mkdirs i preferences service service platform get preferences service output stream output null file output stream fos null try fos new file output stream file output new buffered output stream fos i eclipse preferences node i eclipse preferences service get root node node plugin plugin preference scope service export preferences node output string null output flush fos getfd sync catch io exception e string message nls bind messages preferences errorwriting file e get message i status status new status i status error platform pi runtime i status error message e throw new core exception status finally if output null try output close catch io exception e ignore importpreferences coreexception importpreferences ipath validatepreferenceversions ipath exportpreferences ipath coreexception tofile getparentfile ipreferencesservice getpreferencesservice outputstream fileoutputstream fileoutputstream bufferedoutputstream ieclipsepreferences ieclipsepreferences getrootnode plugin_preference_scope exportpreferences ioexception preferences_errorwriting getmessage istatus istatus pi_runtime istatus coreexception ioexception loads the plugin preferences from the given file and replaces all non default valued preferences for all plugins with the values from this file p if the file contains preferences for plug ins that don t exist in the current install they are ignored this method does not validate if the plug in versions in the preference file match the currently installed plug ins clients should first call validate preference versions on the file to ensure that the versions are compatible p p the file must have been written by the export preferences method p param path the absolute file system path of the file to import preferences from exception core exception if this method fails reasons include ul li the file does not exist li li the file could not be read li ul see export preferences i path see validate preference versions i path public static void import preferences i path path throws core exception if path to file exists string msg nls bind messages preferences filenotfound path toos string throw new core exception new status i status error platform pi runtime 1 msg null i preferences service service platform get preferences service input stream input null try input new buffered input stream new file input stream path to file service import preferences input catch file not found exception e string msg nls bind messages preferences filenotfound path toos string throw new core exception new status i status error platform pi runtime 1 msg e finally if input null try input close catch io exception e ignore validatepreferenceversions exportpreferences coreexception exportpreferences ipath validatepreferenceversions ipath importpreferences ipath coreexception tofile preferences_filenotfound toosstring coreexception istatus pi_runtime ipreferencesservice getpreferencesservice inputstream bufferedinputstream fileinputstream tofile importpreferences filenotfoundexception preferences_filenotfound toosstring coreexception istatus pi_runtime ioexception validates that the preference versions in the given file match the versions of the currently installed plugins returns an ok status if all preferences match the currently installed plugins otherwise a multi status describing what plugins have preferences that don t match p if the returned status has a code i status warning code severity it means that some preferences may not be applicable but for the most part they will be compatible if the returned status has a code i status error code severity it means that the preferences will probably not be compatible p if the file contains preferences for plug ins that don t exist in the current install they are ignored p p the file must have been written by the export preferences method p param file the absolute file system path of the preference file to validate see export preferences i path see import preferences i path public static i status validate preference versions i path file preferences service service preferences service platform get preferences service return service validate versions file multistatus istatus istatus exportpreferences exportpreferences ipath importpreferences ipath istatus validatepreferenceversions ipath preferencesservice preferencesservice getpreferencesservice validateversions creates an empty preference table p use the methods code load input stream code and code store input stream code to load and store these preferences p see load input stream see store output stream string public preferences default properties new properties properties new properties default properties inputstream inputstream inputstream outputstream defaultproperties defaultproperties adds a property change listener to this preference object has no affect if the identical listener is already registered p em note em depending on the means in which the property values changed the old and new values for the property can be either typed a string representation of the value or code null code clients who wish to behave properly in all cases should all three cases in their implementation of the property change listener p param listener a property change listener public void add property change listener i property change listener listener listeners add listener addpropertychangelistener ipropertychangelistener removes the given listener from this preference object has no affect if the listener is not registered param listener a property change listener public void remove property change listener i property change listener listener listeners remove listener removepropertychangelistener ipropertychangelistener returns whether the given property is known to this preference object either by having an explicit setting or by having a default setting returns code false code if the given name is code null code param name the name of the property or code null code return code true code if either a current value or a default value is known for the named property and code false code otherwise public boolean contains string name return properties contains key name default properties contains key name containskey defaultproperties containskey fires a property change event corresponding to a change to the current value of the property with the given name param name the name of the property to be used as the property in the event object param old value the old value or code null code if not known or not relevant param new value the new value or code null code if not known or not relevant protected void fire property change event string name object old value object new value if name null throw new illegal argument exception object change listeners this listeners get listeners do we even need to fire an event if change listeners length 0 return final property change event pe new property change event this name old value new value for int i 0 i change listeners length i final i property change listener l i property change listener change listeners i i safe runnable job new i safe runnable public void handle exception throwable exception already being logged in platform run public void run throws exception l property change pe platform run job oldvalue newvalue firepropertychangeevent oldvalue newvalue illegalargumentexception changelisteners getlisteners changelisteners propertychangeevent propertychangeevent oldvalue newvalue changelisteners ipropertychangelistener ipropertychangelistener changelisteners isaferunnable isaferunnable handleexception propertychange final i property change listener l i property change listener change listeners i i safe runnable job new i safe runnable public void handle exception throwable exception already being logged in platform run ipropertychangelistener ipropertychangelistener changelisteners isaferunnable isaferunnable handleexception public void run throws exception l property change pe propertychange returns the current value of the boolean valued property with the given name returns the default default value code false code if there is no property with the given name or if the current value cannot be treated as a boolean the given name must not be code null code param name the name of the property return the boolean valued property public boolean get boolean string name string value properties get property name if value null return boolean default default return value equals preferences true getboolean getproperty boolean_default_default sets the current value of the boolean valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name boolean value boolean default value get default boolean name boolean old value get boolean name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name value preferences true preferences false if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name old value boolean true boolean false value boolean true boolean false settodefault setvalue defaultvalue getdefaultboolean oldvalue getboolean defaultvalue oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the boolean valued property with the given name returns the default default value code false code if there is no default property with the given name or if the default value cannot be treated as a boolean the given name must not be code null code param name the name of the property return the default value of the named property public boolean get default boolean string name string value default properties get property name if value null return boolean default default return value equals preferences true getdefaultboolean defaultproperties getproperty boolean_default_default sets the default value for the boolean valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name boolean value default properties put name value preferences true preferences false setdefault defaultproperties returns the current value of the double valued property with the given name returns the default default value code 0 0 code if there is no property with the given name or if the current value cannot be treated as a double the given name must not be code null code param name the name of the property return the double valued property public double get double string name return convert to double properties get property name double default default getdouble converttodouble getproperty double_default_default sets the current value of the double valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property must be a number not a nan public void set value string name double value if double is nan value throw new illegal argument exception double default value get default double name double old value get double name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name double to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new double old value new double value settodefault setvalue isnan illegalargumentexception defaultvalue getdefaultdouble oldvalue getdouble defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the double valued property with the given name returns the default default value code 0 0 code if there is no default property with the given name or if the default value cannot be treated as a double the given name must not be code null code param name the name of the property return the default value of the named property public double get default double string name return convert to double default properties get property name double default default getdefaultdouble converttodouble defaultproperties getproperty double_default_default sets the default value for the double valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property must be a number not a nan public void set default string name double value if double is nan value throw new illegal argument exception default properties put name double to string value setdefault isnan illegalargumentexception defaultproperties tostring converts the given raw property value string to a double param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to a double or the given code default value code if the raw value is code null code or cannot be parsed as a double private double convert to double string raw property value double default value double result default value if raw property value null try result double parse double raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttodouble rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parsedouble rawpropertyvalue numberformatexception returns the current value of the float valued property with the given name returns the default default value code 0 0f code if there is no property with the given name or if the current value cannot be treated as a float the given name must not be code null code param name the name of the property return the float valued property public float get float string name return convert to float properties get property name float default default getfloat converttofloat getproperty float_default_default sets the current value of the float valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property must be a number not a nan public void set value string name float value if float is nan value throw new illegal argument exception float default value get default float name float old value get float name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name float to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new float old value new float value settodefault setvalue isnan illegalargumentexception defaultvalue getdefaultfloat oldvalue getfloat defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the float valued property with the given name returns the default default value code 0 0f code if there is no default property with the given name or if the default value cannot be treated as a float the given name must not be code null code param name the name of the property return the default value of the named property public float get default float string name return convert to float default properties get property name float default default getdefaultfloat converttofloat defaultproperties getproperty float_default_default sets the default value for the float valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property must be a number not a nan public void set default string name float value if float is nan value throw new illegal argument exception default properties put name float to string value setdefault isnan illegalargumentexception defaultproperties tostring converts the given raw property value string to a float param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to a float or the given code default value code if the raw value is code null code or cannot be parsed as a float private float convert to float string raw property value float default value float result default value if raw property value null try result float parse float raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttofloat rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parsefloat rawpropertyvalue numberformatexception returns the current value of the integer valued property with the given name returns the default default value code 0 code if there is no property with the given name or if the current value cannot be treated as an integer the given name must not be code null code param name the name of the property return the int valued property public int get int string name return convert to int properties get property name int default default getint converttoint getproperty int_default_default sets the current value of the integer valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name int value int default value get default int name int old value get int name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name integer to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new integer old value new integer value settodefault setvalue defaultvalue getdefaultint oldvalue getint defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the integer valued property with the given name returns the default default value code 0 code if there is no default property with the given name or if the default value cannot be treated as an integer the given name must not be code null code param name the name of the property return the default value of the named property public int get default int string name return convert to int default properties get property name int default default getdefaultint converttoint defaultproperties getproperty int_default_default sets the default value for the integer valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name int value default properties put name integer to string value setdefault defaultproperties tostring converts the given raw property value string to an int param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to an int or the given code default value code if the raw value is code null code or cannot be parsed as an int private int convert to int string raw property value int default value int result default value if raw property value null try result integer parse int raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttoint rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parseint rawpropertyvalue numberformatexception returns the current value of the long valued property with the given name returns the default default value code 0l code if there is no property with the given name or if the current value cannot be treated as a long the given name must not be code null code param name the name of the property return the long valued property public long get long string name return convert to long properties get property name long default default getlong converttolong getproperty long_default_default sets the current value of the long valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name long value long default value get default long name long old value get long name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name long to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new long old value new long value settodefault setvalue defaultvalue getdefaultlong oldvalue getlong defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the long valued property with the given name returns the default default value code 0l code if there is no default property with the given name or if the default value cannot be treated as a long the given name must not be code null code param name the name of the property return the default value of the named property public long get default long string name return convert to long default properties get property name long default default getdefaultlong converttolong defaultproperties getproperty long_default_default sets the default value for the long valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name long value default properties put name long to string value setdefault defaultproperties tostring converts the given raw property value string to a long param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to a long or the given code default value code if the raw value is code null code or cannot be parsed as a long private long convert to long string raw property value long default value long result default value if raw property value null try result long parse long raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttolong rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parselong rawpropertyvalue numberformatexception returns the current value of the string valued property with the given name returns the default default value the empty string code code if there is no property with the given name the given name must not be code null code param name the name of the property return the string valued property public string get string string name string value properties get property name return value null value string default default getstring getproperty string_default_default sets the current value of the string valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name string value if value null throw new illegal argument exception string default value get default string name string old value get string name if value equals default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name value if old value equals value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name old value value settodefault setvalue illegalargumentexception defaultvalue getdefaultstring oldvalue getstring defaultvalue oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the string valued property with the given name returns the default default value the empty string code code is no default property with the given name or if the default value cannot be treated as a string the given name must not be code null code param name the name of the property return the default value of the named property public string get default string string name string value default properties get property name return value null value string default default getdefaultstring defaultproperties getproperty string_default_default sets the default value for the string valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name string value if value null throw new illegal argument exception default properties put name value setdefault illegalargumentexception defaultproperties returns whether the property with the given name has the default value in virtue of having no explicitly set value returns code false code if the given name is code null code param name the name of the property or code null code return code true code if the property has no explicitly set value and code false code otherwise including the case where the property is unknown to this object public boolean is default string name return properties contains key name isdefault containskey sets the current value of the property with the given name back to its default value has no effect if the property does not have its own current value the given name must not be code null code p note that the recommended way of re initializing a property to the appropriate default value is to call code set to default code this is implemented by removing the named value from the object thereby exposing the default value p p a property change event is always reported in the event object the property name is the name of the property and the old and new values are either strings or code null code indicating the default default value p param name the name of the property public void set to default string name object old property value properties remove name if old property value null dirty true string new value default properties get property name null n b new value null if there is no default value can t determine correct default default without knowing type fire property change event name old property value new value settodefault settodefault oldpropertyvalue oldpropertyvalue newvalue defaultproperties getproperty newvalue firepropertychangeevent oldpropertyvalue newvalue returns a list of all properties known to this preference object which have current values other than their default value return an array of property names public string property names return string properties key set to array empty string array propertynames keyset toarray empty_string_array returns a list of all properties known to this preference object which have an explicit default value set return an array of property names public string default property names return string default properties key set to array empty string array defaultpropertynames defaultproperties keyset toarray empty_string_array returns whether the current values in this preference object require saving return code true code if at least one of the properties known to this preference object has a current value different from its default value and code false code otherwise public boolean needs saving return dirty needssaving saves the non default valued properties known to this preference object to the given output stream using code properties store output stream string code p note that the output is unconditionally written even when code needs saving code is code false code p param out the output stream param header a comment to be included in the output or code null code if none exception io exception if there is a problem saving this preference object see properties store output stream string public void store output stream out string header throws io exception properties store out header dirty false outputstream needssaving ioexception outputstream outputstream ioexception loads the non default valued properties for this preference object from the given input stream using code java util properties load input stream code default property values are not affected param in the input stream exception io exception if there is a problem loading this preference object see java util properties load input stream public void load input stream in throws io exception properties load in dirty false inputstream ioexception inputstream inputstream ioexception creates a new property change event param source the object whose property has changed param property the property that has changed must not be code null code param old value the old value of the property or code null code if none param new value the new value of the property or code null code if none protected property change event object source string property object old value object new value super source if property null throw new illegal argument exception this property name property this old value old value this new value new value oldvalue newvalue propertychangeevent oldvalue newvalue illegalargumentexception propertyname oldvalue oldvalue newvalue newvalue returns the name of the property that changed p warning there is no guarantee that the property name returned is a constant string callers must compare property names using code equals code not p return the name of the property that changed public string get property return property name getproperty propertyname returns the new value of the property return the new value or code null code if not known or not relevant public object get new value return new value getnewvalue newvalue returns the old value of the property return the old value or code null code if not known or not relevant public object get old value return old value getoldvalue oldvalue notification that a property has changed p this method gets called when the observed object fires a property change event p param event the property change event object describing which property changed and how exports all non default valued preferences for all installed plugins to the provided file if a file already exists at the given location it will be deleted if there are no preferences to export no file will be written p the file that is written can be read later using the import preferences method p param path the absolute file system path of the file to export preferences to exception core exception if this method fails reasons include ul li the file could not be written li ul see import preferences i path see validate preference versions i path public static void export preferences i path path throws core exception file file path to file if file exists file delete file get parent file mkdirs i preferences service service platform get preferences service output stream output null file output stream fos null try fos new file output stream file output new buffered output stream fos i eclipse preferences node i eclipse preferences service get root node node plugin plugin preference scope service export preferences node output string null output flush fos getfd sync catch io exception e string message nls bind messages preferences errorwriting file e get message i status status new status i status error platform pi runtime i status error message e throw new core exception status finally if output null try output close catch io exception e ignore importpreferences coreexception importpreferences ipath validatepreferenceversions ipath exportpreferences ipath coreexception tofile getparentfile ipreferencesservice getpreferencesservice outputstream fileoutputstream fileoutputstream bufferedoutputstream ieclipsepreferences ieclipsepreferences getrootnode plugin_preference_scope exportpreferences ioexception preferences_errorwriting getmessage istatus istatus pi_runtime istatus coreexception ioexception loads the plugin preferences from the given file and replaces all non default valued preferences for all plugins with the values from this file p if the file contains preferences for plug ins that don t exist in the current install they are ignored this method does not validate if the plug in versions in the preference file match the currently installed plug ins clients should first call validate preference versions on the file to ensure that the versions are compatible p p the file must have been written by the export preferences method p param path the absolute file system path of the file to import preferences from exception core exception if this method fails reasons include ul li the file does not exist li li the file could not be read li ul see export preferences i path see validate preference versions i path public static void import preferences i path path throws core exception if path to file exists string msg nls bind messages preferences filenotfound path toos string throw new core exception new status i status error platform pi runtime 1 msg null i preferences service service platform get preferences service input stream input null try input new buffered input stream new file input stream path to file service import preferences input catch file not found exception e string msg nls bind messages preferences filenotfound path toos string throw new core exception new status i status error platform pi runtime 1 msg e finally if input null try input close catch io exception e ignore validatepreferenceversions exportpreferences coreexception exportpreferences ipath validatepreferenceversions ipath importpreferences ipath coreexception tofile preferences_filenotfound toosstring coreexception istatus pi_runtime ipreferencesservice getpreferencesservice inputstream bufferedinputstream fileinputstream tofile importpreferences filenotfoundexception preferences_filenotfound toosstring coreexception istatus pi_runtime ioexception validates that the preference versions in the given file match the versions of the currently installed plugins returns an ok status if all preferences match the currently installed plugins otherwise a multi status describing what plugins have preferences that don t match p if the returned status has a code i status warning code severity it means that some preferences may not be applicable but for the most part they will be compatible if the returned status has a code i status error code severity it means that the preferences will probably not be compatible p if the file contains preferences for plug ins that don t exist in the current install they are ignored p p the file must have been written by the export preferences method p param file the absolute file system path of the preference file to validate see export preferences i path see import preferences i path public static i status validate preference versions i path file preferences service service preferences service platform get preferences service return service validate versions file multistatus istatus istatus exportpreferences exportpreferences ipath importpreferences ipath istatus validatepreferenceversions ipath preferencesservice preferencesservice getpreferencesservice validateversions creates an empty preference table p use the methods code load input stream code and code store input stream code to load and store these preferences p see load input stream see store output stream string public preferences default properties new properties properties new properties default properties inputstream inputstream inputstream outputstream defaultproperties defaultproperties adds a property change listener to this preference object has no affect if the identical listener is already registered p em note em depending on the means in which the property values changed the old and new values for the property can be either typed a string representation of the value or code null code clients who wish to behave properly in all cases should all three cases in their implementation of the property change listener p param listener a property change listener public void add property change listener i property change listener listener listeners add listener addpropertychangelistener ipropertychangelistener removes the given listener from this preference object has no affect if the listener is not registered param listener a property change listener public void remove property change listener i property change listener listener listeners remove listener removepropertychangelistener ipropertychangelistener returns whether the given property is known to this preference object either by having an explicit setting or by having a default setting returns code false code if the given name is code null code param name the name of the property or code null code return code true code if either a current value or a default value is known for the named property and code false code otherwise public boolean contains string name return properties contains key name default properties contains key name containskey defaultproperties containskey fires a property change event corresponding to a change to the current value of the property with the given name param name the name of the property to be used as the property in the event object param old value the old value or code null code if not known or not relevant param new value the new value or code null code if not known or not relevant protected void fire property change event string name object old value object new value if name null throw new illegal argument exception object change listeners this listeners get listeners do we even need to fire an event if change listeners length 0 return final property change event pe new property change event this name old value new value for int i 0 i change listeners length i final i property change listener l i property change listener change listeners i i safe runnable job new i safe runnable public void handle exception throwable exception already being logged in platform run public void run throws exception l property change pe platform run job oldvalue newvalue firepropertychangeevent oldvalue newvalue illegalargumentexception changelisteners getlisteners changelisteners propertychangeevent propertychangeevent oldvalue newvalue changelisteners ipropertychangelistener ipropertychangelistener changelisteners isaferunnable isaferunnable handleexception propertychange final i property change listener l i property change listener change listeners i i safe runnable job new i safe runnable public void handle exception throwable exception already being logged in platform run ipropertychangelistener ipropertychangelistener changelisteners isaferunnable isaferunnable handleexception public void run throws exception l property change pe propertychange returns the current value of the boolean valued property with the given name returns the default default value code false code if there is no property with the given name or if the current value cannot be treated as a boolean the given name must not be code null code param name the name of the property return the boolean valued property public boolean get boolean string name string value properties get property name if value null return boolean default default return value equals preferences true getboolean getproperty boolean_default_default sets the current value of the boolean valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name boolean value boolean default value get default boolean name boolean old value get boolean name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name value preferences true preferences false if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name old value boolean true boolean false value boolean true boolean false settodefault setvalue defaultvalue getdefaultboolean oldvalue getboolean defaultvalue oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the boolean valued property with the given name returns the default default value code false code if there is no default property with the given name or if the default value cannot be treated as a boolean the given name must not be code null code param name the name of the property return the default value of the named property public boolean get default boolean string name string value default properties get property name if value null return boolean default default return value equals preferences true getdefaultboolean defaultproperties getproperty boolean_default_default sets the default value for the boolean valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name boolean value default properties put name value preferences true preferences false setdefault defaultproperties returns the current value of the double valued property with the given name returns the default default value code 0 0 code if there is no property with the given name or if the current value cannot be treated as a double the given name must not be code null code param name the name of the property return the double valued property public double get double string name return convert to double properties get property name double default default getdouble converttodouble getproperty double_default_default sets the current value of the double valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property must be a number not a nan public void set value string name double value if double is nan value throw new illegal argument exception double default value get default double name double old value get double name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name double to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new double old value new double value settodefault setvalue isnan illegalargumentexception defaultvalue getdefaultdouble oldvalue getdouble defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the double valued property with the given name returns the default default value code 0 0 code if there is no default property with the given name or if the default value cannot be treated as a double the given name must not be code null code param name the name of the property return the default value of the named property public double get default double string name return convert to double default properties get property name double default default getdefaultdouble converttodouble defaultproperties getproperty double_default_default sets the default value for the double valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property must be a number not a nan public void set default string name double value if double is nan value throw new illegal argument exception default properties put name double to string value setdefault isnan illegalargumentexception defaultproperties tostring converts the given raw property value string to a double param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to a double or the given code default value code if the raw value is code null code or cannot be parsed as a double private double convert to double string raw property value double default value double result default value if raw property value null try result double parse double raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttodouble rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parsedouble rawpropertyvalue numberformatexception returns the current value of the float valued property with the given name returns the default default value code 0 0f code if there is no property with the given name or if the current value cannot be treated as a float the given name must not be code null code param name the name of the property return the float valued property public float get float string name return convert to float properties get property name float default default getfloat converttofloat getproperty float_default_default sets the current value of the float valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property must be a number not a nan public void set value string name float value if float is nan value throw new illegal argument exception float default value get default float name float old value get float name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name float to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new float old value new float value settodefault setvalue isnan illegalargumentexception defaultvalue getdefaultfloat oldvalue getfloat defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the float valued property with the given name returns the default default value code 0 0f code if there is no default property with the given name or if the default value cannot be treated as a float the given name must not be code null code param name the name of the property return the default value of the named property public float get default float string name return convert to float default properties get property name float default default getdefaultfloat converttofloat defaultproperties getproperty float_default_default sets the default value for the float valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property must be a number not a nan public void set default string name float value if float is nan value throw new illegal argument exception default properties put name float to string value setdefault isnan illegalargumentexception defaultproperties tostring converts the given raw property value string to a float param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to a float or the given code default value code if the raw value is code null code or cannot be parsed as a float private float convert to float string raw property value float default value float result default value if raw property value null try result float parse float raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttofloat rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parsefloat rawpropertyvalue numberformatexception returns the current value of the integer valued property with the given name returns the default default value code 0 code if there is no property with the given name or if the current value cannot be treated as an integer the given name must not be code null code param name the name of the property return the int valued property public int get int string name return convert to int properties get property name int default default getint converttoint getproperty int_default_default sets the current value of the integer valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name int value int default value get default int name int old value get int name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name integer to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new integer old value new integer value settodefault setvalue defaultvalue getdefaultint oldvalue getint defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the integer valued property with the given name returns the default default value code 0 code if there is no default property with the given name or if the default value cannot be treated as an integer the given name must not be code null code param name the name of the property return the default value of the named property public int get default int string name return convert to int default properties get property name int default default getdefaultint converttoint defaultproperties getproperty int_default_default sets the default value for the integer valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name int value default properties put name integer to string value setdefault defaultproperties tostring converts the given raw property value string to an int param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to an int or the given code default value code if the raw value is code null code or cannot be parsed as an int private int convert to int string raw property value int default value int result default value if raw property value null try result integer parse int raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttoint rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parseint rawpropertyvalue numberformatexception returns the current value of the long valued property with the given name returns the default default value code 0l code if there is no property with the given name or if the current value cannot be treated as a long the given name must not be code null code param name the name of the property return the long valued property public long get long string name return convert to long properties get property name long default default getlong converttolong getproperty long_default_default sets the current value of the long valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name long value long default value get default long name long old value get long name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name long to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new long old value new long value settodefault setvalue defaultvalue getdefaultlong oldvalue getlong defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the long valued property with the given name returns the default default value code 0l code if there is no default property with the given name or if the default value cannot be treated as a long the given name must not be code null code param name the name of the property return the default value of the named property public long get default long string name return convert to long default properties get property name long default default getdefaultlong converttolong defaultproperties getproperty long_default_default sets the default value for the long valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name long value default properties put name long to string value setdefault defaultproperties tostring converts the given raw property value string to a long param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to a long or the given code default value code if the raw value is code null code or cannot be parsed as a long private long convert to long string raw property value long default value long result default value if raw property value null try result long parse long raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttolong rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parselong rawpropertyvalue numberformatexception returns the current value of the string valued property with the given name returns the default default value the empty string code code if there is no property with the given name the given name must not be code null code param name the name of the property return the string valued property public string get string string name string value properties get property name return value null value string default default getstring getproperty string_default_default sets the current value of the string valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name string value if value null throw new illegal argument exception string default value get default string name string old value get string name if value equals default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name value if old value equals value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name old value value settodefault setvalue illegalargumentexception defaultvalue getdefaultstring oldvalue getstring defaultvalue oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the string valued property with the given name returns the default default value the empty string code code is no default property with the given name or if the default value cannot be treated as a string the given name must not be code null code param name the name of the property return the default value of the named property public string get default string string name string value default properties get property name return value null value string default default getdefaultstring defaultproperties getproperty string_default_default sets the default value for the string valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name string value if value null throw new illegal argument exception default properties put name value setdefault illegalargumentexception defaultproperties returns whether the property with the given name has the default value in virtue of having no explicitly set value returns code false code if the given name is code null code param name the name of the property or code null code return code true code if the property has no explicitly set value and code false code otherwise including the case where the property is unknown to this object public boolean is default string name return properties contains key name isdefault containskey sets the current value of the property with the given name back to its default value has no effect if the property does not have its own current value the given name must not be code null code p note that the recommended way of re initializing a property to the appropriate default value is to call code set to default code this is implemented by removing the named value from the object thereby exposing the default value p p a property change event is always reported in the event object the property name is the name of the property and the old and new values are either strings or code null code indicating the default default value p param name the name of the property public void set to default string name object old property value properties remove name if old property value null dirty true string new value default properties get property name null n b new value null if there is no default value can t determine correct default default without knowing type fire property change event name old property value new value settodefault settodefault oldpropertyvalue oldpropertyvalue newvalue defaultproperties getproperty newvalue firepropertychangeevent oldpropertyvalue newvalue returns a list of all properties known to this preference object which have current values other than their default value return an array of property names public string property names return string properties key set to array empty string array propertynames keyset toarray empty_string_array returns a list of all properties known to this preference object which have an explicit default value set return an array of property names public string default property names return string default properties key set to array empty string array defaultpropertynames defaultproperties keyset toarray empty_string_array returns whether the current values in this preference object require saving return code true code if at least one of the properties known to this preference object has a current value different from its default value and code false code otherwise public boolean needs saving return dirty needssaving saves the non default valued properties known to this preference object to the given output stream using code properties store output stream string code p note that the output is unconditionally written even when code needs saving code is code false code p param out the output stream param header a comment to be included in the output or code null code if none exception io exception if there is a problem saving this preference object see properties store output stream string public void store output stream out string header throws io exception properties store out header dirty false outputstream needssaving ioexception outputstream outputstream ioexception loads the non default valued properties for this preference object from the given input stream using code java util properties load input stream code default property values are not affected param in the input stream exception io exception if there is a problem loading this preference object see java util properties load input stream public void load input stream in throws io exception properties load in dirty false inputstream ioexception inputstream inputstream ioexception creates a new property change event param source the object whose property has changed param property the property that has changed must not be code null code param old value the old value of the property or code null code if none param new value the new value of the property or code null code if none protected property change event object source string property object old value object new value super source if property null throw new illegal argument exception this property name property this old value old value this new value new value oldvalue newvalue propertychangeevent oldvalue newvalue illegalargumentexception propertyname oldvalue oldvalue newvalue newvalue returns the name of the property that changed p warning there is no guarantee that the property name returned is a constant string callers must compare property names using code equals code not p return the name of the property that changed public string get property return property name getproperty propertyname returns the new value of the property return the new value or code null code if not known or not relevant public object get new value return new value getnewvalue newvalue returns the old value of the property return the old value or code null code if not known or not relevant public object get old value return old value getoldvalue oldvalue notification that a property has changed p this method gets called when the observed object fires a property change event p param event the property change event object describing which property changed and how exports all non default valued preferences for all installed plugins to the provided file if a file already exists at the given location it will be deleted if there are no preferences to export no file will be written p the file that is written can be read later using the import preferences method p param path the absolute file system path of the file to export preferences to exception core exception if this method fails reasons include ul li the file could not be written li ul see import preferences i path see validate preference versions i path public static void export preferences i path path throws core exception file file path to file if file exists file delete file get parent file mkdirs i preferences service service platform get preferences service output stream output null file output stream fos null try fos new file output stream file output new buffered output stream fos i eclipse preferences node i eclipse preferences service get root node node plugin plugin preference scope service export preferences node output string null output flush fos getfd sync catch io exception e string message nls bind messages preferences errorwriting file e get message i status status new status i status error platform pi runtime i status error message e throw new core exception status finally if output null try output close catch io exception e ignore importpreferences coreexception importpreferences ipath validatepreferenceversions ipath exportpreferences ipath coreexception tofile getparentfile ipreferencesservice getpreferencesservice outputstream fileoutputstream fileoutputstream bufferedoutputstream ieclipsepreferences ieclipsepreferences getrootnode plugin_preference_scope exportpreferences ioexception preferences_errorwriting getmessage istatus istatus pi_runtime istatus coreexception ioexception loads the plugin preferences from the given file and replaces all non default valued preferences for all plugins with the values from this file p if the file contains preferences for plug ins that don t exist in the current install they are ignored this method does not validate if the plug in versions in the preference file match the currently installed plug ins clients should first call validate preference versions on the file to ensure that the versions are compatible p p the file must have been written by the export preferences method p param path the absolute file system path of the file to import preferences from exception core exception if this method fails reasons include ul li the file does not exist li li the file could not be read li ul see export preferences i path see validate preference versions i path public static void import preferences i path path throws core exception if path to file exists string msg nls bind messages preferences filenotfound path toos string throw new core exception new status i status error platform pi runtime 1 msg null i preferences service service platform get preferences service input stream input null try input new buffered input stream new file input stream path to file service import preferences input catch file not found exception e string msg nls bind messages preferences filenotfound path toos string throw new core exception new status i status error platform pi runtime 1 msg e finally if input null try input close catch io exception e ignore validatepreferenceversions exportpreferences coreexception exportpreferences ipath validatepreferenceversions ipath importpreferences ipath coreexception tofile preferences_filenotfound toosstring coreexception istatus pi_runtime ipreferencesservice getpreferencesservice inputstream bufferedinputstream fileinputstream tofile importpreferences filenotfoundexception preferences_filenotfound toosstring coreexception istatus pi_runtime ioexception validates that the preference versions in the given file match the versions of the currently installed plugins returns an ok status if all preferences match the currently installed plugins otherwise a multi status describing what plugins have preferences that don t match p if the returned status has a code i status warning code severity it means that some preferences may not be applicable but for the most part they will be compatible if the returned status has a code i status error code severity it means that the preferences will probably not be compatible p if the file contains preferences for plug ins that don t exist in the current install they are ignored p p the file must have been written by the export preferences method p param file the absolute file system path of the preference file to validate see export preferences i path see import preferences i path public static i status validate preference versions i path file preferences service service preferences service platform get preferences service return service validate versions file multistatus istatus istatus exportpreferences exportpreferences ipath importpreferences ipath istatus validatepreferenceversions ipath preferencesservice preferencesservice getpreferencesservice validateversions creates an empty preference table p use the methods code load input stream code and code store input stream code to load and store these preferences p see load input stream see store output stream string public preferences default properties new properties properties new properties default properties inputstream inputstream inputstream outputstream defaultproperties defaultproperties adds a property change listener to this preference object has no affect if the identical listener is already registered p em note em depending on the means in which the property values changed the old and new values for the property can be either typed a string representation of the value or code null code clients who wish to behave properly in all cases should all three cases in their implementation of the property change listener p param listener a property change listener public void add property change listener i property change listener listener listeners add listener addpropertychangelistener ipropertychangelistener removes the given listener from this preference object has no affect if the listener is not registered param listener a property change listener public void remove property change listener i property change listener listener listeners remove listener removepropertychangelistener ipropertychangelistener returns whether the given property is known to this preference object either by having an explicit setting or by having a default setting returns code false code if the given name is code null code param name the name of the property or code null code return code true code if either a current value or a default value is known for the named property and code false code otherwise public boolean contains string name return properties contains key name default properties contains key name containskey defaultproperties containskey fires a property change event corresponding to a change to the current value of the property with the given name param name the name of the property to be used as the property in the event object param old value the old value or code null code if not known or not relevant param new value the new value or code null code if not known or not relevant protected void fire property change event string name object old value object new value if name null throw new illegal argument exception object change listeners this listeners get listeners do we even need to fire an event if change listeners length 0 return final property change event pe new property change event this name old value new value for int i 0 i change listeners length i final i property change listener l i property change listener change listeners i i safe runnable job new i safe runnable public void handle exception throwable exception already being logged in platform run public void run throws exception l property change pe platform run job oldvalue newvalue firepropertychangeevent oldvalue newvalue illegalargumentexception changelisteners getlisteners changelisteners propertychangeevent propertychangeevent oldvalue newvalue changelisteners ipropertychangelistener ipropertychangelistener changelisteners isaferunnable isaferunnable handleexception propertychange final i property change listener l i property change listener change listeners i i safe runnable job new i safe runnable public void handle exception throwable exception already being logged in platform run ipropertychangelistener ipropertychangelistener changelisteners isaferunnable isaferunnable handleexception public void run throws exception l property change pe propertychange returns the current value of the boolean valued property with the given name returns the default default value code false code if there is no property with the given name or if the current value cannot be treated as a boolean the given name must not be code null code param name the name of the property return the boolean valued property public boolean get boolean string name string value properties get property name if value null return boolean default default return value equals preferences true getboolean getproperty boolean_default_default sets the current value of the boolean valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name boolean value boolean default value get default boolean name boolean old value get boolean name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name value preferences true preferences false if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name old value boolean true boolean false value boolean true boolean false settodefault setvalue defaultvalue getdefaultboolean oldvalue getboolean defaultvalue oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the boolean valued property with the given name returns the default default value code false code if there is no default property with the given name or if the default value cannot be treated as a boolean the given name must not be code null code param name the name of the property return the default value of the named property public boolean get default boolean string name string value default properties get property name if value null return boolean default default return value equals preferences true getdefaultboolean defaultproperties getproperty boolean_default_default sets the default value for the boolean valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name boolean value default properties put name value preferences true preferences false setdefault defaultproperties returns the current value of the double valued property with the given name returns the default default value code 0 0 code if there is no property with the given name or if the current value cannot be treated as a double the given name must not be code null code param name the name of the property return the double valued property public double get double string name return convert to double properties get property name double default default getdouble converttodouble getproperty double_default_default sets the current value of the double valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property must be a number not a nan public void set value string name double value if double is nan value throw new illegal argument exception double default value get default double name double old value get double name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name double to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new double old value new double value settodefault setvalue isnan illegalargumentexception defaultvalue getdefaultdouble oldvalue getdouble defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the double valued property with the given name returns the default default value code 0 0 code if there is no default property with the given name or if the default value cannot be treated as a double the given name must not be code null code param name the name of the property return the default value of the named property public double get default double string name return convert to double default properties get property name double default default getdefaultdouble converttodouble defaultproperties getproperty double_default_default sets the default value for the double valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property must be a number not a nan public void set default string name double value if double is nan value throw new illegal argument exception default properties put name double to string value setdefault isnan illegalargumentexception defaultproperties tostring converts the given raw property value string to a double param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to a double or the given code default value code if the raw value is code null code or cannot be parsed as a double private double convert to double string raw property value double default value double result default value if raw property value null try result double parse double raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttodouble rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parsedouble rawpropertyvalue numberformatexception returns the current value of the float valued property with the given name returns the default default value code 0 0f code if there is no property with the given name or if the current value cannot be treated as a float the given name must not be code null code param name the name of the property return the float valued property public float get float string name return convert to float properties get property name float default default getfloat converttofloat getproperty float_default_default sets the current value of the float valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property must be a number not a nan public void set value string name float value if float is nan value throw new illegal argument exception float default value get default float name float old value get float name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name float to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new float old value new float value settodefault setvalue isnan illegalargumentexception defaultvalue getdefaultfloat oldvalue getfloat defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the float valued property with the given name returns the default default value code 0 0f code if there is no default property with the given name or if the default value cannot be treated as a float the given name must not be code null code param name the name of the property return the default value of the named property public float get default float string name return convert to float default properties get property name float default default getdefaultfloat converttofloat defaultproperties getproperty float_default_default sets the default value for the float valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property must be a number not a nan public void set default string name float value if float is nan value throw new illegal argument exception default properties put name float to string value setdefault isnan illegalargumentexception defaultproperties tostring converts the given raw property value string to a float param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to a float or the given code default value code if the raw value is code null code or cannot be parsed as a float private float convert to float string raw property value float default value float result default value if raw property value null try result float parse float raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttofloat rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parsefloat rawpropertyvalue numberformatexception returns the current value of the integer valued property with the given name returns the default default value code 0 code if there is no property with the given name or if the current value cannot be treated as an integer the given name must not be code null code param name the name of the property return the int valued property public int get int string name return convert to int properties get property name int default default getint converttoint getproperty int_default_default sets the current value of the integer valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name int value int default value get default int name int old value get int name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name integer to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new integer old value new integer value settodefault setvalue defaultvalue getdefaultint oldvalue getint defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the integer valued property with the given name returns the default default value code 0 code if there is no default property with the given name or if the default value cannot be treated as an integer the given name must not be code null code param name the name of the property return the default value of the named property public int get default int string name return convert to int default properties get property name int default default getdefaultint converttoint defaultproperties getproperty int_default_default sets the default value for the integer valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name int value default properties put name integer to string value setdefault defaultproperties tostring converts the given raw property value string to an int param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to an int or the given code default value code if the raw value is code null code or cannot be parsed as an int private int convert to int string raw property value int default value int result default value if raw property value null try result integer parse int raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttoint rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parseint rawpropertyvalue numberformatexception returns the current value of the long valued property with the given name returns the default default value code 0l code if there is no property with the given name or if the current value cannot be treated as a long the given name must not be code null code param name the name of the property return the long valued property public long get long string name return convert to long properties get property name long default default getlong converttolong getproperty long_default_default sets the current value of the long valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name long value long default value get default long name long old value get long name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name long to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new long old value new long value settodefault setvalue defaultvalue getdefaultlong oldvalue getlong defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the long valued property with the given name returns the default default value code 0l code if there is no default property with the given name or if the default value cannot be treated as a long the given name must not be code null code param name the name of the property return the default value of the named property public long get default long string name return convert to long default properties get property name long default default getdefaultlong converttolong defaultproperties getproperty long_default_default sets the default value for the long valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name long value default properties put name long to string value setdefault defaultproperties tostring converts the given raw property value string to a long param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to a long or the given code default value code if the raw value is code null code or cannot be parsed as a long private long convert to long string raw property value long default value long result default value if raw property value null try result long parse long raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttolong rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parselong rawpropertyvalue numberformatexception returns the current value of the string valued property with the given name returns the default default value the empty string code code if there is no property with the given name the given name must not be code null code param name the name of the property return the string valued property public string get string string name string value properties get property name return value null value string default default getstring getproperty string_default_default sets the current value of the string valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name string value if value null throw new illegal argument exception string default value get default string name string old value get string name if value equals default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name value if old value equals value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name old value value settodefault setvalue illegalargumentexception defaultvalue getdefaultstring oldvalue getstring defaultvalue oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the string valued property with the given name returns the default default value the empty string code code is no default property with the given name or if the default value cannot be treated as a string the given name must not be code null code param name the name of the property return the default value of the named property public string get default string string name string value default properties get property name return value null value string default default getdefaultstring defaultproperties getproperty string_default_default sets the default value for the string valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name string value if value null throw new illegal argument exception default properties put name value setdefault illegalargumentexception defaultproperties returns whether the property with the given name has the default value in virtue of having no explicitly set value returns code false code if the given name is code null code param name the name of the property or code null code return code true code if the property has no explicitly set value and code false code otherwise including the case where the property is unknown to this object public boolean is default string name return properties contains key name isdefault containskey sets the current value of the property with the given name back to its default value has no effect if the property does not have its own current value the given name must not be code null code p note that the recommended way of re initializing a property to the appropriate default value is to call code set to default code this is implemented by removing the named value from the object thereby exposing the default value p p a property change event is always reported in the event object the property name is the name of the property and the old and new values are either strings or code null code indicating the default default value p param name the name of the property public void set to default string name object old property value properties remove name if old property value null dirty true string new value default properties get property name null n b new value null if there is no default value can t determine correct default default without knowing type fire property change event name old property value new value settodefault settodefault oldpropertyvalue oldpropertyvalue newvalue defaultproperties getproperty newvalue firepropertychangeevent oldpropertyvalue newvalue returns a list of all properties known to this preference object which have current values other than their default value return an array of property names public string property names return string properties key set to array empty string array propertynames keyset toarray empty_string_array returns a list of all properties known to this preference object which have an explicit default value set return an array of property names public string default property names return string default properties key set to array empty string array defaultpropertynames defaultproperties keyset toarray empty_string_array returns whether the current values in this preference object require saving return code true code if at least one of the properties known to this preference object has a current value different from its default value and code false code otherwise public boolean needs saving return dirty needssaving saves the non default valued properties known to this preference object to the given output stream using code properties store output stream string code p note that the output is unconditionally written even when code needs saving code is code false code p param out the output stream param header a comment to be included in the output or code null code if none exception io exception if there is a problem saving this preference object see properties store output stream string public void store output stream out string header throws io exception properties store out header dirty false outputstream needssaving ioexception outputstream outputstream ioexception loads the non default valued properties for this preference object from the given input stream using code java util properties load input stream code default property values are not affected param in the input stream exception io exception if there is a problem loading this preference object see java util properties load input stream public void load input stream in throws io exception properties load in dirty false inputstream ioexception inputstream inputstream ioexception creates a new property change event param source the object whose property has changed param property the property that has changed must not be code null code param old value the old value of the property or code null code if none param new value the new value of the property or code null code if none protected property change event object source string property object old value object new value super source if property null throw new illegal argument exception this property name property this old value old value this new value new value oldvalue newvalue propertychangeevent oldvalue newvalue illegalargumentexception propertyname oldvalue oldvalue newvalue newvalue returns the name of the property that changed p warning there is no guarantee that the property name returned is a constant string callers must compare property names using code equals code not p return the name of the property that changed public string get property return property name getproperty propertyname returns the new value of the property return the new value or code null code if not known or not relevant public object get new value return new value getnewvalue newvalue returns the old value of the property return the old value or code null code if not known or not relevant public object get old value return old value getoldvalue oldvalue notification that a property has changed p this method gets called when the observed object fires a property change event p param event the property change event object describing which property changed and how exports all non default valued preferences for all installed plugins to the provided file if a file already exists at the given location it will be deleted if there are no preferences to export no file will be written p the file that is written can be read later using the import preferences method p param path the absolute file system path of the file to export preferences to exception core exception if this method fails reasons include ul li the file could not be written li ul see import preferences i path see validate preference versions i path public static void export preferences i path path throws core exception file file path to file if file exists file delete file get parent file mkdirs i preferences service service platform get preferences service output stream output null file output stream fos null try fos new file output stream file output new buffered output stream fos i eclipse preferences node i eclipse preferences service get root node node plugin plugin preference scope service export preferences node output string null output flush fos getfd sync catch io exception e string message nls bind messages preferences errorwriting file e get message i status status new status i status error platform pi runtime i status error message e throw new core exception status finally if output null try output close catch io exception e ignore importpreferences coreexception importpreferences ipath validatepreferenceversions ipath exportpreferences ipath coreexception tofile getparentfile ipreferencesservice getpreferencesservice outputstream fileoutputstream fileoutputstream bufferedoutputstream ieclipsepreferences ieclipsepreferences getrootnode plugin_preference_scope exportpreferences ioexception preferences_errorwriting getmessage istatus istatus pi_runtime istatus coreexception ioexception loads the plugin preferences from the given file and replaces all non default valued preferences for all plugins with the values from this file p if the file contains preferences for plug ins that don t exist in the current install they are ignored this method does not validate if the plug in versions in the preference file match the currently installed plug ins clients should first call validate preference versions on the file to ensure that the versions are compatible p p the file must have been written by the export preferences method p param path the absolute file system path of the file to import preferences from exception core exception if this method fails reasons include ul li the file does not exist li li the file could not be read li ul see export preferences i path see validate preference versions i path public static void import preferences i path path throws core exception if path to file exists string msg nls bind messages preferences filenotfound path toos string throw new core exception new status i status error platform pi runtime 1 msg null i preferences service service platform get preferences service input stream input null try input new buffered input stream new file input stream path to file service import preferences input catch file not found exception e string msg nls bind messages preferences filenotfound path toos string throw new core exception new status i status error platform pi runtime 1 msg e finally if input null try input close catch io exception e ignore validatepreferenceversions exportpreferences coreexception exportpreferences ipath validatepreferenceversions ipath importpreferences ipath coreexception tofile preferences_filenotfound toosstring coreexception istatus pi_runtime ipreferencesservice getpreferencesservice inputstream bufferedinputstream fileinputstream tofile importpreferences filenotfoundexception preferences_filenotfound toosstring coreexception istatus pi_runtime ioexception validates that the preference versions in the given file match the versions of the currently installed plugins returns an ok status if all preferences match the currently installed plugins otherwise a multi status describing what plugins have preferences that don t match p if the returned status has a code i status warning code severity it means that some preferences may not be applicable but for the most part they will be compatible if the returned status has a code i status error code severity it means that the preferences will probably not be compatible p if the file contains preferences for plug ins that don t exist in the current install they are ignored p p the file must have been written by the export preferences method p param file the absolute file system path of the preference file to validate see export preferences i path see import preferences i path public static i status validate preference versions i path file preferences service service preferences service platform get preferences service return service validate versions file multistatus istatus istatus exportpreferences exportpreferences ipath importpreferences ipath istatus validatepreferenceversions ipath preferencesservice preferencesservice getpreferencesservice validateversions creates an empty preference table p use the methods code load input stream code and code store input stream code to load and store these preferences p see load input stream see store output stream string public preferences default properties new properties properties new properties default properties inputstream inputstream inputstream outputstream defaultproperties defaultproperties adds a property change listener to this preference object has no affect if the identical listener is already registered p em note em depending on the means in which the property values changed the old and new values for the property can be either typed a string representation of the value or code null code clients who wish to behave properly in all cases should all three cases in their implementation of the property change listener p param listener a property change listener public void add property change listener i property change listener listener listeners add listener addpropertychangelistener ipropertychangelistener removes the given listener from this preference object has no affect if the listener is not registered param listener a property change listener public void remove property change listener i property change listener listener listeners remove listener removepropertychangelistener ipropertychangelistener returns whether the given property is known to this preference object either by having an explicit setting or by having a default setting returns code false code if the given name is code null code param name the name of the property or code null code return code true code if either a current value or a default value is known for the named property and code false code otherwise public boolean contains string name return properties contains key name default properties contains key name containskey defaultproperties containskey fires a property change event corresponding to a change to the current value of the property with the given name param name the name of the property to be used as the property in the event object param old value the old value or code null code if not known or not relevant param new value the new value or code null code if not known or not relevant protected void fire property change event string name object old value object new value if name null throw new illegal argument exception object change listeners this listeners get listeners do we even need to fire an event if change listeners length 0 return final property change event pe new property change event this name old value new value for int i 0 i change listeners length i final i property change listener l i property change listener change listeners i i safe runnable job new i safe runnable public void handle exception throwable exception already being logged in platform run public void run throws exception l property change pe platform run job oldvalue newvalue firepropertychangeevent oldvalue newvalue illegalargumentexception changelisteners getlisteners changelisteners propertychangeevent propertychangeevent oldvalue newvalue changelisteners ipropertychangelistener ipropertychangelistener changelisteners isaferunnable isaferunnable handleexception propertychange final i property change listener l i property change listener change listeners i i safe runnable job new i safe runnable public void handle exception throwable exception already being logged in platform run ipropertychangelistener ipropertychangelistener changelisteners isaferunnable isaferunnable handleexception public void run throws exception l property change pe propertychange returns the current value of the boolean valued property with the given name returns the default default value code false code if there is no property with the given name or if the current value cannot be treated as a boolean the given name must not be code null code param name the name of the property return the boolean valued property public boolean get boolean string name string value properties get property name if value null return boolean default default return value equals preferences true getboolean getproperty boolean_default_default sets the current value of the boolean valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name boolean value boolean default value get default boolean name boolean old value get boolean name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name value preferences true preferences false if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name old value boolean true boolean false value boolean true boolean false settodefault setvalue defaultvalue getdefaultboolean oldvalue getboolean defaultvalue oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the boolean valued property with the given name returns the default default value code false code if there is no default property with the given name or if the default value cannot be treated as a boolean the given name must not be code null code param name the name of the property return the default value of the named property public boolean get default boolean string name string value default properties get property name if value null return boolean default default return value equals preferences true getdefaultboolean defaultproperties getproperty boolean_default_default sets the default value for the boolean valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name boolean value default properties put name value preferences true preferences false setdefault defaultproperties returns the current value of the double valued property with the given name returns the default default value code 0 0 code if there is no property with the given name or if the current value cannot be treated as a double the given name must not be code null code param name the name of the property return the double valued property public double get double string name return convert to double properties get property name double default default getdouble converttodouble getproperty double_default_default sets the current value of the double valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property must be a number not a nan public void set value string name double value if double is nan value throw new illegal argument exception double default value get default double name double old value get double name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name double to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new double old value new double value settodefault setvalue isnan illegalargumentexception defaultvalue getdefaultdouble oldvalue getdouble defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the double valued property with the given name returns the default default value code 0 0 code if there is no default property with the given name or if the default value cannot be treated as a double the given name must not be code null code param name the name of the property return the default value of the named property public double get default double string name return convert to double default properties get property name double default default getdefaultdouble converttodouble defaultproperties getproperty double_default_default sets the default value for the double valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property must be a number not a nan public void set default string name double value if double is nan value throw new illegal argument exception default properties put name double to string value setdefault isnan illegalargumentexception defaultproperties tostring converts the given raw property value string to a double param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to a double or the given code default value code if the raw value is code null code or cannot be parsed as a double private double convert to double string raw property value double default value double result default value if raw property value null try result double parse double raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttodouble rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parsedouble rawpropertyvalue numberformatexception returns the current value of the float valued property with the given name returns the default default value code 0 0f code if there is no property with the given name or if the current value cannot be treated as a float the given name must not be code null code param name the name of the property return the float valued property public float get float string name return convert to float properties get property name float default default getfloat converttofloat getproperty float_default_default sets the current value of the float valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property must be a number not a nan public void set value string name float value if float is nan value throw new illegal argument exception float default value get default float name float old value get float name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name float to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new float old value new float value settodefault setvalue isnan illegalargumentexception defaultvalue getdefaultfloat oldvalue getfloat defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the float valued property with the given name returns the default default value code 0 0f code if there is no default property with the given name or if the default value cannot be treated as a float the given name must not be code null code param name the name of the property return the default value of the named property public float get default float string name return convert to float default properties get property name float default default getdefaultfloat converttofloat defaultproperties getproperty float_default_default sets the default value for the float valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property must be a number not a nan public void set default string name float value if float is nan value throw new illegal argument exception default properties put name float to string value setdefault isnan illegalargumentexception defaultproperties tostring converts the given raw property value string to a float param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to a float or the given code default value code if the raw value is code null code or cannot be parsed as a float private float convert to float string raw property value float default value float result default value if raw property value null try result float parse float raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttofloat rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parsefloat rawpropertyvalue numberformatexception returns the current value of the integer valued property with the given name returns the default default value code 0 code if there is no property with the given name or if the current value cannot be treated as an integer the given name must not be code null code param name the name of the property return the int valued property public int get int string name return convert to int properties get property name int default default getint converttoint getproperty int_default_default sets the current value of the integer valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name int value int default value get default int name int old value get int name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name integer to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new integer old value new integer value settodefault setvalue defaultvalue getdefaultint oldvalue getint defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the integer valued property with the given name returns the default default value code 0 code if there is no default property with the given name or if the default value cannot be treated as an integer the given name must not be code null code param name the name of the property return the default value of the named property public int get default int string name return convert to int default properties get property name int default default getdefaultint converttoint defaultproperties getproperty int_default_default sets the default value for the integer valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name int value default properties put name integer to string value setdefault defaultproperties tostring converts the given raw property value string to an int param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to an int or the given code default value code if the raw value is code null code or cannot be parsed as an int private int convert to int string raw property value int default value int result default value if raw property value null try result integer parse int raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttoint rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parseint rawpropertyvalue numberformatexception returns the current value of the long valued property with the given name returns the default default value code 0l code if there is no property with the given name or if the current value cannot be treated as a long the given name must not be code null code param name the name of the property return the long valued property public long get long string name return convert to long properties get property name long default default getlong converttolong getproperty long_default_default sets the current value of the long valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name long value long default value get default long name long old value get long name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name long to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new long old value new long value settodefault setvalue defaultvalue getdefaultlong oldvalue getlong defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the long valued property with the given name returns the default default value code 0l code if there is no default property with the given name or if the default value cannot be treated as a long the given name must not be code null code param name the name of the property return the default value of the named property public long get default long string name return convert to long default properties get property name long default default getdefaultlong converttolong defaultproperties getproperty long_default_default sets the default value for the long valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name long value default properties put name long to string value setdefault defaultproperties tostring converts the given raw property value string to a long param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to a long or the given code default value code if the raw value is code null code or cannot be parsed as a long private long convert to long string raw property value long default value long result default value if raw property value null try result long parse long raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttolong rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parselong rawpropertyvalue numberformatexception returns the current value of the string valued property with the given name returns the default default value the empty string code code if there is no property with the given name the given name must not be code null code param name the name of the property return the string valued property public string get string string name string value properties get property name return value null value string default default getstring getproperty string_default_default sets the current value of the string valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name string value if value null throw new illegal argument exception string default value get default string name string old value get string name if value equals default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name value if old value equals value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name old value value settodefault setvalue illegalargumentexception defaultvalue getdefaultstring oldvalue getstring defaultvalue oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the string valued property with the given name returns the default default value the empty string code code is no default property with the given name or if the default value cannot be treated as a string the given name must not be code null code param name the name of the property return the default value of the named property public string get default string string name string value default properties get property name return value null value string default default getdefaultstring defaultproperties getproperty string_default_default sets the default value for the string valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name string value if value null throw new illegal argument exception default properties put name value setdefault illegalargumentexception defaultproperties returns whether the property with the given name has the default value in virtue of having no explicitly set value returns code false code if the given name is code null code param name the name of the property or code null code return code true code if the property has no explicitly set value and code false code otherwise including the case where the property is unknown to this object public boolean is default string name return properties contains key name isdefault containskey sets the current value of the property with the given name back to its default value has no effect if the property does not have its own current value the given name must not be code null code p note that the recommended way of re initializing a property to the appropriate default value is to call code set to default code this is implemented by removing the named value from the object thereby exposing the default value p p a property change event is always reported in the event object the property name is the name of the property and the old and new values are either strings or code null code indicating the default default value p param name the name of the property public void set to default string name object old property value properties remove name if old property value null dirty true string new value default properties get property name null n b new value null if there is no default value can t determine correct default default without knowing type fire property change event name old property value new value settodefault settodefault oldpropertyvalue oldpropertyvalue newvalue defaultproperties getproperty newvalue firepropertychangeevent oldpropertyvalue newvalue returns a list of all properties known to this preference object which have current values other than their default value return an array of property names public string property names return string properties key set to array empty string array propertynames keyset toarray empty_string_array returns a list of all properties known to this preference object which have an explicit default value set return an array of property names public string default property names return string default properties key set to array empty string array defaultpropertynames defaultproperties keyset toarray empty_string_array returns whether the current values in this preference object require saving return code true code if at least one of the properties known to this preference object has a current value different from its default value and code false code otherwise public boolean needs saving return dirty needssaving saves the non default valued properties known to this preference object to the given output stream using code properties store output stream string code p note that the output is unconditionally written even when code needs saving code is code false code p param out the output stream param header a comment to be included in the output or code null code if none exception io exception if there is a problem saving this preference object see properties store output stream string public void store output stream out string header throws io exception properties store out header dirty false outputstream needssaving ioexception outputstream outputstream ioexception loads the non default valued properties for this preference object from the given input stream using code java util properties load input stream code default property values are not affected param in the input stream exception io exception if there is a problem loading this preference object see java util properties load input stream public void load input stream in throws io exception properties load in dirty false inputstream ioexception inputstream inputstream ioexception creates a new property change event param source the object whose property has changed param property the property that has changed must not be code null code param old value the old value of the property or code null code if none param new value the new value of the property or code null code if none protected property change event object source string property object old value object new value super source if property null throw new illegal argument exception this property name property this old value old value this new value new value oldvalue newvalue propertychangeevent oldvalue newvalue illegalargumentexception propertyname oldvalue oldvalue newvalue newvalue returns the name of the property that changed p warning there is no guarantee that the property name returned is a constant string callers must compare property names using code equals code not p return the name of the property that changed public string get property return property name getproperty propertyname returns the new value of the property return the new value or code null code if not known or not relevant public object get new value return new value getnewvalue newvalue returns the old value of the property return the old value or code null code if not known or not relevant public object get old value return old value getoldvalue oldvalue notification that a property has changed p this method gets called when the observed object fires a property change event p param event the property change event object describing which property changed and how exports all non default valued preferences for all installed plugins to the provided file if a file already exists at the given location it will be deleted if there are no preferences to export no file will be written p the file that is written can be read later using the import preferences method p param path the absolute file system path of the file to export preferences to exception core exception if this method fails reasons include ul li the file could not be written li ul see import preferences i path see validate preference versions i path public static void export preferences i path path throws core exception file file path to file if file exists file delete file get parent file mkdirs i preferences service service platform get preferences service output stream output null file output stream fos null try fos new file output stream file output new buffered output stream fos i eclipse preferences node i eclipse preferences service get root node node plugin plugin preference scope service export preferences node output string null output flush fos getfd sync catch io exception e string message nls bind messages preferences errorwriting file e get message i status status new status i status error platform pi runtime i status error message e throw new core exception status finally if output null try output close catch io exception e ignore importpreferences coreexception importpreferences ipath validatepreferenceversions ipath exportpreferences ipath coreexception tofile getparentfile ipreferencesservice getpreferencesservice outputstream fileoutputstream fileoutputstream bufferedoutputstream ieclipsepreferences ieclipsepreferences getrootnode plugin_preference_scope exportpreferences ioexception preferences_errorwriting getmessage istatus istatus pi_runtime istatus coreexception ioexception loads the plugin preferences from the given file and replaces all non default valued preferences for all plugins with the values from this file p if the file contains preferences for plug ins that don t exist in the current install they are ignored this method does not validate if the plug in versions in the preference file match the currently installed plug ins clients should first call validate preference versions on the file to ensure that the versions are compatible p p the file must have been written by the export preferences method p param path the absolute file system path of the file to import preferences from exception core exception if this method fails reasons include ul li the file does not exist li li the file could not be read li ul see export preferences i path see validate preference versions i path public static void import preferences i path path throws core exception if path to file exists string msg nls bind messages preferences filenotfound path toos string throw new core exception new status i status error platform pi runtime 1 msg null i preferences service service platform get preferences service input stream input null try input new buffered input stream new file input stream path to file service import preferences input catch file not found exception e string msg nls bind messages preferences filenotfound path toos string throw new core exception new status i status error platform pi runtime 1 msg e finally if input null try input close catch io exception e ignore validatepreferenceversions exportpreferences coreexception exportpreferences ipath validatepreferenceversions ipath importpreferences ipath coreexception tofile preferences_filenotfound toosstring coreexception istatus pi_runtime ipreferencesservice getpreferencesservice inputstream bufferedinputstream fileinputstream tofile importpreferences filenotfoundexception preferences_filenotfound toosstring coreexception istatus pi_runtime ioexception validates that the preference versions in the given file match the versions of the currently installed plugins returns an ok status if all preferences match the currently installed plugins otherwise a multi status describing what plugins have preferences that don t match p if the returned status has a code i status warning code severity it means that some preferences may not be applicable but for the most part they will be compatible if the returned status has a code i status error code severity it means that the preferences will probably not be compatible p if the file contains preferences for plug ins that don t exist in the current install they are ignored p p the file must have been written by the export preferences method p param file the absolute file system path of the preference file to validate see export preferences i path see import preferences i path public static i status validate preference versions i path file preferences service service preferences service platform get preferences service return service validate versions file multistatus istatus istatus exportpreferences exportpreferences ipath importpreferences ipath istatus validatepreferenceversions ipath preferencesservice preferencesservice getpreferencesservice validateversions creates an empty preference table p use the methods code load input stream code and code store input stream code to load and store these preferences p see load input stream see store output stream string public preferences default properties new properties properties new properties default properties inputstream inputstream inputstream outputstream defaultproperties defaultproperties adds a property change listener to this preference object has no affect if the identical listener is already registered p em note em depending on the means in which the property values changed the old and new values for the property can be either typed a string representation of the value or code null code clients who wish to behave properly in all cases should all three cases in their implementation of the property change listener p param listener a property change listener public void add property change listener i property change listener listener listeners add listener addpropertychangelistener ipropertychangelistener removes the given listener from this preference object has no affect if the listener is not registered param listener a property change listener public void remove property change listener i property change listener listener listeners remove listener removepropertychangelistener ipropertychangelistener returns whether the given property is known to this preference object either by having an explicit setting or by having a default setting returns code false code if the given name is code null code param name the name of the property or code null code return code true code if either a current value or a default value is known for the named property and code false code otherwise public boolean contains string name return properties contains key name default properties contains key name containskey defaultproperties containskey fires a property change event corresponding to a change to the current value of the property with the given name param name the name of the property to be used as the property in the event object param old value the old value or code null code if not known or not relevant param new value the new value or code null code if not known or not relevant protected void fire property change event string name object old value object new value if name null throw new illegal argument exception object change listeners this listeners get listeners do we even need to fire an event if change listeners length 0 return final property change event pe new property change event this name old value new value for int i 0 i change listeners length i final i property change listener l i property change listener change listeners i i safe runnable job new i safe runnable public void handle exception throwable exception already being logged in platform run public void run throws exception l property change pe platform run job oldvalue newvalue firepropertychangeevent oldvalue newvalue illegalargumentexception changelisteners getlisteners changelisteners propertychangeevent propertychangeevent oldvalue newvalue changelisteners ipropertychangelistener ipropertychangelistener changelisteners isaferunnable isaferunnable handleexception propertychange final i property change listener l i property change listener change listeners i i safe runnable job new i safe runnable public void handle exception throwable exception already being logged in platform run ipropertychangelistener ipropertychangelistener changelisteners isaferunnable isaferunnable handleexception public void run throws exception l property change pe propertychange returns the current value of the boolean valued property with the given name returns the default default value code false code if there is no property with the given name or if the current value cannot be treated as a boolean the given name must not be code null code param name the name of the property return the boolean valued property public boolean get boolean string name string value properties get property name if value null return boolean default default return value equals preferences true getboolean getproperty boolean_default_default sets the current value of the boolean valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name boolean value boolean default value get default boolean name boolean old value get boolean name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name value preferences true preferences false if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name old value boolean true boolean false value boolean true boolean false settodefault setvalue defaultvalue getdefaultboolean oldvalue getboolean defaultvalue oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the boolean valued property with the given name returns the default default value code false code if there is no default property with the given name or if the default value cannot be treated as a boolean the given name must not be code null code param name the name of the property return the default value of the named property public boolean get default boolean string name string value default properties get property name if value null return boolean default default return value equals preferences true getdefaultboolean defaultproperties getproperty boolean_default_default sets the default value for the boolean valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name boolean value default properties put name value preferences true preferences false setdefault defaultproperties returns the current value of the double valued property with the given name returns the default default value code 0 0 code if there is no property with the given name or if the current value cannot be treated as a double the given name must not be code null code param name the name of the property return the double valued property public double get double string name return convert to double properties get property name double default default getdouble converttodouble getproperty double_default_default sets the current value of the double valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property must be a number not a nan public void set value string name double value if double is nan value throw new illegal argument exception double default value get default double name double old value get double name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name double to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new double old value new double value settodefault setvalue isnan illegalargumentexception defaultvalue getdefaultdouble oldvalue getdouble defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the double valued property with the given name returns the default default value code 0 0 code if there is no default property with the given name or if the default value cannot be treated as a double the given name must not be code null code param name the name of the property return the default value of the named property public double get default double string name return convert to double default properties get property name double default default getdefaultdouble converttodouble defaultproperties getproperty double_default_default sets the default value for the double valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property must be a number not a nan public void set default string name double value if double is nan value throw new illegal argument exception default properties put name double to string value setdefault isnan illegalargumentexception defaultproperties tostring converts the given raw property value string to a double param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to a double or the given code default value code if the raw value is code null code or cannot be parsed as a double private double convert to double string raw property value double default value double result default value if raw property value null try result double parse double raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttodouble rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parsedouble rawpropertyvalue numberformatexception returns the current value of the float valued property with the given name returns the default default value code 0 0f code if there is no property with the given name or if the current value cannot be treated as a float the given name must not be code null code param name the name of the property return the float valued property public float get float string name return convert to float properties get property name float default default getfloat converttofloat getproperty float_default_default sets the current value of the float valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property must be a number not a nan public void set value string name float value if float is nan value throw new illegal argument exception float default value get default float name float old value get float name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name float to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new float old value new float value settodefault setvalue isnan illegalargumentexception defaultvalue getdefaultfloat oldvalue getfloat defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the float valued property with the given name returns the default default value code 0 0f code if there is no default property with the given name or if the default value cannot be treated as a float the given name must not be code null code param name the name of the property return the default value of the named property public float get default float string name return convert to float default properties get property name float default default getdefaultfloat converttofloat defaultproperties getproperty float_default_default sets the default value for the float valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property must be a number not a nan public void set default string name float value if float is nan value throw new illegal argument exception default properties put name float to string value setdefault isnan illegalargumentexception defaultproperties tostring converts the given raw property value string to a float param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to a float or the given code default value code if the raw value is code null code or cannot be parsed as a float private float convert to float string raw property value float default value float result default value if raw property value null try result float parse float raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttofloat rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parsefloat rawpropertyvalue numberformatexception returns the current value of the integer valued property with the given name returns the default default value code 0 code if there is no property with the given name or if the current value cannot be treated as an integer the given name must not be code null code param name the name of the property return the int valued property public int get int string name return convert to int properties get property name int default default getint converttoint getproperty int_default_default sets the current value of the integer valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name int value int default value get default int name int old value get int name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name integer to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new integer old value new integer value settodefault setvalue defaultvalue getdefaultint oldvalue getint defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the integer valued property with the given name returns the default default value code 0 code if there is no default property with the given name or if the default value cannot be treated as an integer the given name must not be code null code param name the name of the property return the default value of the named property public int get default int string name return convert to int default properties get property name int default default getdefaultint converttoint defaultproperties getproperty int_default_default sets the default value for the integer valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name int value default properties put name integer to string value setdefault defaultproperties tostring converts the given raw property value string to an int param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to an int or the given code default value code if the raw value is code null code or cannot be parsed as an int private int convert to int string raw property value int default value int result default value if raw property value null try result integer parse int raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttoint rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parseint rawpropertyvalue numberformatexception returns the current value of the long valued property with the given name returns the default default value code 0l code if there is no property with the given name or if the current value cannot be treated as a long the given name must not be code null code param name the name of the property return the long valued property public long get long string name return convert to long properties get property name long default default getlong converttolong getproperty long_default_default sets the current value of the long valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name long value long default value get default long name long old value get long name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name long to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new long old value new long value settodefault setvalue defaultvalue getdefaultlong oldvalue getlong defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the long valued property with the given name returns the default default value code 0l code if there is no default property with the given name or if the default value cannot be treated as a long the given name must not be code null code param name the name of the property return the default value of the named property public long get default long string name return convert to long default properties get property name long default default getdefaultlong converttolong defaultproperties getproperty long_default_default sets the default value for the long valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name long value default properties put name long to string value setdefault defaultproperties tostring converts the given raw property value string to a long param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to a long or the given code default value code if the raw value is code null code or cannot be parsed as a long private long convert to long string raw property value long default value long result default value if raw property value null try result long parse long raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttolong rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parselong rawpropertyvalue numberformatexception returns the current value of the string valued property with the given name returns the default default value the empty string code code if there is no property with the given name the given name must not be code null code param name the name of the property return the string valued property public string get string string name string value properties get property name return value null value string default default getstring getproperty string_default_default sets the current value of the string valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name string value if value null throw new illegal argument exception string default value get default string name string old value get string name if value equals default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name value if old value equals value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name old value value settodefault setvalue illegalargumentexception defaultvalue getdefaultstring oldvalue getstring defaultvalue oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the string valued property with the given name returns the default default value the empty string code code is no default property with the given name or if the default value cannot be treated as a string the given name must not be code null code param name the name of the property return the default value of the named property public string get default string string name string value default properties get property name return value null value string default default getdefaultstring defaultproperties getproperty string_default_default sets the default value for the string valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name string value if value null throw new illegal argument exception default properties put name value setdefault illegalargumentexception defaultproperties returns whether the property with the given name has the default value in virtue of having no explicitly set value returns code false code if the given name is code null code param name the name of the property or code null code return code true code if the property has no explicitly set value and code false code otherwise including the case where the property is unknown to this object public boolean is default string name return properties contains key name isdefault containskey sets the current value of the property with the given name back to its default value has no effect if the property does not have its own current value the given name must not be code null code p note that the recommended way of re initializing a property to the appropriate default value is to call code set to default code this is implemented by removing the named value from the object thereby exposing the default value p p a property change event is always reported in the event object the property name is the name of the property and the old and new values are either strings or code null code indicating the default default value p param name the name of the property public void set to default string name object old property value properties remove name if old property value null dirty true string new value default properties get property name null n b new value null if there is no default value can t determine correct default default without knowing type fire property change event name old property value new value settodefault settodefault oldpropertyvalue oldpropertyvalue newvalue defaultproperties getproperty newvalue firepropertychangeevent oldpropertyvalue newvalue returns a list of all properties known to this preference object which have current values other than their default value return an array of property names public string property names return string properties key set to array empty string array propertynames keyset toarray empty_string_array returns a list of all properties known to this preference object which have an explicit default value set return an array of property names public string default property names return string default properties key set to array empty string array defaultpropertynames defaultproperties keyset toarray empty_string_array returns whether the current values in this preference object require saving return code true code if at least one of the properties known to this preference object has a current value different from its default value and code false code otherwise public boolean needs saving return dirty needssaving saves the non default valued properties known to this preference object to the given output stream using code properties store output stream string code p note that the output is unconditionally written even when code needs saving code is code false code p param out the output stream param header a comment to be included in the output or code null code if none exception io exception if there is a problem saving this preference object see properties store output stream string public void store output stream out string header throws io exception properties store out header dirty false outputstream needssaving ioexception outputstream outputstream ioexception loads the non default valued properties for this preference object from the given input stream using code java util properties load input stream code default property values are not affected param in the input stream exception io exception if there is a problem loading this preference object see java util properties load input stream public void load input stream in throws io exception properties load in dirty false inputstream ioexception inputstream inputstream ioexception creates a new property change event param source the object whose property has changed param property the property that has changed must not be code null code param old value the old value of the property or code null code if none param new value the new value of the property or code null code if none protected property change event object source string property object old value object new value super source if property null throw new illegal argument exception this property name property this old value old value this new value new value oldvalue newvalue propertychangeevent oldvalue newvalue illegalargumentexception propertyname oldvalue oldvalue newvalue newvalue returns the name of the property that changed p warning there is no guarantee that the property name returned is a constant string callers must compare property names using code equals code not p return the name of the property that changed public string get property return property name getproperty propertyname returns the new value of the property return the new value or code null code if not known or not relevant public object get new value return new value getnewvalue newvalue returns the old value of the property return the old value or code null code if not known or not relevant public object get old value return old value getoldvalue oldvalue notification that a property has changed p this method gets called when the observed object fires a property change event p param event the property change event object describing which property changed and how exports all non default valued preferences for all installed plugins to the provided file if a file already exists at the given location it will be deleted if there are no preferences to export no file will be written p the file that is written can be read later using the import preferences method p param path the absolute file system path of the file to export preferences to exception core exception if this method fails reasons include ul li the file could not be written li ul see import preferences i path see validate preference versions i path public static void export preferences i path path throws core exception file file path to file if file exists file delete file get parent file mkdirs i preferences service service platform get preferences service output stream output null file output stream fos null try fos new file output stream file output new buffered output stream fos i eclipse preferences node i eclipse preferences service get root node node plugin plugin preference scope service export preferences node output string null output flush fos getfd sync catch io exception e string message nls bind messages preferences errorwriting file e get message i status status new status i status error platform pi runtime i status error message e throw new core exception status finally if output null try output close catch io exception e ignore importpreferences coreexception importpreferences ipath validatepreferenceversions ipath exportpreferences ipath coreexception tofile getparentfile ipreferencesservice getpreferencesservice outputstream fileoutputstream fileoutputstream bufferedoutputstream ieclipsepreferences ieclipsepreferences getrootnode plugin_preference_scope exportpreferences ioexception preferences_errorwriting getmessage istatus istatus pi_runtime istatus coreexception ioexception loads the plugin preferences from the given file and replaces all non default valued preferences for all plugins with the values from this file p if the file contains preferences for plug ins that don t exist in the current install they are ignored this method does not validate if the plug in versions in the preference file match the currently installed plug ins clients should first call validate preference versions on the file to ensure that the versions are compatible p p the file must have been written by the export preferences method p param path the absolute file system path of the file to import preferences from exception core exception if this method fails reasons include ul li the file does not exist li li the file could not be read li ul see export preferences i path see validate preference versions i path public static void import preferences i path path throws core exception if path to file exists string msg nls bind messages preferences filenotfound path toos string throw new core exception new status i status error platform pi runtime 1 msg null i preferences service service platform get preferences service input stream input null try input new buffered input stream new file input stream path to file service import preferences input catch file not found exception e string msg nls bind messages preferences filenotfound path toos string throw new core exception new status i status error platform pi runtime 1 msg e finally if input null try input close catch io exception e ignore validatepreferenceversions exportpreferences coreexception exportpreferences ipath validatepreferenceversions ipath importpreferences ipath coreexception tofile preferences_filenotfound toosstring coreexception istatus pi_runtime ipreferencesservice getpreferencesservice inputstream bufferedinputstream fileinputstream tofile importpreferences filenotfoundexception preferences_filenotfound toosstring coreexception istatus pi_runtime ioexception validates that the preference versions in the given file match the versions of the currently installed plugins returns an ok status if all preferences match the currently installed plugins otherwise a multi status describing what plugins have preferences that don t match p if the returned status has a code i status warning code severity it means that some preferences may not be applicable but for the most part they will be compatible if the returned status has a code i status error code severity it means that the preferences will probably not be compatible p if the file contains preferences for plug ins that don t exist in the current install they are ignored p p the file must have been written by the export preferences method p param file the absolute file system path of the preference file to validate see export preferences i path see import preferences i path public static i status validate preference versions i path file preferences service service preferences service platform get preferences service return service validate versions file multistatus istatus istatus exportpreferences exportpreferences ipath importpreferences ipath istatus validatepreferenceversions ipath preferencesservice preferencesservice getpreferencesservice validateversions creates an empty preference table p use the methods code load input stream code and code store input stream code to load and store these preferences p see load input stream see store output stream string public preferences default properties new properties properties new properties default properties inputstream inputstream inputstream outputstream defaultproperties defaultproperties adds a property change listener to this preference object has no affect if the identical listener is already registered p em note em depending on the means in which the property values changed the old and new values for the property can be either typed a string representation of the value or code null code clients who wish to behave properly in all cases should all three cases in their implementation of the property change listener p param listener a property change listener public void add property change listener i property change listener listener listeners add listener addpropertychangelistener ipropertychangelistener removes the given listener from this preference object has no affect if the listener is not registered param listener a property change listener public void remove property change listener i property change listener listener listeners remove listener removepropertychangelistener ipropertychangelistener returns whether the given property is known to this preference object either by having an explicit setting or by having a default setting returns code false code if the given name is code null code param name the name of the property or code null code return code true code if either a current value or a default value is known for the named property and code false code otherwise public boolean contains string name return properties contains key name default properties contains key name containskey defaultproperties containskey fires a property change event corresponding to a change to the current value of the property with the given name param name the name of the property to be used as the property in the event object param old value the old value or code null code if not known or not relevant param new value the new value or code null code if not known or not relevant protected void fire property change event string name object old value object new value if name null throw new illegal argument exception object change listeners this listeners get listeners do we even need to fire an event if change listeners length 0 return final property change event pe new property change event this name old value new value for int i 0 i change listeners length i final i property change listener l i property change listener change listeners i i safe runnable job new i safe runnable public void handle exception throwable exception already being logged in platform run public void run throws exception l property change pe platform run job oldvalue newvalue firepropertychangeevent oldvalue newvalue illegalargumentexception changelisteners getlisteners changelisteners propertychangeevent propertychangeevent oldvalue newvalue changelisteners ipropertychangelistener ipropertychangelistener changelisteners isaferunnable isaferunnable handleexception propertychange final i property change listener l i property change listener change listeners i i safe runnable job new i safe runnable public void handle exception throwable exception already being logged in platform run ipropertychangelistener ipropertychangelistener changelisteners isaferunnable isaferunnable handleexception public void run throws exception l property change pe propertychange returns the current value of the boolean valued property with the given name returns the default default value code false code if there is no property with the given name or if the current value cannot be treated as a boolean the given name must not be code null code param name the name of the property return the boolean valued property public boolean get boolean string name string value properties get property name if value null return boolean default default return value equals preferences true getboolean getproperty boolean_default_default sets the current value of the boolean valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name boolean value boolean default value get default boolean name boolean old value get boolean name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name value preferences true preferences false if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name old value boolean true boolean false value boolean true boolean false settodefault setvalue defaultvalue getdefaultboolean oldvalue getboolean defaultvalue oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the boolean valued property with the given name returns the default default value code false code if there is no default property with the given name or if the default value cannot be treated as a boolean the given name must not be code null code param name the name of the property return the default value of the named property public boolean get default boolean string name string value default properties get property name if value null return boolean default default return value equals preferences true getdefaultboolean defaultproperties getproperty boolean_default_default sets the default value for the boolean valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name boolean value default properties put name value preferences true preferences false setdefault defaultproperties returns the current value of the double valued property with the given name returns the default default value code 0 0 code if there is no property with the given name or if the current value cannot be treated as a double the given name must not be code null code param name the name of the property return the double valued property public double get double string name return convert to double properties get property name double default default getdouble converttodouble getproperty double_default_default sets the current value of the double valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property must be a number not a nan public void set value string name double value if double is nan value throw new illegal argument exception double default value get default double name double old value get double name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name double to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new double old value new double value settodefault setvalue isnan illegalargumentexception defaultvalue getdefaultdouble oldvalue getdouble defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the double valued property with the given name returns the default default value code 0 0 code if there is no default property with the given name or if the default value cannot be treated as a double the given name must not be code null code param name the name of the property return the default value of the named property public double get default double string name return convert to double default properties get property name double default default getdefaultdouble converttodouble defaultproperties getproperty double_default_default sets the default value for the double valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property must be a number not a nan public void set default string name double value if double is nan value throw new illegal argument exception default properties put name double to string value setdefault isnan illegalargumentexception defaultproperties tostring converts the given raw property value string to a double param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to a double or the given code default value code if the raw value is code null code or cannot be parsed as a double private double convert to double string raw property value double default value double result default value if raw property value null try result double parse double raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttodouble rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parsedouble rawpropertyvalue numberformatexception returns the current value of the float valued property with the given name returns the default default value code 0 0f code if there is no property with the given name or if the current value cannot be treated as a float the given name must not be code null code param name the name of the property return the float valued property public float get float string name return convert to float properties get property name float default default getfloat converttofloat getproperty float_default_default sets the current value of the float valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property must be a number not a nan public void set value string name float value if float is nan value throw new illegal argument exception float default value get default float name float old value get float name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name float to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new float old value new float value settodefault setvalue isnan illegalargumentexception defaultvalue getdefaultfloat oldvalue getfloat defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the float valued property with the given name returns the default default value code 0 0f code if there is no default property with the given name or if the default value cannot be treated as a float the given name must not be code null code param name the name of the property return the default value of the named property public float get default float string name return convert to float default properties get property name float default default getdefaultfloat converttofloat defaultproperties getproperty float_default_default sets the default value for the float valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property must be a number not a nan public void set default string name float value if float is nan value throw new illegal argument exception default properties put name float to string value setdefault isnan illegalargumentexception defaultproperties tostring converts the given raw property value string to a float param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to a float or the given code default value code if the raw value is code null code or cannot be parsed as a float private float convert to float string raw property value float default value float result default value if raw property value null try result float parse float raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttofloat rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parsefloat rawpropertyvalue numberformatexception returns the current value of the integer valued property with the given name returns the default default value code 0 code if there is no property with the given name or if the current value cannot be treated as an integer the given name must not be code null code param name the name of the property return the int valued property public int get int string name return convert to int properties get property name int default default getint converttoint getproperty int_default_default sets the current value of the integer valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name int value int default value get default int name int old value get int name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name integer to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new integer old value new integer value settodefault setvalue defaultvalue getdefaultint oldvalue getint defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the integer valued property with the given name returns the default default value code 0 code if there is no default property with the given name or if the default value cannot be treated as an integer the given name must not be code null code param name the name of the property return the default value of the named property public int get default int string name return convert to int default properties get property name int default default getdefaultint converttoint defaultproperties getproperty int_default_default sets the default value for the integer valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name int value default properties put name integer to string value setdefault defaultproperties tostring converts the given raw property value string to an int param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to an int or the given code default value code if the raw value is code null code or cannot be parsed as an int private int convert to int string raw property value int default value int result default value if raw property value null try result integer parse int raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttoint rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parseint rawpropertyvalue numberformatexception returns the current value of the long valued property with the given name returns the default default value code 0l code if there is no property with the given name or if the current value cannot be treated as a long the given name must not be code null code param name the name of the property return the long valued property public long get long string name return convert to long properties get property name long default default getlong converttolong getproperty long_default_default sets the current value of the long valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name long value long default value get default long name long old value get long name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name long to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new long old value new long value settodefault setvalue defaultvalue getdefaultlong oldvalue getlong defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the long valued property with the given name returns the default default value code 0l code if there is no default property with the given name or if the default value cannot be treated as a long the given name must not be code null code param name the name of the property return the default value of the named property public long get default long string name return convert to long default properties get property name long default default getdefaultlong converttolong defaultproperties getproperty long_default_default sets the default value for the long valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name long value default properties put name long to string value setdefault defaultproperties tostring converts the given raw property value string to a long param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to a long or the given code default value code if the raw value is code null code or cannot be parsed as a long private long convert to long string raw property value long default value long result default value if raw property value null try result long parse long raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttolong rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parselong rawpropertyvalue numberformatexception returns the current value of the string valued property with the given name returns the default default value the empty string code code if there is no property with the given name the given name must not be code null code param name the name of the property return the string valued property public string get string string name string value properties get property name return value null value string default default getstring getproperty string_default_default sets the current value of the string valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name string value if value null throw new illegal argument exception string default value get default string name string old value get string name if value equals default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name value if old value equals value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name old value value settodefault setvalue illegalargumentexception defaultvalue getdefaultstring oldvalue getstring defaultvalue oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the string valued property with the given name returns the default default value the empty string code code is no default property with the given name or if the default value cannot be treated as a string the given name must not be code null code param name the name of the property return the default value of the named property public string get default string string name string value default properties get property name return value null value string default default getdefaultstring defaultproperties getproperty string_default_default sets the default value for the string valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name string value if value null throw new illegal argument exception default properties put name value setdefault illegalargumentexception defaultproperties returns whether the property with the given name has the default value in virtue of having no explicitly set value returns code false code if the given name is code null code param name the name of the property or code null code return code true code if the property has no explicitly set value and code false code otherwise including the case where the property is unknown to this object public boolean is default string name return properties contains key name isdefault containskey sets the current value of the property with the given name back to its default value has no effect if the property does not have its own current value the given name must not be code null code p note that the recommended way of re initializing a property to the appropriate default value is to call code set to default code this is implemented by removing the named value from the object thereby exposing the default value p p a property change event is always reported in the event object the property name is the name of the property and the old and new values are either strings or code null code indicating the default default value p param name the name of the property public void set to default string name object old property value properties remove name if old property value null dirty true string new value default properties get property name null n b new value null if there is no default value can t determine correct default default without knowing type fire property change event name old property value new value settodefault settodefault oldpropertyvalue oldpropertyvalue newvalue defaultproperties getproperty newvalue firepropertychangeevent oldpropertyvalue newvalue returns a list of all properties known to this preference object which have current values other than their default value return an array of property names public string property names return string properties key set to array empty string array propertynames keyset toarray empty_string_array returns a list of all properties known to this preference object which have an explicit default value set return an array of property names public string default property names return string default properties key set to array empty string array defaultpropertynames defaultproperties keyset toarray empty_string_array returns whether the current values in this preference object require saving return code true code if at least one of the properties known to this preference object has a current value different from its default value and code false code otherwise public boolean needs saving return dirty needssaving saves the non default valued properties known to this preference object to the given output stream using code properties store output stream string code p note that the output is unconditionally written even when code needs saving code is code false code p param out the output stream param header a comment to be included in the output or code null code if none exception io exception if there is a problem saving this preference object see properties store output stream string public void store output stream out string header throws io exception properties store out header dirty false outputstream needssaving ioexception outputstream outputstream ioexception loads the non default valued properties for this preference object from the given input stream using code java util properties load input stream code default property values are not affected param in the input stream exception io exception if there is a problem loading this preference object see java util properties load input stream public void load input stream in throws io exception properties load in dirty false inputstream ioexception inputstream inputstream ioexception creates a new property change event param source the object whose property has changed param property the property that has changed must not be code null code param old value the old value of the property or code null code if none param new value the new value of the property or code null code if none protected property change event object source string property object old value object new value super source if property null throw new illegal argument exception this property name property this old value old value this new value new value oldvalue newvalue propertychangeevent oldvalue newvalue illegalargumentexception propertyname oldvalue oldvalue newvalue newvalue returns the name of the property that changed p warning there is no guarantee that the property name returned is a constant string callers must compare property names using code equals code not p return the name of the property that changed public string get property return property name getproperty propertyname returns the new value of the property return the new value or code null code if not known or not relevant public object get new value return new value getnewvalue newvalue returns the old value of the property return the old value or code null code if not known or not relevant public object get old value return old value getoldvalue oldvalue notification that a property has changed p this method gets called when the observed object fires a property change event p param event the property change event object describing which property changed and how exports all non default valued preferences for all installed plugins to the provided file if a file already exists at the given location it will be deleted if there are no preferences to export no file will be written p the file that is written can be read later using the import preferences method p param path the absolute file system path of the file to export preferences to exception core exception if this method fails reasons include ul li the file could not be written li ul see import preferences i path see validate preference versions i path public static void export preferences i path path throws core exception file file path to file if file exists file delete file get parent file mkdirs i preferences service service platform get preferences service output stream output null file output stream fos null try fos new file output stream file output new buffered output stream fos i eclipse preferences node i eclipse preferences service get root node node plugin plugin preference scope service export preferences node output string null output flush fos getfd sync catch io exception e string message nls bind messages preferences errorwriting file e get message i status status new status i status error platform pi runtime i status error message e throw new core exception status finally if output null try output close catch io exception e ignore importpreferences coreexception importpreferences ipath validatepreferenceversions ipath exportpreferences ipath coreexception tofile getparentfile ipreferencesservice getpreferencesservice outputstream fileoutputstream fileoutputstream bufferedoutputstream ieclipsepreferences ieclipsepreferences getrootnode plugin_preference_scope exportpreferences ioexception preferences_errorwriting getmessage istatus istatus pi_runtime istatus coreexception ioexception loads the plugin preferences from the given file and replaces all non default valued preferences for all plugins with the values from this file p if the file contains preferences for plug ins that don t exist in the current install they are ignored this method does not validate if the plug in versions in the preference file match the currently installed plug ins clients should first call validate preference versions on the file to ensure that the versions are compatible p p the file must have been written by the export preferences method p param path the absolute file system path of the file to import preferences from exception core exception if this method fails reasons include ul li the file does not exist li li the file could not be read li ul see export preferences i path see validate preference versions i path public static void import preferences i path path throws core exception if path to file exists string msg nls bind messages preferences filenotfound path toos string throw new core exception new status i status error platform pi runtime 1 msg null i preferences service service platform get preferences service input stream input null try input new buffered input stream new file input stream path to file service import preferences input catch file not found exception e string msg nls bind messages preferences filenotfound path toos string throw new core exception new status i status error platform pi runtime 1 msg e finally if input null try input close catch io exception e ignore validatepreferenceversions exportpreferences coreexception exportpreferences ipath validatepreferenceversions ipath importpreferences ipath coreexception tofile preferences_filenotfound toosstring coreexception istatus pi_runtime ipreferencesservice getpreferencesservice inputstream bufferedinputstream fileinputstream tofile importpreferences filenotfoundexception preferences_filenotfound toosstring coreexception istatus pi_runtime ioexception validates that the preference versions in the given file match the versions of the currently installed plugins returns an ok status if all preferences match the currently installed plugins otherwise a multi status describing what plugins have preferences that don t match p if the returned status has a code i status warning code severity it means that some preferences may not be applicable but for the most part they will be compatible if the returned status has a code i status error code severity it means that the preferences will probably not be compatible p if the file contains preferences for plug ins that don t exist in the current install they are ignored p p the file must have been written by the export preferences method p param file the absolute file system path of the preference file to validate see export preferences i path see import preferences i path public static i status validate preference versions i path file preferences service service preferences service platform get preferences service return service validate versions file multistatus istatus istatus exportpreferences exportpreferences ipath importpreferences ipath istatus validatepreferenceversions ipath preferencesservice preferencesservice getpreferencesservice validateversions creates an empty preference table p use the methods code load input stream code and code store input stream code to load and store these preferences p see load input stream see store output stream string public preferences default properties new properties properties new properties default properties inputstream inputstream inputstream outputstream defaultproperties defaultproperties adds a property change listener to this preference object has no affect if the identical listener is already registered p em note em depending on the means in which the property values changed the old and new values for the property can be either typed a string representation of the value or code null code clients who wish to behave properly in all cases should all three cases in their implementation of the property change listener p param listener a property change listener public void add property change listener i property change listener listener listeners add listener addpropertychangelistener ipropertychangelistener removes the given listener from this preference object has no affect if the listener is not registered param listener a property change listener public void remove property change listener i property change listener listener listeners remove listener removepropertychangelistener ipropertychangelistener returns whether the given property is known to this preference object either by having an explicit setting or by having a default setting returns code false code if the given name is code null code param name the name of the property or code null code return code true code if either a current value or a default value is known for the named property and code false code otherwise public boolean contains string name return properties contains key name default properties contains key name containskey defaultproperties containskey fires a property change event corresponding to a change to the current value of the property with the given name param name the name of the property to be used as the property in the event object param old value the old value or code null code if not known or not relevant param new value the new value or code null code if not known or not relevant protected void fire property change event string name object old value object new value if name null throw new illegal argument exception object change listeners this listeners get listeners do we even need to fire an event if change listeners length 0 return final property change event pe new property change event this name old value new value for int i 0 i change listeners length i final i property change listener l i property change listener change listeners i i safe runnable job new i safe runnable public void handle exception throwable exception already being logged in platform run public void run throws exception l property change pe platform run job oldvalue newvalue firepropertychangeevent oldvalue newvalue illegalargumentexception changelisteners getlisteners changelisteners propertychangeevent propertychangeevent oldvalue newvalue changelisteners ipropertychangelistener ipropertychangelistener changelisteners isaferunnable isaferunnable handleexception propertychange final i property change listener l i property change listener change listeners i i safe runnable job new i safe runnable public void handle exception throwable exception already being logged in platform run ipropertychangelistener ipropertychangelistener changelisteners isaferunnable isaferunnable handleexception public void run throws exception l property change pe propertychange returns the current value of the boolean valued property with the given name returns the default default value code false code if there is no property with the given name or if the current value cannot be treated as a boolean the given name must not be code null code param name the name of the property return the boolean valued property public boolean get boolean string name string value properties get property name if value null return boolean default default return value equals preferences true getboolean getproperty boolean_default_default sets the current value of the boolean valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name boolean value boolean default value get default boolean name boolean old value get boolean name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name value preferences true preferences false if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name old value boolean true boolean false value boolean true boolean false settodefault setvalue defaultvalue getdefaultboolean oldvalue getboolean defaultvalue oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the boolean valued property with the given name returns the default default value code false code if there is no default property with the given name or if the default value cannot be treated as a boolean the given name must not be code null code param name the name of the property return the default value of the named property public boolean get default boolean string name string value default properties get property name if value null return boolean default default return value equals preferences true getdefaultboolean defaultproperties getproperty boolean_default_default sets the default value for the boolean valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name boolean value default properties put name value preferences true preferences false setdefault defaultproperties returns the current value of the double valued property with the given name returns the default default value code 0 0 code if there is no property with the given name or if the current value cannot be treated as a double the given name must not be code null code param name the name of the property return the double valued property public double get double string name return convert to double properties get property name double default default getdouble converttodouble getproperty double_default_default sets the current value of the double valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property must be a number not a nan public void set value string name double value if double is nan value throw new illegal argument exception double default value get default double name double old value get double name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name double to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new double old value new double value settodefault setvalue isnan illegalargumentexception defaultvalue getdefaultdouble oldvalue getdouble defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the double valued property with the given name returns the default default value code 0 0 code if there is no default property with the given name or if the default value cannot be treated as a double the given name must not be code null code param name the name of the property return the default value of the named property public double get default double string name return convert to double default properties get property name double default default getdefaultdouble converttodouble defaultproperties getproperty double_default_default sets the default value for the double valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property must be a number not a nan public void set default string name double value if double is nan value throw new illegal argument exception default properties put name double to string value setdefault isnan illegalargumentexception defaultproperties tostring converts the given raw property value string to a double param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to a double or the given code default value code if the raw value is code null code or cannot be parsed as a double private double convert to double string raw property value double default value double result default value if raw property value null try result double parse double raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttodouble rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parsedouble rawpropertyvalue numberformatexception returns the current value of the float valued property with the given name returns the default default value code 0 0f code if there is no property with the given name or if the current value cannot be treated as a float the given name must not be code null code param name the name of the property return the float valued property public float get float string name return convert to float properties get property name float default default getfloat converttofloat getproperty float_default_default sets the current value of the float valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property must be a number not a nan public void set value string name float value if float is nan value throw new illegal argument exception float default value get default float name float old value get float name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name float to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new float old value new float value settodefault setvalue isnan illegalargumentexception defaultvalue getdefaultfloat oldvalue getfloat defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the float valued property with the given name returns the default default value code 0 0f code if there is no default property with the given name or if the default value cannot be treated as a float the given name must not be code null code param name the name of the property return the default value of the named property public float get default float string name return convert to float default properties get property name float default default getdefaultfloat converttofloat defaultproperties getproperty float_default_default sets the default value for the float valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property must be a number not a nan public void set default string name float value if float is nan value throw new illegal argument exception default properties put name float to string value setdefault isnan illegalargumentexception defaultproperties tostring converts the given raw property value string to a float param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to a float or the given code default value code if the raw value is code null code or cannot be parsed as a float private float convert to float string raw property value float default value float result default value if raw property value null try result float parse float raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttofloat rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parsefloat rawpropertyvalue numberformatexception returns the current value of the integer valued property with the given name returns the default default value code 0 code if there is no property with the given name or if the current value cannot be treated as an integer the given name must not be code null code param name the name of the property return the int valued property public int get int string name return convert to int properties get property name int default default getint converttoint getproperty int_default_default sets the current value of the integer valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name int value int default value get default int name int old value get int name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name integer to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new integer old value new integer value settodefault setvalue defaultvalue getdefaultint oldvalue getint defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the integer valued property with the given name returns the default default value code 0 code if there is no default property with the given name or if the default value cannot be treated as an integer the given name must not be code null code param name the name of the property return the default value of the named property public int get default int string name return convert to int default properties get property name int default default getdefaultint converttoint defaultproperties getproperty int_default_default sets the default value for the integer valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name int value default properties put name integer to string value setdefault defaultproperties tostring converts the given raw property value string to an int param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to an int or the given code default value code if the raw value is code null code or cannot be parsed as an int private int convert to int string raw property value int default value int result default value if raw property value null try result integer parse int raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttoint rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parseint rawpropertyvalue numberformatexception returns the current value of the long valued property with the given name returns the default default value code 0l code if there is no property with the given name or if the current value cannot be treated as a long the given name must not be code null code param name the name of the property return the long valued property public long get long string name return convert to long properties get property name long default default getlong converttolong getproperty long_default_default sets the current value of the long valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name long value long default value get default long name long old value get long name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name long to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new long old value new long value settodefault setvalue defaultvalue getdefaultlong oldvalue getlong defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the long valued property with the given name returns the default default value code 0l code if there is no default property with the given name or if the default value cannot be treated as a long the given name must not be code null code param name the name of the property return the default value of the named property public long get default long string name return convert to long default properties get property name long default default getdefaultlong converttolong defaultproperties getproperty long_default_default sets the default value for the long valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name long value default properties put name long to string value setdefault defaultproperties tostring converts the given raw property value string to a long param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to a long or the given code default value code if the raw value is code null code or cannot be parsed as a long private long convert to long string raw property value long default value long result default value if raw property value null try result long parse long raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttolong rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parselong rawpropertyvalue numberformatexception returns the current value of the string valued property with the given name returns the default default value the empty string code code if there is no property with the given name the given name must not be code null code param name the name of the property return the string valued property public string get string string name string value properties get property name return value null value string default default getstring getproperty string_default_default sets the current value of the string valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name string value if value null throw new illegal argument exception string default value get default string name string old value get string name if value equals default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name value if old value equals value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name old value value settodefault setvalue illegalargumentexception defaultvalue getdefaultstring oldvalue getstring defaultvalue oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the string valued property with the given name returns the default default value the empty string code code is no default property with the given name or if the default value cannot be treated as a string the given name must not be code null code param name the name of the property return the default value of the named property public string get default string string name string value default properties get property name return value null value string default default getdefaultstring defaultproperties getproperty string_default_default sets the default value for the string valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name string value if value null throw new illegal argument exception default properties put name value setdefault illegalargumentexception defaultproperties returns whether the property with the given name has the default value in virtue of having no explicitly set value returns code false code if the given name is code null code param name the name of the property or code null code return code true code if the property has no explicitly set value and code false code otherwise including the case where the property is unknown to this object public boolean is default string name return properties contains key name isdefault containskey sets the current value of the property with the given name back to its default value has no effect if the property does not have its own current value the given name must not be code null code p note that the recommended way of re initializing a property to the appropriate default value is to call code set to default code this is implemented by removing the named value from the object thereby exposing the default value p p a property change event is always reported in the event object the property name is the name of the property and the old and new values are either strings or code null code indicating the default default value p param name the name of the property public void set to default string name object old property value properties remove name if old property value null dirty true string new value default properties get property name null n b new value null if there is no default value can t determine correct default default without knowing type fire property change event name old property value new value settodefault settodefault oldpropertyvalue oldpropertyvalue newvalue defaultproperties getproperty newvalue firepropertychangeevent oldpropertyvalue newvalue returns a list of all properties known to this preference object which have current values other than their default value return an array of property names public string property names return string properties key set to array empty string array propertynames keyset toarray empty_string_array returns a list of all properties known to this preference object which have an explicit default value set return an array of property names public string default property names return string default properties key set to array empty string array defaultpropertynames defaultproperties keyset toarray empty_string_array returns whether the current values in this preference object require saving return code true code if at least one of the properties known to this preference object has a current value different from its default value and code false code otherwise public boolean needs saving return dirty needssaving saves the non default valued properties known to this preference object to the given output stream using code properties store output stream string code p note that the output is unconditionally written even when code needs saving code is code false code p param out the output stream param header a comment to be included in the output or code null code if none exception io exception if there is a problem saving this preference object see properties store output stream string public void store output stream out string header throws io exception properties store out header dirty false outputstream needssaving ioexception outputstream outputstream ioexception loads the non default valued properties for this preference object from the given input stream using code java util properties load input stream code default property values are not affected param in the input stream exception io exception if there is a problem loading this preference object see java util properties load input stream public void load input stream in throws io exception properties load in dirty false inputstream ioexception inputstream inputstream ioexception creates a new property change event param source the object whose property has changed param property the property that has changed must not be code null code param old value the old value of the property or code null code if none param new value the new value of the property or code null code if none protected property change event object source string property object old value object new value super source if property null throw new illegal argument exception this property name property this old value old value this new value new value oldvalue newvalue propertychangeevent oldvalue newvalue illegalargumentexception propertyname oldvalue oldvalue newvalue newvalue returns the name of the property that changed p warning there is no guarantee that the property name returned is a constant string callers must compare property names using code equals code not p return the name of the property that changed public string get property return property name getproperty propertyname returns the new value of the property return the new value or code null code if not known or not relevant public object get new value return new value getnewvalue newvalue returns the old value of the property return the old value or code null code if not known or not relevant public object get old value return old value getoldvalue oldvalue notification that a property has changed p this method gets called when the observed object fires a property change event p param event the property change event object describing which property changed and how exports all non default valued preferences for all installed plugins to the provided file if a file already exists at the given location it will be deleted if there are no preferences to export no file will be written p the file that is written can be read later using the import preferences method p param path the absolute file system path of the file to export preferences to exception core exception if this method fails reasons include ul li the file could not be written li ul see import preferences i path see validate preference versions i path public static void export preferences i path path throws core exception file file path to file if file exists file delete file get parent file mkdirs i preferences service service platform get preferences service output stream output null file output stream fos null try fos new file output stream file output new buffered output stream fos i eclipse preferences node i eclipse preferences service get root node node plugin plugin preference scope service export preferences node output string null output flush fos getfd sync catch io exception e string message nls bind messages preferences errorwriting file e get message i status status new status i status error platform pi runtime i status error message e throw new core exception status finally if output null try output close catch io exception e ignore importpreferences coreexception importpreferences ipath validatepreferenceversions ipath exportpreferences ipath coreexception tofile getparentfile ipreferencesservice getpreferencesservice outputstream fileoutputstream fileoutputstream bufferedoutputstream ieclipsepreferences ieclipsepreferences getrootnode plugin_preference_scope exportpreferences ioexception preferences_errorwriting getmessage istatus istatus pi_runtime istatus coreexception ioexception loads the plugin preferences from the given file and replaces all non default valued preferences for all plugins with the values from this file p if the file contains preferences for plug ins that don t exist in the current install they are ignored this method does not validate if the plug in versions in the preference file match the currently installed plug ins clients should first call validate preference versions on the file to ensure that the versions are compatible p p the file must have been written by the export preferences method p param path the absolute file system path of the file to import preferences from exception core exception if this method fails reasons include ul li the file does not exist li li the file could not be read li ul see export preferences i path see validate preference versions i path public static void import preferences i path path throws core exception if path to file exists string msg nls bind messages preferences filenotfound path toos string throw new core exception new status i status error platform pi runtime 1 msg null i preferences service service platform get preferences service input stream input null try input new buffered input stream new file input stream path to file service import preferences input catch file not found exception e string msg nls bind messages preferences filenotfound path toos string throw new core exception new status i status error platform pi runtime 1 msg e finally if input null try input close catch io exception e ignore validatepreferenceversions exportpreferences coreexception exportpreferences ipath validatepreferenceversions ipath importpreferences ipath coreexception tofile preferences_filenotfound toosstring coreexception istatus pi_runtime ipreferencesservice getpreferencesservice inputstream bufferedinputstream fileinputstream tofile importpreferences filenotfoundexception preferences_filenotfound toosstring coreexception istatus pi_runtime ioexception validates that the preference versions in the given file match the versions of the currently installed plugins returns an ok status if all preferences match the currently installed plugins otherwise a multi status describing what plugins have preferences that don t match p if the returned status has a code i status warning code severity it means that some preferences may not be applicable but for the most part they will be compatible if the returned status has a code i status error code severity it means that the preferences will probably not be compatible p if the file contains preferences for plug ins that don t exist in the current install they are ignored p p the file must have been written by the export preferences method p param file the absolute file system path of the preference file to validate see export preferences i path see import preferences i path public static i status validate preference versions i path file preferences service service preferences service platform get preferences service return service validate versions file multistatus istatus istatus exportpreferences exportpreferences ipath importpreferences ipath istatus validatepreferenceversions ipath preferencesservice preferencesservice getpreferencesservice validateversions creates an empty preference table p use the methods code load input stream code and code store input stream code to load and store these preferences p see load input stream see store output stream string public preferences default properties new properties properties new properties default properties inputstream inputstream inputstream outputstream defaultproperties defaultproperties adds a property change listener to this preference object has no affect if the identical listener is already registered p em note em depending on the means in which the property values changed the old and new values for the property can be either typed a string representation of the value or code null code clients who wish to behave properly in all cases should all three cases in their implementation of the property change listener p param listener a property change listener public void add property change listener i property change listener listener listeners add listener addpropertychangelistener ipropertychangelistener removes the given listener from this preference object has no affect if the listener is not registered param listener a property change listener public void remove property change listener i property change listener listener listeners remove listener removepropertychangelistener ipropertychangelistener returns whether the given property is known to this preference object either by having an explicit setting or by having a default setting returns code false code if the given name is code null code param name the name of the property or code null code return code true code if either a current value or a default value is known for the named property and code false code otherwise public boolean contains string name return properties contains key name default properties contains key name containskey defaultproperties containskey fires a property change event corresponding to a change to the current value of the property with the given name param name the name of the property to be used as the property in the event object param old value the old value or code null code if not known or not relevant param new value the new value or code null code if not known or not relevant protected void fire property change event string name object old value object new value if name null throw new illegal argument exception object change listeners this listeners get listeners do we even need to fire an event if change listeners length 0 return final property change event pe new property change event this name old value new value for int i 0 i change listeners length i final i property change listener l i property change listener change listeners i i safe runnable job new i safe runnable public void handle exception throwable exception already being logged in platform run public void run throws exception l property change pe platform run job oldvalue newvalue firepropertychangeevent oldvalue newvalue illegalargumentexception changelisteners getlisteners changelisteners propertychangeevent propertychangeevent oldvalue newvalue changelisteners ipropertychangelistener ipropertychangelistener changelisteners isaferunnable isaferunnable handleexception propertychange final i property change listener l i property change listener change listeners i i safe runnable job new i safe runnable public void handle exception throwable exception already being logged in platform run ipropertychangelistener ipropertychangelistener changelisteners isaferunnable isaferunnable handleexception public void run throws exception l property change pe propertychange returns the current value of the boolean valued property with the given name returns the default default value code false code if there is no property with the given name or if the current value cannot be treated as a boolean the given name must not be code null code param name the name of the property return the boolean valued property public boolean get boolean string name string value properties get property name if value null return boolean default default return value equals preferences true getboolean getproperty boolean_default_default sets the current value of the boolean valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name boolean value boolean default value get default boolean name boolean old value get boolean name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name value preferences true preferences false if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name old value boolean true boolean false value boolean true boolean false settodefault setvalue defaultvalue getdefaultboolean oldvalue getboolean defaultvalue oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the boolean valued property with the given name returns the default default value code false code if there is no default property with the given name or if the default value cannot be treated as a boolean the given name must not be code null code param name the name of the property return the default value of the named property public boolean get default boolean string name string value default properties get property name if value null return boolean default default return value equals preferences true getdefaultboolean defaultproperties getproperty boolean_default_default sets the default value for the boolean valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name boolean value default properties put name value preferences true preferences false setdefault defaultproperties returns the current value of the double valued property with the given name returns the default default value code 0 0 code if there is no property with the given name or if the current value cannot be treated as a double the given name must not be code null code param name the name of the property return the double valued property public double get double string name return convert to double properties get property name double default default getdouble converttodouble getproperty double_default_default sets the current value of the double valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property must be a number not a nan public void set value string name double value if double is nan value throw new illegal argument exception double default value get default double name double old value get double name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name double to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new double old value new double value settodefault setvalue isnan illegalargumentexception defaultvalue getdefaultdouble oldvalue getdouble defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the double valued property with the given name returns the default default value code 0 0 code if there is no default property with the given name or if the default value cannot be treated as a double the given name must not be code null code param name the name of the property return the default value of the named property public double get default double string name return convert to double default properties get property name double default default getdefaultdouble converttodouble defaultproperties getproperty double_default_default sets the default value for the double valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property must be a number not a nan public void set default string name double value if double is nan value throw new illegal argument exception default properties put name double to string value setdefault isnan illegalargumentexception defaultproperties tostring converts the given raw property value string to a double param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to a double or the given code default value code if the raw value is code null code or cannot be parsed as a double private double convert to double string raw property value double default value double result default value if raw property value null try result double parse double raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttodouble rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parsedouble rawpropertyvalue numberformatexception returns the current value of the float valued property with the given name returns the default default value code 0 0f code if there is no property with the given name or if the current value cannot be treated as a float the given name must not be code null code param name the name of the property return the float valued property public float get float string name return convert to float properties get property name float default default getfloat converttofloat getproperty float_default_default sets the current value of the float valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property must be a number not a nan public void set value string name float value if float is nan value throw new illegal argument exception float default value get default float name float old value get float name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name float to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new float old value new float value settodefault setvalue isnan illegalargumentexception defaultvalue getdefaultfloat oldvalue getfloat defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the float valued property with the given name returns the default default value code 0 0f code if there is no default property with the given name or if the default value cannot be treated as a float the given name must not be code null code param name the name of the property return the default value of the named property public float get default float string name return convert to float default properties get property name float default default getdefaultfloat converttofloat defaultproperties getproperty float_default_default sets the default value for the float valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property must be a number not a nan public void set default string name float value if float is nan value throw new illegal argument exception default properties put name float to string value setdefault isnan illegalargumentexception defaultproperties tostring converts the given raw property value string to a float param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to a float or the given code default value code if the raw value is code null code or cannot be parsed as a float private float convert to float string raw property value float default value float result default value if raw property value null try result float parse float raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttofloat rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parsefloat rawpropertyvalue numberformatexception returns the current value of the integer valued property with the given name returns the default default value code 0 code if there is no property with the given name or if the current value cannot be treated as an integer the given name must not be code null code param name the name of the property return the int valued property public int get int string name return convert to int properties get property name int default default getint converttoint getproperty int_default_default sets the current value of the integer valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name int value int default value get default int name int old value get int name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name integer to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new integer old value new integer value settodefault setvalue defaultvalue getdefaultint oldvalue getint defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the integer valued property with the given name returns the default default value code 0 code if there is no default property with the given name or if the default value cannot be treated as an integer the given name must not be code null code param name the name of the property return the default value of the named property public int get default int string name return convert to int default properties get property name int default default getdefaultint converttoint defaultproperties getproperty int_default_default sets the default value for the integer valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name int value default properties put name integer to string value setdefault defaultproperties tostring converts the given raw property value string to an int param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to an int or the given code default value code if the raw value is code null code or cannot be parsed as an int private int convert to int string raw property value int default value int result default value if raw property value null try result integer parse int raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttoint rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parseint rawpropertyvalue numberformatexception returns the current value of the long valued property with the given name returns the default default value code 0l code if there is no property with the given name or if the current value cannot be treated as a long the given name must not be code null code param name the name of the property return the long valued property public long get long string name return convert to long properties get property name long default default getlong converttolong getproperty long_default_default sets the current value of the long valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name long value long default value get default long name long old value get long name if value default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name long to string value if old value value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name new long old value new long value settodefault setvalue defaultvalue getdefaultlong oldvalue getlong defaultvalue tostring oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the long valued property with the given name returns the default default value code 0l code if there is no default property with the given name or if the default value cannot be treated as a long the given name must not be code null code param name the name of the property return the default value of the named property public long get default long string name return convert to long default properties get property name long default default getdefaultlong converttolong defaultproperties getproperty long_default_default sets the default value for the long valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name long value default properties put name long to string value setdefault defaultproperties tostring converts the given raw property value string to a long param raw property value the raw property value or code null code if none param default value the default value return the raw value converted to a long or the given code default value code if the raw value is code null code or cannot be parsed as a long private long convert to long string raw property value long default value long result default value if raw property value null try result long parse long raw property value catch number format exception e raw value cannot be treated as one of these return result rawpropertyvalue defaultvalue defaultvalue converttolong rawpropertyvalue defaultvalue defaultvalue rawpropertyvalue parselong rawpropertyvalue numberformatexception returns the current value of the string valued property with the given name returns the default default value the empty string code code if there is no property with the given name the given name must not be code null code param name the name of the property return the string valued property public string get string string name string value properties get property name return value null value string default default getstring getproperty string_default_default sets the current value of the string valued property with the given name the given name must not be code null code p a property change event is reported if the current value of the property actually changes from its previous value in the event object the property name is the name of the property and the old and new values are wrapped as objects p p if the given value is the same as the corresponding default value for the given property the explicit setting is deleted note that the recommended way of re initializing a property to its default value is to call code set to default code p param name the name of the property param value the new current value of the property public void set value string name string value if value null throw new illegal argument exception string default value get default string name string old value get string name if value equals default value object removed properties remove name if removed null removed an explicit setting dirty true else properties put name value if old value equals value mark as dirty since value did really change dirty true report property change if get value now returns different value fire property change event name old value value settodefault setvalue illegalargumentexception defaultvalue getdefaultstring oldvalue getstring defaultvalue oldvalue getvalue firepropertychangeevent oldvalue returns the default value for the string valued property with the given name returns the default default value the empty string code code is no default property with the given name or if the default value cannot be treated as a string the given name must not be code null code param name the name of the property return the default value of the named property public string get default string string name string value default properties get property name return value null value string default default getdefaultstring defaultproperties getproperty string_default_default sets the default value for the string valued property with the given name the given name must not be code null code p note that the current value of the property is affected if the property s current value was its old default value in which case it changes to the new default value if the property s current is different from its old default value its current value is unaffected no property change events are reported by changing default values p param name the name of the property param value the new default value for the property public void set default string name string value if value null throw new illegal argument exception default properties put name value setdefault illegalargumentexception defaultproperties returns whether the property with the given name has the default value in virtue of having no explicitly set value returns code false code if the given name is code null code param name the name of the property or code null code return code true code if the property has no explicitly set value and code false code otherwise including the case where the property is unknown to this object public boolean is default string name return properties contains key name isdefault containskey sets the current value of the property with the given name back to its default value has no effect if the property does not have its own current value the given name must not be code null code p note that the recommended way of re initializing a property to the appropriate default value is to call code set to default code this is implemented by removing the named value from the object thereby exposing the default value p p a property change event is always reported in the event object the property name is the name of the property and the old and new values are either strings or code null code indicating the default default value p param name the name of the property public void set to default string name object old property value properties remove name if old property value null dirty true string new value default properties get property name null n b new value null if there is no default value can t determine correct default default without knowing type fire property change event name old property value new value settodefault settodefault oldpropertyvalue oldpropertyvalue newvalue defaultproperties getproperty newvalue firepropertychangeevent oldpropertyvalue newvalue returns a list of all properties known to this preference object which have current values other than their default value return an array of property names public string property names return string properties key set to array empty string array propertynames keyset toarray empty_string_array returns a list of all properties known to this preference object which have an explicit default value set return an array of property names public string default property names return string default properties key set to array empty string array defaultpropertynames defaultproperties keyset toarray empty_string_array returns whether the current values in this preference object require saving return code true code if at least one of the properties known to this preference object has a current value different from its default value and code false code otherwise public boolean needs saving return dirty needssaving saves the non default valued properties known to this preference object to the given output stream using code properties store output stream string code p note that the output is unconditionally written even when code needs saving code is code false code p param out the output stream param header a comment to be included in the output or code null code if none exception io exception if there is a problem saving this preference object see properties store output stream string public void store output stream out string header throws io exception properties store out header dirty false outputstream needssaving ioexception outputstream outputstream ioexception loads the non default valued properties for this preference object from the given input stream using code java util properties load input stream code default property values are not affected param in the input stream exception io exception if there is a problem loading this preference object see java util properties load input stream public void load input stream in throws io exception properties load in dirty false inputstream ioexception inputstream inputstream ioexception interface string modify listener public void value changed string s stringmodifylistener valuechanged param parent shell public browser descriptor dialog shell parent shell i browser descriptor working copy browser super parent shell this browser browser is edit true parentshell browserdescriptordialog parentshell ibrowserdescriptorworkingcopy parentshell isedit public browser descriptor dialog shell parent shell super parent shell browser browser manager get instance create external web browser is edit false browserdescriptordialog parentshell parentshell browsermanager getinstance createexternalwebbrowser isedit protected void configure shell shell shell super configure shell shell if is edit shell set text messages edit external browser else shell set text messages create browser configureshell configureshell isedit settext editexternalbrowser settext createbrowser protected text create text composite comp string txt final string modify listener listener final text text new text comp swt border if txt null text set text txt grid data data new grid data grid data horizontal align fill grid data vertical align beginning data width hint 250 text set layout data data if listener null text add modify listener new modify listener public void modify text modify event e listener value changed text get text return text createtext stringmodifylistener settext griddata griddata griddata horizontal_align_fill griddata vertical_align_beginning widthhint setlayoutdata addmodifylistener modifylistener modifytext modifyevent valuechanged gettext if listener null text add modify listener new modify listener public void modify text modify event e listener value changed text get text addmodifylistener modifylistener modifytext modifyevent valuechanged gettext protected control create dialog area composite parent composite composite composite super create dialog area parent grid layout composite get layout num columns 3 platformui get workbench get help system set help composite context ids pref browser dialog swt util create label composite messages name browser name textfield create text composite browser get name new string modify listener public void value changed string s browser set name s validate fields new label composite swt none swt util create label composite messages location browser location textfield create text composite browser get location new string modify listener public void value changed string s browser set location s validate fields browse button swt util create button composite messages browse browse button add selection listener new selection adapter public void widget selected selection event e file dialog dialog new file dialog get shell swt open dialog set text messages browse message string fname browser location textfield get text dialog set file name fname fname dialog open if fname null browser location textfield set text fname swt util create label composite messages parameters browser parameters textfield create text composite browser get parameters new string modify listener public void value changed string s browser set parameters s new label composite swt none new label composite swt none label url label new label composite swt none url label set text nls bind messages parameters message i browser descriptor url parameter return composite createdialogarea createdialogarea gridlayout getlayout numcolumns getworkbench gethelpsystem sethelp contextids pref_browser_dialog swtutil createlabel browsernametextfield createtext getname stringmodifylistener valuechanged setname validatefields swtutil createlabel browserlocationtextfield createtext getlocation stringmodifylistener valuechanged setlocation validatefields browsebutton swtutil createbutton browsebutton addselectionlistener selectionadapter widgetselected selectionevent filedialog filedialog getshell settext browsemessage browserlocationtextfield gettext setfilename browserlocationtextfield settext swtutil createlabel browserparameterstextfield createtext getparameters stringmodifylistener valuechanged setparameters urllabel urllabel settext parametersmessage ibrowserdescriptor url_parameter swt util create label composite messages name browser name textfield create text composite browser get name new string modify listener public void value changed string s browser set name s validate fields swtutil createlabel browsernametextfield createtext getname stringmodifylistener valuechanged setname validatefields swt util create label composite messages location browser location textfield create text composite browser get location new string modify listener public void value changed string s browser set location s validate fields swtutil createlabel browserlocationtextfield createtext getlocation stringmodifylistener valuechanged setlocation validatefields browse button add selection listener new selection adapter public void widget selected selection event e file dialog dialog new file dialog get shell swt open dialog set text messages browse message string fname browser location textfield get text dialog set file name fname fname dialog open if fname null browser location textfield set text fname browsebutton addselectionlistener selectionadapter widgetselected selectionevent filedialog filedialog getshell settext browsemessage browserlocationtextfield gettext setfilename browserlocationtextfield settext swt util create label composite messages parameters browser parameters textfield create text composite browser get parameters new string modify listener public void value changed string s browser set parameters s swtutil createlabel browserparameterstextfield createtext getparameters stringmodifylistener valuechanged setparameters protected void ok pressed do simple field validation to at least ensure target directory entered is valid pathname try file file new file browser get location if file is file web browser util open error messages location invalid return catch exception e web browser util open error messages location invalid return browser save super ok pressed okpressed getlocation isfile webbrowserutil openerror locationinvalid webbrowserutil openerror locationinvalid okpressed private void setok button enabled boolean cur is enabled if ok button null ok button get button i dialog constants ok id if ok button null ok button set enabled cur is enabled setokbuttonenabled curisenabled okbutton okbutton getbutton idialogconstants ok_id okbutton okbutton setenabled curisenabled protected control create button bar composite parent control button control super create button bar parent validate fields return button control createbuttonbar buttoncontrol createbuttonbar validatefields buttoncontrol protected void validate fields boolean valid true string name browser name textfield get text if name null name trim length 1 valid false string location browser location textfield get text if location null location trim length 1 valid false setok button enabled valid validatefields browsernametextfield gettext browserlocationtextfield gettext setokbuttonenabled private constructor to block instance creation private platform super adds the given authorization information to the key ring the information is relevant for the specified protection space and the given authorization scheme the protection space is defined by the combination of the given server url and realm the authorization scheme determines what the authorization information contains and how it should be used the authorization information is a code map code of code string code to code string code and typically contains information such as user names and passwords param server url the url identifying the server for this authorization information for example http www example com param realm the subsection of the given server to which this authorization information applies for example realm1 example com or for no realm param auth scheme the scheme for which this authorization information applies for example basic or for no authorization scheme param info a code map code containing authorization information such as user names and passwords key type code string code value type code string code exception core exception if there are problems setting the authorization information reasons include ul li the keyring could not be saved li ul public static void add authorization info url server url string realm string auth scheme map info throws core exception internal platform get default add authorization info server url realm auth scheme info serverurl authscheme coreexception addauthorizationinfo serverurl authscheme coreexception internalplatform getdefault addauthorizationinfo serverurl authscheme adds the given log listener to the notification list of the platform p once registered a listener starts receiving notification as entries are added to plug in logs via code i log log code the listener continues to receive notifications until it is replaced or removed p param listener the listener to register see i log add log listener i log listener see remove log listener i log listener public static void add log listener i log listener listener internal platform get default add log listener listener ilog ilog addloglistener iloglistener removeloglistener iloglistener addloglistener iloglistener internalplatform getdefault addloglistener adds the specified resource to the protection space specified by the given realm all targets at or deeper than the depth of the last symbolic element in the path of the given resource url are assumed to be in the same protection space param resource url the url identifying the resources to be added to the specified protection space for example http www example com folder param realm the name of the protection space for example realm1 example com exception core exception if there are problems setting the authorization information reasons include ul li the key ring could not be saved li ul public static void add protection space url resource url string realm throws core exception internal platform get default add protection space resource url realm resourceurl coreexception addprotectionspace resourceurl coreexception internalplatform getdefault addprotectionspace resourceurl returns a url that is the local equivalent of the supplied url this method is expected to be used with the plug in relative ur ls returned by i plugin descriptor bundle get entry and platform find if the specified url is not a plug in relative url it is returned as is if the specified url is a plug in relative url of a file including jar archive it is returned as a locally accessible url using file protocol extracting caching the file locally if required if the specified url is a plug in relative url of a directory the directory and any files and directories under it are made locally accessible likewise if param url original plug in relative url return the resolved url exception io exception if unable to resolve url see resolve url see find bundle i path see bundle get entry string public static url as localurl url url throws io exception return internal platform get default as localurl url urls iplugindescriptor getentry ioexception ipath getentry aslocalurl ioexception internalplatform getdefault aslocalurl takes down the splash screen if one was put up public static void end splash internal platform get default end splash endsplash internalplatform getdefault endsplash removes the authorization information for the specified protection space and given authorization scheme the protection space is defined by the given server url and realm param server url the url identifying the server to remove the authorization information for for example http www example com param realm the subsection of the given server to remove the authorization information for for example realm1 example com or for no realm param auth scheme the scheme for which the authorization information to remove applies for example basic or for no authorization scheme exception core exception if there are problems removing the authorization information reasons include ul li the keyring could not be saved li ul public static void flush authorization info url server url string realm string auth scheme throws core exception internal platform get default flush authorization info server url realm auth scheme serverurl authscheme coreexception flushauthorizationinfo serverurl authscheme coreexception internalplatform getdefault flushauthorizationinfo serverurl authscheme returns the adapter manager used for extending code i adaptable code objects return the adapter manager for this platform see i adapter manager public static i adapter manager get adapter manager return internal platform get default get adapter manager iadaptable iadaptermanager iadaptermanager getadaptermanager internalplatform getdefault getadaptermanager returns the authorization information for the specified protection space and given authorization scheme the protection space is defined by the given server url and realm returns code null code if no such information exists param server url the url identifying the server for the authorization information for example http www example com param realm the subsection of the given server to which the authorization information applies for example realm1 example com or for no realm param auth scheme the scheme for which the authorization information applies for example basic or for no authorization scheme return the authorization information for the specified protection space and given authorization scheme or code null code if no such information exists public static map get authorization info url server url string realm string auth scheme return internal platform get default get authorization info server url realm auth scheme serverurl authscheme getauthorizationinfo serverurl authscheme internalplatform getdefault getauthorizationinfo serverurl authscheme returns the command line args provided to the eclipse runtime layer when it was first run the returned value does not include arguments consumed by the lower levels of eclipse e g os gi or the launcher note that individual platform runnables may be provided with different arguments if they are being run individually rather than with code platform run code return the command line used to start the platform public static string get command line args return internal platform get default get command line args osgi getcommandlineargs internalplatform getdefault getcommandlineargs returns the content type manager return the content type manager since 3 0 public static i content type manager get content type manager return internal platform get default get content type manager icontenttypemanager getcontenttypemanager internalplatform getdefault getcontenttypemanager returns the identified option code null code is returned if no such option is found options are specified in the general form i lt plug in id gt lt option path gt i for example code org eclipse core runtime debug code param option the name of the option to lookup return the value of the requested debug option or code null code public static string get debug option string option return internal platform get default get option option getdebugoption internalplatform getdefault getoption returns the location of the platform working directory p callers of this method should consider using code get instance location code instead in various typically non ide related configurations of eclipse the platform working directory may not be on the local file system as such the more general form of this location is as a url p return the location of the platform see get instance location public static i path get location throws illegal state exception return internal platform get default get location getinstancelocation getinstancelocation ipath getlocation illegalstateexception internalplatform getdefault getlocation returns the location of the platform log file this file may contain information about errors that have previously occurred during this invocation of the platform p it is recommended not to keep this value as the log location may vary when an instance location is being set p p note it is very important that users of this method do not leave the log file open for extended periods of time doing so may prevent others from writing to the log file which could result in important error messages being lost it is strongly recommended that clients wanting to read the log file for extended periods should copy the log file contents elsewhere and immediately close the original file p return the path of the log file on disk public static i path get log file location return internal platform get default get meta area get log location ipath getlogfilelocation internalplatform getdefault getmetaarea getloglocation returns the plug in runtime object for the identified plug in or code null code if no such plug in can be found if the plug in is defined but not yet activated the plug in will be activated before being returned p b note b this method is only able to find and return plug in objects for plug ins described using plugin xml according to the traditional eclipse conventions eclipse 3 0 permits plug ins to be described in manifest mf files and to define their own bundle activators such plug ins cannot be discovered by this method p param id the unique identifier of the desired plug in e g code com example acme code return the plug in runtime object or code null code deprecated this method only works if the compatibility layer is installed and must not be used otherwise see the comments on link i plugin descriptor get plugin for details public static plugin get plugin string id try i plugin registry registry get plugin registry if registry null throw new illegal state exception i plugin descriptor pd registry get plugin descriptor id if pd null return null return pd get plugin catch core exception e todo log the exception return null iplugindescriptor getplugin getplugin ipluginregistry getpluginregistry illegalstateexception iplugindescriptor getplugindescriptor getplugin coreexception returns the plug in registry for this platform return the plug in registry see i plugin registry deprecated code i plugin registry code was refactored in eclipse 3 0 this method only works if the compatibility layer is installed and must not be used otherwise see the comments on link i plugin registry and its methods for details public static i plugin registry get plugin registry bundle compatibility internal platform get default get bundle compatibility helper pi runtime compatibility if compatibility null throw new illegal state exception class old internal platform null try old internal platform compatibility load class org eclipse core internal plugins internal platform non nls 1 method get plugin registry old internal platform get method get plugin registry null non nls 1 return i plugin registry get plugin registry invoke old internal platform null catch exception e ignore the exceptions return null return null ipluginregistry ipluginregistry ipluginregistry ipluginregistry getpluginregistry internalplatform getdefault getbundle compatibilityhelper pi_runtime_compatibility illegalstateexception oldinternalplatform oldinternalplatform loadclass internalplatform getpluginregistry oldinternalplatform getmethod getpluginregistry ipluginregistry getpluginregistry oldinternalplatform returns the location in the local file system of the plug in state area for the given plug in the platform must be running p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings p param plugin the plug in whose state location is returned return a local file system path public static i path get plugin state location plugin plugin return plugin get state location ipath getpluginstatelocation getstatelocation returns the protection space realm for the specified resource or code null code if the realm is unknown param resource url the url of the resource whose protection space is returned for example http www example com folder return the protection space realm for the specified resource or code null code if the realm is unknown public static string get protection space url resource url return internal platform get default get protection space resource url resourceurl getprotectionspace resourceurl internalplatform getdefault getprotectionspace resourceurl removes the indicated identical log listener from the notification list of the platform if no such listener exists no action is taken param listener the listener to de register see i log remove log listener i log listener see add log listener i log listener public static void remove log listener i log listener listener internal platform get default remove log listener listener ilog removeloglistener iloglistener addloglistener iloglistener removeloglistener iloglistener internalplatform getdefault removeloglistener returns a url which is the resolved equivalent of the supplied url this method is expected to be used with the plug in relative ur ls returned by i plugin descriptor bundle get entry and platform find p if the specified url is not a plug in relative url it is returned as is if the specified url is a plug in relative url this method attempts to reduce the given url to one which is native to the java class library eg file http etc p p note however that users of this api should not assume too much about the results of this method while it may consistently return a file url in certain installation configurations others may result in jar or http ur ls p param url original plug in relative url return the resolved url exception io exception if unable to resolve url see as localurl url see find bundle i path see bundle get entry string public static url resolve url url throws io exception return internal platform get default resolve url urls iplugindescriptor getentry urls ioexception aslocalurl ipath getentry ioexception internalplatform getdefault runs the given runnable in a protected mode exceptions thrown in the runnable are logged and passed to the runnable s exception handler such exceptions are not rethrown by this method param runnable the runnable to run public static void run i safe runnable runnable internal platform get default run runnable isaferunnable internalplatform getdefault returns the platform job manager return the platform s job manager since 3 0 public static i job manager get job manager return internal platform get default get job manager ijobmanager getjobmanager internalplatform getdefault getjobmanager returns the extension registry for this platform return the extension registry see i extension registry since 3 0 public static i extension registry get extension registry return internal platform get default get registry iextensionregistry iextensionregistry getextensionregistry internalplatform getdefault getregistry returns a url for the given path in the given bundle returns code null code if the url could not be computed or created param bundle the bundle in which to search param path path relative to plug in installation location return a url for the given path or code null code the actual form of the returned url is not specified see find bundle i path map see resolve url see as localurl url since 3 0 public static url find bundle bundle i path path return find support find bundle path null ipath aslocalurl ipath findsupport returns a url for the given path in the given bundle returns code null code if the url could not be computed or created p find looks for this path in given bundle and any attached fragments code null code is returned if no such entry is found note that there is no specific order to the fragments p p the following arguments may also be used pre nl for language specific information os for operating system specific information ws for windowing system specific information pre p p a path of nl about properties in an environment with a default locale of en ca will return a url corresponding to the first place about properties is found according to the following order pre plugin root nl en ca about properties fragment1 root nl en ca about properties fragment2 root nl en ca about properties plugin root nl en about properties fragment1 root nl en about properties fragment2 root nl en about properties plugin root about properties fragment1 root about properties fragment2 root about properties pre p p the current environment variable values can be overridden using the override map argument p param bundle the bundle in which to search param path file path relative to plug in installation location param override map of override substitution arguments to be used for any arg path elements the map keys correspond to the substitution arguments eg nl or os the resulting values must be of type java lang string if the map is code null code or does not contain the required substitution argument the default is used return a url for the given path or code null code the actual form of the returned url is not specified see resolve url see as localurl url since 3 0 public static url find bundle bundle i path path map override return find support find bundle path override en_ca aslocalurl ipath findsupport returns the location in the local file system of the plug in state area for the given bundle if the plug in state area did not exist prior to this call it is created p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings and other configuration parameters p param bundle the bundle whose state location if returned return a local file system path since 3 0 public static i path get state location bundle bundle return internal platform get default get state location bundle ipath getstatelocation internalplatform getdefault getstatelocation returns a number that changes whenever the set of installed plug ins changes this can be used for invalidating caches that are based on the set of currently installed plug ins e g extensions return a number related to the set of installed plug ins since 3 1 public static long get state stamp return internal platform get default get state time stamp getstatestamp internalplatform getdefault getstatetimestamp returns the log for the given bundle if no such log exists one is created param bundle the bundle whose log is returned return the log for the given bundle since 3 0 public static i log get log bundle bundle return internal platform get default get log bundle ilog getlog internalplatform getdefault getlog returns the given bundle s resource bundle for the current locale p this resource bundle is typically stored as the plugin properties file in the plug in itself and contains any translatable strings used in the plug in manifest file plugin xml p p this mechanism is intended only for externalizing strings found in the plug in manifest file using this method for externalizing strings in your code may result in degraded memory performance p param bundle the bundle whose resource bundle is being queried return the resource bundle exception missing resource exception if the resource bundle was not found since 3 0 public static resource bundle get resource bundle bundle bundle throws missing resource exception return internal platform get default get resource bundle bundle missingresourceexception resourcebundle getresourcebundle missingresourceexception internalplatform getdefault getresourcebundle returns a resource string corresponding to the given argument value if the argument value specifies a resource key the string is looked up in the default resource bundle for the given runtime bundle if the argument does not specify a valid key the argument itself is returned as the resource string the key lookup is performed in the file referenced in the bundle localization header of the bundle manifest if a resource string corresponding to the key is not found in the resource bundle the key value or any default text following the key in the argument value is returned as the resource string a key is identified as a string beginning with the character note that the character is stripped off prior to lookup in the resource bundle p equivalent to code get resource string bundle value get resource bundle code p param bundle the bundle whose resource bundle is being queried param value the value to look for return the resource string see get resource bundle bundle since 3 0 public static string get resource string bundle bundle string value return internal platform get default get resource string bundle value getresourcestring getresourcebundle getresourcebundle getresourcestring internalplatform getdefault getresourcestring returns a resource string corresponding to the given argument value and resource bundle in the given runtime bundle if the argument value specifies a resource key the string is looked up in the given resource bundle if the argument does not specify a valid key the argument itself is returned as the resource string the key lookup is performed against the specified resource bundle if a resource string corresponding to the key is not found in the resource bundle the key value or any default text following the key in the argument value is returned as the resource string a key is identified as a string beginning with the character note that the character is stripped off prior to lookup in the resource bundle p for example assume resource bundle plugin properties contains name project name pre get resource string hello world returns hello world li get resource string name returns project name li get resource string name hello world returns project name li get resource string abcd hello world returns hello world li get resource string abcd returns abcd li get resource string name returns name li pre p param bundle the bundle whose resource bundle is being queried param value the value param resource bundle the resource bundle to query return the resource string see get resource bundle bundle since 3 0 public static string get resource string bundle bundle string value resource bundle resource bundle return internal platform get default get resource string bundle value resource bundle getresourcestring getresourcestring getresourcestring getresourcestring getresourcestring getresourcestring resourcebundle getresourcebundle getresourcestring resourcebundle resourcebundle internalplatform getdefault getresourcestring resourcebundle returns the string name of the current system architecture the value is a user defined string if the architecture is specified on the command line otherwise it is the value returned by code java lang system get property os arch code return the string name of the current system architecture since 3 0 public static string getos arch return internal platform get default getos arch getproperty getosarch internalplatform getdefault getosarch returns the string name of the current locale for use in finding files whose path starts with code nl code return the string name of the current locale since 3 0 public static string getnl return internal platform get default getnl internalplatform getdefault returns the string name of the current operating system for use in finding files whose path starts with code os code code os unknown code is returned if the operating system cannot be determined the value may indicate one of the operating systems known to the platform as specified in code knownos values code or a user defined string if the operating system name is specified on the command line return the string name of the current operating system since 3 0 public static string getos return internal platform get default getos os_unknown knownosvalues internalplatform getdefault returns the string name of the current window system for use in finding files whose path starts with code ws code code null code is returned if the window system cannot be determined return the string name of the current window system or code null code since 3 0 public static string getws return internal platform get default getws internalplatform getdefault returns the arguments not consumed by the framework implementation itself which arguments are consumed is implementation specific these arguments are available for use by the application return the array of command line arguments not consumed by the framework since 3 0 public static string get application args return internal platform get default get application args getapplicationargs internalplatform getdefault getapplicationargs returns the platform administrator for this running eclipse p note this is an internal method and em must not em be used by clients which are not part of the eclipse platform this method allows access to classes which are not eclipse platform api but are part of the os gi runtime that the eclipse platform is built on even as the eclipse platform evolves in compatible ways from release to release the details of the os gi implementation might not p return the platform admin for this instance of eclipse since 3 0 public static platform admin get platform admin return internal platform get default get platform admin osgi osgi platformadmin getplatformadmin internalplatform getdefault getplatformadmin returns the location of the platform s working directory also known as the instance data area code null code is returned if the platform is running without an instance location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi instance area p return the location of the platform s instance data area or code null code if none since 3 0 public static location get instance location return internal platform get default get instance location getinstancelocation internalplatform getdefault getinstancelocation returns the currently registered bundle group providers return the currently registered bundle group providers since 3 0 public static i bundle group provider get bundle group providers return internal platform get default get bundle group providers ibundlegroupprovider getbundlegroupproviders internalplatform getdefault getbundlegroupproviders return the interface into the preference mechanism the returned object can be used for such operations as searching for preference values across multiple scopes and preference import export return an object to interface into the preference mechanism since 3 0 public static i preferences service get preferences service return internal platform get default get preferences service ipreferencesservice getpreferencesservice internalplatform getdefault getpreferencesservice returns the product which was selected when running this eclipse instance or code null code if none return the current product or code null code if none since 3 0 public static i product get product return internal platform get default get product iproduct getproduct internalplatform getdefault getproduct registers the given bundle group provider with the platform param provider a provider to register since 3 0 public static void register bundle group provider i bundle group provider provider internal platform get default register bundle group provider provider registerbundlegroupprovider ibundlegroupprovider internalplatform getdefault registerbundlegroupprovider de registers the given bundle group provider with the platform param provider a provider to de register since 3 0 public static void unregister bundle group provider i bundle group provider provider internal platform get default unregister bundle group provider provider unregisterbundlegroupprovider ibundlegroupprovider internalplatform getdefault unregisterbundlegroupprovider returns the location of the configuration information used to run this instance of eclipse the configuration area typically contains the list of plug ins available for use various settings those shared across different instances of the same configuration and any other such data needed by plug ins code null code is returned if the platform is running without a configuration location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi configuration area p return the location of the platform s configuration data area or code null code if none since 3 0 public static location get configuration location return internal platform get default get configuration location getconfigurationlocation internalplatform getdefault getconfigurationlocation returns the location of the platform s user data area the user data area is a location on the system which is specific to the system s current user by default it is located relative to the location given by the system property user home code null code is returned if the platform is running without an user location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi user area p return the location of the platform s user data area or code null code if none since 3 0 public static location get user location return internal platform get default get user location getuserlocation internalplatform getdefault getuserlocation returns the location of the base installation for the running platform code null code is returned if the platform is running without a configuration location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi install area p return the location of the platform s installation area or code null code if none since 3 0 public static location get install location return internal platform get default get install location getinstalllocation internalplatform getdefault getinstalllocation checks if the specified bundle is a fragment bundle param bundle the bundle to query return true if the specified bundle is a fragment bundle otherwise false is returned since 3 0 public static boolean is fragment bundle bundle return internal platform get default is fragment bundle isfragment internalplatform getdefault isfragment returns an array of attached fragment bundles for the specified bundle if the specified bundle is a fragment then tt null tt is returned if no fragments are attached to the specified bundle then tt null tt is returned param bundle the bundle to get the attached fragment bundles for return an array of fragment bundles or tt null tt if the bundle does not have any attached fragment bundles since 3 0 public static bundle get fragments bundle bundle return internal platform get default get fragments bundle getfragments internalplatform getdefault getfragments returns the resolved bundle with the specified symbolic name that has the highest version if no resolved bundles are installed that have the specified symbolic name then null is returned param symbolic name the symbolic name of the bundle to be returned return the bundle that has the specified symbolic name with the highest version or tt null tt if no bundle is found since 3 0 public static bundle get bundle string symbolic name return internal platform get default get bundle symbolic name symbolicname getbundle symbolicname internalplatform getdefault getbundle symbolicname returns all bundles with the specified symbolic name if no resolved bundles with the specified symbolic name can be found tt null tt is returned if the version argument is not null then only the bundles that have the specified symbolic name and a version greater than or equal to the specified version are returned the returned bundles are ordered in descending bundle version order param symbolic name the symbolic name of the bundles that are to be returned param version the version that the return bundle versions must match or tt null tt if no version matching is to be done return the array of bundles with the specified name that match the specified version and match rule or tt null tt if no bundles are found public static bundle get bundles string symbolic name string version return internal platform get default get bundles symbolic name version symbolicname getbundles symbolicname internalplatform getdefault getbundles symbolicname returns an array of host bundles that the specified fragment bundle is attached to or tt null tt if the specified bundle is not attached to a host if the bundle is not a fragment bundle then tt null tt is returned param bundle the bundle to get the host bundles for return an array of host bundles or null if the bundle does not have any host bundles since 3 0 public static bundle get hosts bundle bundle return internal platform get default get hosts bundle gethosts internalplatform getdefault gethosts returns whether the platform is running return code true code if the platform is running and code false code otherwise since 3 0 public static boolean is running return internal platform get default is running isrunning internalplatform getdefault isrunning returns a list of known system architectures p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getos arch code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of system architectures known to the system see getos arch since 3 0 public static string knownos arch values return internal platform get default knownos arch values getosarch getosarch knownosarchvalues internalplatform getdefault knownosarchvalues returns a list of known operating system names p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getos code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of operating systems known to the system see getos since 3 0 public static string knownos values return internal platform get default knownos values knownosvalues internalplatform getdefault knownosvalues returns a map of known platform line separators the keys are translated names of platforms and the values are their associated line separator strings return a map of platform to their line separator string since 3 1 public static map known platform line separators map result new hash map result put line separator key mac os 9 line separator value cr result put line separator key unix line separator value lf result put line separator key windows line separator value crlf return result knownplatformlineseparators hashmap line_separator_key_mac_os_9 line_separator_value_cr line_separator_key_unix line_separator_value_lf line_separator_key_windows line_separator_value_crlf returns a list of known windowing system names p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getws code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of window systems known to the system see getws since 3 0 public static string knownws values return internal platform get default knownws values knownwsvalues internalplatform getdefault knownwsvalues returns code true code if the platform is currently running in debug mode the platform is typically put in debug mode using the debug command line argument return whether or not the platform is running in debug mode since 3 0 public static boolean in debug mode return system get property osgi debug null non nls 1 indebugmode getproperty returns code true code if the platform is currently running in development mode that is if special procedures are to be taken when defining plug in class paths the platform is typically put in development mode using the dev command line argument return whether or not the platform is running in development mode since 3 0 public static boolean in development mode return system get property osgi dev null non nls 1 indevelopmentmode getproperty private constructor to block instance creation private platform super adds the given authorization information to the key ring the information is relevant for the specified protection space and the given authorization scheme the protection space is defined by the combination of the given server url and realm the authorization scheme determines what the authorization information contains and how it should be used the authorization information is a code map code of code string code to code string code and typically contains information such as user names and passwords param server url the url identifying the server for this authorization information for example http www example com param realm the subsection of the given server to which this authorization information applies for example realm1 example com or for no realm param auth scheme the scheme for which this authorization information applies for example basic or for no authorization scheme param info a code map code containing authorization information such as user names and passwords key type code string code value type code string code exception core exception if there are problems setting the authorization information reasons include ul li the keyring could not be saved li ul public static void add authorization info url server url string realm string auth scheme map info throws core exception internal platform get default add authorization info server url realm auth scheme info serverurl authscheme coreexception addauthorizationinfo serverurl authscheme coreexception internalplatform getdefault addauthorizationinfo serverurl authscheme adds the given log listener to the notification list of the platform p once registered a listener starts receiving notification as entries are added to plug in logs via code i log log code the listener continues to receive notifications until it is replaced or removed p param listener the listener to register see i log add log listener i log listener see remove log listener i log listener public static void add log listener i log listener listener internal platform get default add log listener listener ilog ilog addloglistener iloglistener removeloglistener iloglistener addloglistener iloglistener internalplatform getdefault addloglistener adds the specified resource to the protection space specified by the given realm all targets at or deeper than the depth of the last symbolic element in the path of the given resource url are assumed to be in the same protection space param resource url the url identifying the resources to be added to the specified protection space for example http www example com folder param realm the name of the protection space for example realm1 example com exception core exception if there are problems setting the authorization information reasons include ul li the key ring could not be saved li ul public static void add protection space url resource url string realm throws core exception internal platform get default add protection space resource url realm resourceurl coreexception addprotectionspace resourceurl coreexception internalplatform getdefault addprotectionspace resourceurl returns a url that is the local equivalent of the supplied url this method is expected to be used with the plug in relative ur ls returned by i plugin descriptor bundle get entry and platform find if the specified url is not a plug in relative url it is returned as is if the specified url is a plug in relative url of a file including jar archive it is returned as a locally accessible url using file protocol extracting caching the file locally if required if the specified url is a plug in relative url of a directory the directory and any files and directories under it are made locally accessible likewise if param url original plug in relative url return the resolved url exception io exception if unable to resolve url see resolve url see find bundle i path see bundle get entry string public static url as localurl url url throws io exception return internal platform get default as localurl url urls iplugindescriptor getentry ioexception ipath getentry aslocalurl ioexception internalplatform getdefault aslocalurl takes down the splash screen if one was put up public static void end splash internal platform get default end splash endsplash internalplatform getdefault endsplash removes the authorization information for the specified protection space and given authorization scheme the protection space is defined by the given server url and realm param server url the url identifying the server to remove the authorization information for for example http www example com param realm the subsection of the given server to remove the authorization information for for example realm1 example com or for no realm param auth scheme the scheme for which the authorization information to remove applies for example basic or for no authorization scheme exception core exception if there are problems removing the authorization information reasons include ul li the keyring could not be saved li ul public static void flush authorization info url server url string realm string auth scheme throws core exception internal platform get default flush authorization info server url realm auth scheme serverurl authscheme coreexception flushauthorizationinfo serverurl authscheme coreexception internalplatform getdefault flushauthorizationinfo serverurl authscheme returns the adapter manager used for extending code i adaptable code objects return the adapter manager for this platform see i adapter manager public static i adapter manager get adapter manager return internal platform get default get adapter manager iadaptable iadaptermanager iadaptermanager getadaptermanager internalplatform getdefault getadaptermanager returns the authorization information for the specified protection space and given authorization scheme the protection space is defined by the given server url and realm returns code null code if no such information exists param server url the url identifying the server for the authorization information for example http www example com param realm the subsection of the given server to which the authorization information applies for example realm1 example com or for no realm param auth scheme the scheme for which the authorization information applies for example basic or for no authorization scheme return the authorization information for the specified protection space and given authorization scheme or code null code if no such information exists public static map get authorization info url server url string realm string auth scheme return internal platform get default get authorization info server url realm auth scheme serverurl authscheme getauthorizationinfo serverurl authscheme internalplatform getdefault getauthorizationinfo serverurl authscheme returns the command line args provided to the eclipse runtime layer when it was first run the returned value does not include arguments consumed by the lower levels of eclipse e g os gi or the launcher note that individual platform runnables may be provided with different arguments if they are being run individually rather than with code platform run code return the command line used to start the platform public static string get command line args return internal platform get default get command line args osgi getcommandlineargs internalplatform getdefault getcommandlineargs returns the content type manager return the content type manager since 3 0 public static i content type manager get content type manager return internal platform get default get content type manager icontenttypemanager getcontenttypemanager internalplatform getdefault getcontenttypemanager returns the identified option code null code is returned if no such option is found options are specified in the general form i lt plug in id gt lt option path gt i for example code org eclipse core runtime debug code param option the name of the option to lookup return the value of the requested debug option or code null code public static string get debug option string option return internal platform get default get option option getdebugoption internalplatform getdefault getoption returns the location of the platform working directory p callers of this method should consider using code get instance location code instead in various typically non ide related configurations of eclipse the platform working directory may not be on the local file system as such the more general form of this location is as a url p return the location of the platform see get instance location public static i path get location throws illegal state exception return internal platform get default get location getinstancelocation getinstancelocation ipath getlocation illegalstateexception internalplatform getdefault getlocation returns the location of the platform log file this file may contain information about errors that have previously occurred during this invocation of the platform p it is recommended not to keep this value as the log location may vary when an instance location is being set p p note it is very important that users of this method do not leave the log file open for extended periods of time doing so may prevent others from writing to the log file which could result in important error messages being lost it is strongly recommended that clients wanting to read the log file for extended periods should copy the log file contents elsewhere and immediately close the original file p return the path of the log file on disk public static i path get log file location return internal platform get default get meta area get log location ipath getlogfilelocation internalplatform getdefault getmetaarea getloglocation returns the plug in runtime object for the identified plug in or code null code if no such plug in can be found if the plug in is defined but not yet activated the plug in will be activated before being returned p b note b this method is only able to find and return plug in objects for plug ins described using plugin xml according to the traditional eclipse conventions eclipse 3 0 permits plug ins to be described in manifest mf files and to define their own bundle activators such plug ins cannot be discovered by this method p param id the unique identifier of the desired plug in e g code com example acme code return the plug in runtime object or code null code deprecated this method only works if the compatibility layer is installed and must not be used otherwise see the comments on link i plugin descriptor get plugin for details public static plugin get plugin string id try i plugin registry registry get plugin registry if registry null throw new illegal state exception i plugin descriptor pd registry get plugin descriptor id if pd null return null return pd get plugin catch core exception e todo log the exception return null iplugindescriptor getplugin getplugin ipluginregistry getpluginregistry illegalstateexception iplugindescriptor getplugindescriptor getplugin coreexception returns the plug in registry for this platform return the plug in registry see i plugin registry deprecated code i plugin registry code was refactored in eclipse 3 0 this method only works if the compatibility layer is installed and must not be used otherwise see the comments on link i plugin registry and its methods for details public static i plugin registry get plugin registry bundle compatibility internal platform get default get bundle compatibility helper pi runtime compatibility if compatibility null throw new illegal state exception class old internal platform null try old internal platform compatibility load class org eclipse core internal plugins internal platform non nls 1 method get plugin registry old internal platform get method get plugin registry null non nls 1 return i plugin registry get plugin registry invoke old internal platform null catch exception e ignore the exceptions return null return null ipluginregistry ipluginregistry ipluginregistry ipluginregistry getpluginregistry internalplatform getdefault getbundle compatibilityhelper pi_runtime_compatibility illegalstateexception oldinternalplatform oldinternalplatform loadclass internalplatform getpluginregistry oldinternalplatform getmethod getpluginregistry ipluginregistry getpluginregistry oldinternalplatform returns the location in the local file system of the plug in state area for the given plug in the platform must be running p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings p param plugin the plug in whose state location is returned return a local file system path public static i path get plugin state location plugin plugin return plugin get state location ipath getpluginstatelocation getstatelocation returns the protection space realm for the specified resource or code null code if the realm is unknown param resource url the url of the resource whose protection space is returned for example http www example com folder return the protection space realm for the specified resource or code null code if the realm is unknown public static string get protection space url resource url return internal platform get default get protection space resource url resourceurl getprotectionspace resourceurl internalplatform getdefault getprotectionspace resourceurl removes the indicated identical log listener from the notification list of the platform if no such listener exists no action is taken param listener the listener to de register see i log remove log listener i log listener see add log listener i log listener public static void remove log listener i log listener listener internal platform get default remove log listener listener ilog removeloglistener iloglistener addloglistener iloglistener removeloglistener iloglistener internalplatform getdefault removeloglistener returns a url which is the resolved equivalent of the supplied url this method is expected to be used with the plug in relative ur ls returned by i plugin descriptor bundle get entry and platform find p if the specified url is not a plug in relative url it is returned as is if the specified url is a plug in relative url this method attempts to reduce the given url to one which is native to the java class library eg file http etc p p note however that users of this api should not assume too much about the results of this method while it may consistently return a file url in certain installation configurations others may result in jar or http ur ls p param url original plug in relative url return the resolved url exception io exception if unable to resolve url see as localurl url see find bundle i path see bundle get entry string public static url resolve url url throws io exception return internal platform get default resolve url urls iplugindescriptor getentry urls ioexception aslocalurl ipath getentry ioexception internalplatform getdefault runs the given runnable in a protected mode exceptions thrown in the runnable are logged and passed to the runnable s exception handler such exceptions are not rethrown by this method param runnable the runnable to run public static void run i safe runnable runnable internal platform get default run runnable isaferunnable internalplatform getdefault returns the platform job manager return the platform s job manager since 3 0 public static i job manager get job manager return internal platform get default get job manager ijobmanager getjobmanager internalplatform getdefault getjobmanager returns the extension registry for this platform return the extension registry see i extension registry since 3 0 public static i extension registry get extension registry return internal platform get default get registry iextensionregistry iextensionregistry getextensionregistry internalplatform getdefault getregistry returns a url for the given path in the given bundle returns code null code if the url could not be computed or created param bundle the bundle in which to search param path path relative to plug in installation location return a url for the given path or code null code the actual form of the returned url is not specified see find bundle i path map see resolve url see as localurl url since 3 0 public static url find bundle bundle i path path return find support find bundle path null ipath aslocalurl ipath findsupport returns a url for the given path in the given bundle returns code null code if the url could not be computed or created p find looks for this path in given bundle and any attached fragments code null code is returned if no such entry is found note that there is no specific order to the fragments p p the following arguments may also be used pre nl for language specific information os for operating system specific information ws for windowing system specific information pre p p a path of nl about properties in an environment with a default locale of en ca will return a url corresponding to the first place about properties is found according to the following order pre plugin root nl en ca about properties fragment1 root nl en ca about properties fragment2 root nl en ca about properties plugin root nl en about properties fragment1 root nl en about properties fragment2 root nl en about properties plugin root about properties fragment1 root about properties fragment2 root about properties pre p p the current environment variable values can be overridden using the override map argument p param bundle the bundle in which to search param path file path relative to plug in installation location param override map of override substitution arguments to be used for any arg path elements the map keys correspond to the substitution arguments eg nl or os the resulting values must be of type java lang string if the map is code null code or does not contain the required substitution argument the default is used return a url for the given path or code null code the actual form of the returned url is not specified see resolve url see as localurl url since 3 0 public static url find bundle bundle i path path map override return find support find bundle path override en_ca aslocalurl ipath findsupport returns the location in the local file system of the plug in state area for the given bundle if the plug in state area did not exist prior to this call it is created p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings and other configuration parameters p param bundle the bundle whose state location if returned return a local file system path since 3 0 public static i path get state location bundle bundle return internal platform get default get state location bundle ipath getstatelocation internalplatform getdefault getstatelocation returns a number that changes whenever the set of installed plug ins changes this can be used for invalidating caches that are based on the set of currently installed plug ins e g extensions return a number related to the set of installed plug ins since 3 1 public static long get state stamp return internal platform get default get state time stamp getstatestamp internalplatform getdefault getstatetimestamp returns the log for the given bundle if no such log exists one is created param bundle the bundle whose log is returned return the log for the given bundle since 3 0 public static i log get log bundle bundle return internal platform get default get log bundle ilog getlog internalplatform getdefault getlog returns the given bundle s resource bundle for the current locale p this resource bundle is typically stored as the plugin properties file in the plug in itself and contains any translatable strings used in the plug in manifest file plugin xml p p this mechanism is intended only for externalizing strings found in the plug in manifest file using this method for externalizing strings in your code may result in degraded memory performance p param bundle the bundle whose resource bundle is being queried return the resource bundle exception missing resource exception if the resource bundle was not found since 3 0 public static resource bundle get resource bundle bundle bundle throws missing resource exception return internal platform get default get resource bundle bundle missingresourceexception resourcebundle getresourcebundle missingresourceexception internalplatform getdefault getresourcebundle returns a resource string corresponding to the given argument value if the argument value specifies a resource key the string is looked up in the default resource bundle for the given runtime bundle if the argument does not specify a valid key the argument itself is returned as the resource string the key lookup is performed in the file referenced in the bundle localization header of the bundle manifest if a resource string corresponding to the key is not found in the resource bundle the key value or any default text following the key in the argument value is returned as the resource string a key is identified as a string beginning with the character note that the character is stripped off prior to lookup in the resource bundle p equivalent to code get resource string bundle value get resource bundle code p param bundle the bundle whose resource bundle is being queried param value the value to look for return the resource string see get resource bundle bundle since 3 0 public static string get resource string bundle bundle string value return internal platform get default get resource string bundle value getresourcestring getresourcebundle getresourcebundle getresourcestring internalplatform getdefault getresourcestring returns a resource string corresponding to the given argument value and resource bundle in the given runtime bundle if the argument value specifies a resource key the string is looked up in the given resource bundle if the argument does not specify a valid key the argument itself is returned as the resource string the key lookup is performed against the specified resource bundle if a resource string corresponding to the key is not found in the resource bundle the key value or any default text following the key in the argument value is returned as the resource string a key is identified as a string beginning with the character note that the character is stripped off prior to lookup in the resource bundle p for example assume resource bundle plugin properties contains name project name pre get resource string hello world returns hello world li get resource string name returns project name li get resource string name hello world returns project name li get resource string abcd hello world returns hello world li get resource string abcd returns abcd li get resource string name returns name li pre p param bundle the bundle whose resource bundle is being queried param value the value param resource bundle the resource bundle to query return the resource string see get resource bundle bundle since 3 0 public static string get resource string bundle bundle string value resource bundle resource bundle return internal platform get default get resource string bundle value resource bundle getresourcestring getresourcestring getresourcestring getresourcestring getresourcestring getresourcestring resourcebundle getresourcebundle getresourcestring resourcebundle resourcebundle internalplatform getdefault getresourcestring resourcebundle returns the string name of the current system architecture the value is a user defined string if the architecture is specified on the command line otherwise it is the value returned by code java lang system get property os arch code return the string name of the current system architecture since 3 0 public static string getos arch return internal platform get default getos arch getproperty getosarch internalplatform getdefault getosarch returns the string name of the current locale for use in finding files whose path starts with code nl code return the string name of the current locale since 3 0 public static string getnl return internal platform get default getnl internalplatform getdefault returns the string name of the current operating system for use in finding files whose path starts with code os code code os unknown code is returned if the operating system cannot be determined the value may indicate one of the operating systems known to the platform as specified in code knownos values code or a user defined string if the operating system name is specified on the command line return the string name of the current operating system since 3 0 public static string getos return internal platform get default getos os_unknown knownosvalues internalplatform getdefault returns the string name of the current window system for use in finding files whose path starts with code ws code code null code is returned if the window system cannot be determined return the string name of the current window system or code null code since 3 0 public static string getws return internal platform get default getws internalplatform getdefault returns the arguments not consumed by the framework implementation itself which arguments are consumed is implementation specific these arguments are available for use by the application return the array of command line arguments not consumed by the framework since 3 0 public static string get application args return internal platform get default get application args getapplicationargs internalplatform getdefault getapplicationargs returns the platform administrator for this running eclipse p note this is an internal method and em must not em be used by clients which are not part of the eclipse platform this method allows access to classes which are not eclipse platform api but are part of the os gi runtime that the eclipse platform is built on even as the eclipse platform evolves in compatible ways from release to release the details of the os gi implementation might not p return the platform admin for this instance of eclipse since 3 0 public static platform admin get platform admin return internal platform get default get platform admin osgi osgi platformadmin getplatformadmin internalplatform getdefault getplatformadmin returns the location of the platform s working directory also known as the instance data area code null code is returned if the platform is running without an instance location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi instance area p return the location of the platform s instance data area or code null code if none since 3 0 public static location get instance location return internal platform get default get instance location getinstancelocation internalplatform getdefault getinstancelocation returns the currently registered bundle group providers return the currently registered bundle group providers since 3 0 public static i bundle group provider get bundle group providers return internal platform get default get bundle group providers ibundlegroupprovider getbundlegroupproviders internalplatform getdefault getbundlegroupproviders return the interface into the preference mechanism the returned object can be used for such operations as searching for preference values across multiple scopes and preference import export return an object to interface into the preference mechanism since 3 0 public static i preferences service get preferences service return internal platform get default get preferences service ipreferencesservice getpreferencesservice internalplatform getdefault getpreferencesservice returns the product which was selected when running this eclipse instance or code null code if none return the current product or code null code if none since 3 0 public static i product get product return internal platform get default get product iproduct getproduct internalplatform getdefault getproduct registers the given bundle group provider with the platform param provider a provider to register since 3 0 public static void register bundle group provider i bundle group provider provider internal platform get default register bundle group provider provider registerbundlegroupprovider ibundlegroupprovider internalplatform getdefault registerbundlegroupprovider de registers the given bundle group provider with the platform param provider a provider to de register since 3 0 public static void unregister bundle group provider i bundle group provider provider internal platform get default unregister bundle group provider provider unregisterbundlegroupprovider ibundlegroupprovider internalplatform getdefault unregisterbundlegroupprovider returns the location of the configuration information used to run this instance of eclipse the configuration area typically contains the list of plug ins available for use various settings those shared across different instances of the same configuration and any other such data needed by plug ins code null code is returned if the platform is running without a configuration location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi configuration area p return the location of the platform s configuration data area or code null code if none since 3 0 public static location get configuration location return internal platform get default get configuration location getconfigurationlocation internalplatform getdefault getconfigurationlocation returns the location of the platform s user data area the user data area is a location on the system which is specific to the system s current user by default it is located relative to the location given by the system property user home code null code is returned if the platform is running without an user location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi user area p return the location of the platform s user data area or code null code if none since 3 0 public static location get user location return internal platform get default get user location getuserlocation internalplatform getdefault getuserlocation returns the location of the base installation for the running platform code null code is returned if the platform is running without a configuration location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi install area p return the location of the platform s installation area or code null code if none since 3 0 public static location get install location return internal platform get default get install location getinstalllocation internalplatform getdefault getinstalllocation checks if the specified bundle is a fragment bundle param bundle the bundle to query return true if the specified bundle is a fragment bundle otherwise false is returned since 3 0 public static boolean is fragment bundle bundle return internal platform get default is fragment bundle isfragment internalplatform getdefault isfragment returns an array of attached fragment bundles for the specified bundle if the specified bundle is a fragment then tt null tt is returned if no fragments are attached to the specified bundle then tt null tt is returned param bundle the bundle to get the attached fragment bundles for return an array of fragment bundles or tt null tt if the bundle does not have any attached fragment bundles since 3 0 public static bundle get fragments bundle bundle return internal platform get default get fragments bundle getfragments internalplatform getdefault getfragments returns the resolved bundle with the specified symbolic name that has the highest version if no resolved bundles are installed that have the specified symbolic name then null is returned param symbolic name the symbolic name of the bundle to be returned return the bundle that has the specified symbolic name with the highest version or tt null tt if no bundle is found since 3 0 public static bundle get bundle string symbolic name return internal platform get default get bundle symbolic name symbolicname getbundle symbolicname internalplatform getdefault getbundle symbolicname returns all bundles with the specified symbolic name if no resolved bundles with the specified symbolic name can be found tt null tt is returned if the version argument is not null then only the bundles that have the specified symbolic name and a version greater than or equal to the specified version are returned the returned bundles are ordered in descending bundle version order param symbolic name the symbolic name of the bundles that are to be returned param version the version that the return bundle versions must match or tt null tt if no version matching is to be done return the array of bundles with the specified name that match the specified version and match rule or tt null tt if no bundles are found public static bundle get bundles string symbolic name string version return internal platform get default get bundles symbolic name version symbolicname getbundles symbolicname internalplatform getdefault getbundles symbolicname returns an array of host bundles that the specified fragment bundle is attached to or tt null tt if the specified bundle is not attached to a host if the bundle is not a fragment bundle then tt null tt is returned param bundle the bundle to get the host bundles for return an array of host bundles or null if the bundle does not have any host bundles since 3 0 public static bundle get hosts bundle bundle return internal platform get default get hosts bundle gethosts internalplatform getdefault gethosts returns whether the platform is running return code true code if the platform is running and code false code otherwise since 3 0 public static boolean is running return internal platform get default is running isrunning internalplatform getdefault isrunning returns a list of known system architectures p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getos arch code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of system architectures known to the system see getos arch since 3 0 public static string knownos arch values return internal platform get default knownos arch values getosarch getosarch knownosarchvalues internalplatform getdefault knownosarchvalues returns a list of known operating system names p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getos code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of operating systems known to the system see getos since 3 0 public static string knownos values return internal platform get default knownos values knownosvalues internalplatform getdefault knownosvalues returns a map of known platform line separators the keys are translated names of platforms and the values are their associated line separator strings return a map of platform to their line separator string since 3 1 public static map known platform line separators map result new hash map result put line separator key mac os 9 line separator value cr result put line separator key unix line separator value lf result put line separator key windows line separator value crlf return result knownplatformlineseparators hashmap line_separator_key_mac_os_9 line_separator_value_cr line_separator_key_unix line_separator_value_lf line_separator_key_windows line_separator_value_crlf returns a list of known windowing system names p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getws code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of window systems known to the system see getws since 3 0 public static string knownws values return internal platform get default knownws values knownwsvalues internalplatform getdefault knownwsvalues returns code true code if the platform is currently running in debug mode the platform is typically put in debug mode using the debug command line argument return whether or not the platform is running in debug mode since 3 0 public static boolean in debug mode return system get property osgi debug null non nls 1 indebugmode getproperty returns code true code if the platform is currently running in development mode that is if special procedures are to be taken when defining plug in class paths the platform is typically put in development mode using the dev command line argument return whether or not the platform is running in development mode since 3 0 public static boolean in development mode return system get property osgi dev null non nls 1 indevelopmentmode getproperty private constructor to block instance creation private platform super adds the given authorization information to the key ring the information is relevant for the specified protection space and the given authorization scheme the protection space is defined by the combination of the given server url and realm the authorization scheme determines what the authorization information contains and how it should be used the authorization information is a code map code of code string code to code string code and typically contains information such as user names and passwords param server url the url identifying the server for this authorization information for example http www example com param realm the subsection of the given server to which this authorization information applies for example realm1 example com or for no realm param auth scheme the scheme for which this authorization information applies for example basic or for no authorization scheme param info a code map code containing authorization information such as user names and passwords key type code string code value type code string code exception core exception if there are problems setting the authorization information reasons include ul li the keyring could not be saved li ul public static void add authorization info url server url string realm string auth scheme map info throws core exception internal platform get default add authorization info server url realm auth scheme info serverurl authscheme coreexception addauthorizationinfo serverurl authscheme coreexception internalplatform getdefault addauthorizationinfo serverurl authscheme adds the given log listener to the notification list of the platform p once registered a listener starts receiving notification as entries are added to plug in logs via code i log log code the listener continues to receive notifications until it is replaced or removed p param listener the listener to register see i log add log listener i log listener see remove log listener i log listener public static void add log listener i log listener listener internal platform get default add log listener listener ilog ilog addloglistener iloglistener removeloglistener iloglistener addloglistener iloglistener internalplatform getdefault addloglistener adds the specified resource to the protection space specified by the given realm all targets at or deeper than the depth of the last symbolic element in the path of the given resource url are assumed to be in the same protection space param resource url the url identifying the resources to be added to the specified protection space for example http www example com folder param realm the name of the protection space for example realm1 example com exception core exception if there are problems setting the authorization information reasons include ul li the key ring could not be saved li ul public static void add protection space url resource url string realm throws core exception internal platform get default add protection space resource url realm resourceurl coreexception addprotectionspace resourceurl coreexception internalplatform getdefault addprotectionspace resourceurl returns a url that is the local equivalent of the supplied url this method is expected to be used with the plug in relative ur ls returned by i plugin descriptor bundle get entry and platform find if the specified url is not a plug in relative url it is returned as is if the specified url is a plug in relative url of a file including jar archive it is returned as a locally accessible url using file protocol extracting caching the file locally if required if the specified url is a plug in relative url of a directory the directory and any files and directories under it are made locally accessible likewise if param url original plug in relative url return the resolved url exception io exception if unable to resolve url see resolve url see find bundle i path see bundle get entry string public static url as localurl url url throws io exception return internal platform get default as localurl url urls iplugindescriptor getentry ioexception ipath getentry aslocalurl ioexception internalplatform getdefault aslocalurl takes down the splash screen if one was put up public static void end splash internal platform get default end splash endsplash internalplatform getdefault endsplash removes the authorization information for the specified protection space and given authorization scheme the protection space is defined by the given server url and realm param server url the url identifying the server to remove the authorization information for for example http www example com param realm the subsection of the given server to remove the authorization information for for example realm1 example com or for no realm param auth scheme the scheme for which the authorization information to remove applies for example basic or for no authorization scheme exception core exception if there are problems removing the authorization information reasons include ul li the keyring could not be saved li ul public static void flush authorization info url server url string realm string auth scheme throws core exception internal platform get default flush authorization info server url realm auth scheme serverurl authscheme coreexception flushauthorizationinfo serverurl authscheme coreexception internalplatform getdefault flushauthorizationinfo serverurl authscheme returns the adapter manager used for extending code i adaptable code objects return the adapter manager for this platform see i adapter manager public static i adapter manager get adapter manager return internal platform get default get adapter manager iadaptable iadaptermanager iadaptermanager getadaptermanager internalplatform getdefault getadaptermanager returns the authorization information for the specified protection space and given authorization scheme the protection space is defined by the given server url and realm returns code null code if no such information exists param server url the url identifying the server for the authorization information for example http www example com param realm the subsection of the given server to which the authorization information applies for example realm1 example com or for no realm param auth scheme the scheme for which the authorization information applies for example basic or for no authorization scheme return the authorization information for the specified protection space and given authorization scheme or code null code if no such information exists public static map get authorization info url server url string realm string auth scheme return internal platform get default get authorization info server url realm auth scheme serverurl authscheme getauthorizationinfo serverurl authscheme internalplatform getdefault getauthorizationinfo serverurl authscheme returns the command line args provided to the eclipse runtime layer when it was first run the returned value does not include arguments consumed by the lower levels of eclipse e g os gi or the launcher note that individual platform runnables may be provided with different arguments if they are being run individually rather than with code platform run code return the command line used to start the platform public static string get command line args return internal platform get default get command line args osgi getcommandlineargs internalplatform getdefault getcommandlineargs returns the content type manager return the content type manager since 3 0 public static i content type manager get content type manager return internal platform get default get content type manager icontenttypemanager getcontenttypemanager internalplatform getdefault getcontenttypemanager returns the identified option code null code is returned if no such option is found options are specified in the general form i lt plug in id gt lt option path gt i for example code org eclipse core runtime debug code param option the name of the option to lookup return the value of the requested debug option or code null code public static string get debug option string option return internal platform get default get option option getdebugoption internalplatform getdefault getoption returns the location of the platform working directory p callers of this method should consider using code get instance location code instead in various typically non ide related configurations of eclipse the platform working directory may not be on the local file system as such the more general form of this location is as a url p return the location of the platform see get instance location public static i path get location throws illegal state exception return internal platform get default get location getinstancelocation getinstancelocation ipath getlocation illegalstateexception internalplatform getdefault getlocation returns the location of the platform log file this file may contain information about errors that have previously occurred during this invocation of the platform p it is recommended not to keep this value as the log location may vary when an instance location is being set p p note it is very important that users of this method do not leave the log file open for extended periods of time doing so may prevent others from writing to the log file which could result in important error messages being lost it is strongly recommended that clients wanting to read the log file for extended periods should copy the log file contents elsewhere and immediately close the original file p return the path of the log file on disk public static i path get log file location return internal platform get default get meta area get log location ipath getlogfilelocation internalplatform getdefault getmetaarea getloglocation returns the plug in runtime object for the identified plug in or code null code if no such plug in can be found if the plug in is defined but not yet activated the plug in will be activated before being returned p b note b this method is only able to find and return plug in objects for plug ins described using plugin xml according to the traditional eclipse conventions eclipse 3 0 permits plug ins to be described in manifest mf files and to define their own bundle activators such plug ins cannot be discovered by this method p param id the unique identifier of the desired plug in e g code com example acme code return the plug in runtime object or code null code deprecated this method only works if the compatibility layer is installed and must not be used otherwise see the comments on link i plugin descriptor get plugin for details public static plugin get plugin string id try i plugin registry registry get plugin registry if registry null throw new illegal state exception i plugin descriptor pd registry get plugin descriptor id if pd null return null return pd get plugin catch core exception e todo log the exception return null iplugindescriptor getplugin getplugin ipluginregistry getpluginregistry illegalstateexception iplugindescriptor getplugindescriptor getplugin coreexception returns the plug in registry for this platform return the plug in registry see i plugin registry deprecated code i plugin registry code was refactored in eclipse 3 0 this method only works if the compatibility layer is installed and must not be used otherwise see the comments on link i plugin registry and its methods for details public static i plugin registry get plugin registry bundle compatibility internal platform get default get bundle compatibility helper pi runtime compatibility if compatibility null throw new illegal state exception class old internal platform null try old internal platform compatibility load class org eclipse core internal plugins internal platform non nls 1 method get plugin registry old internal platform get method get plugin registry null non nls 1 return i plugin registry get plugin registry invoke old internal platform null catch exception e ignore the exceptions return null return null ipluginregistry ipluginregistry ipluginregistry ipluginregistry getpluginregistry internalplatform getdefault getbundle compatibilityhelper pi_runtime_compatibility illegalstateexception oldinternalplatform oldinternalplatform loadclass internalplatform getpluginregistry oldinternalplatform getmethod getpluginregistry ipluginregistry getpluginregistry oldinternalplatform returns the location in the local file system of the plug in state area for the given plug in the platform must be running p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings p param plugin the plug in whose state location is returned return a local file system path public static i path get plugin state location plugin plugin return plugin get state location ipath getpluginstatelocation getstatelocation returns the protection space realm for the specified resource or code null code if the realm is unknown param resource url the url of the resource whose protection space is returned for example http www example com folder return the protection space realm for the specified resource or code null code if the realm is unknown public static string get protection space url resource url return internal platform get default get protection space resource url resourceurl getprotectionspace resourceurl internalplatform getdefault getprotectionspace resourceurl removes the indicated identical log listener from the notification list of the platform if no such listener exists no action is taken param listener the listener to de register see i log remove log listener i log listener see add log listener i log listener public static void remove log listener i log listener listener internal platform get default remove log listener listener ilog removeloglistener iloglistener addloglistener iloglistener removeloglistener iloglistener internalplatform getdefault removeloglistener returns a url which is the resolved equivalent of the supplied url this method is expected to be used with the plug in relative ur ls returned by i plugin descriptor bundle get entry and platform find p if the specified url is not a plug in relative url it is returned as is if the specified url is a plug in relative url this method attempts to reduce the given url to one which is native to the java class library eg file http etc p p note however that users of this api should not assume too much about the results of this method while it may consistently return a file url in certain installation configurations others may result in jar or http ur ls p param url original plug in relative url return the resolved url exception io exception if unable to resolve url see as localurl url see find bundle i path see bundle get entry string public static url resolve url url throws io exception return internal platform get default resolve url urls iplugindescriptor getentry urls ioexception aslocalurl ipath getentry ioexception internalplatform getdefault runs the given runnable in a protected mode exceptions thrown in the runnable are logged and passed to the runnable s exception handler such exceptions are not rethrown by this method param runnable the runnable to run public static void run i safe runnable runnable internal platform get default run runnable isaferunnable internalplatform getdefault returns the platform job manager return the platform s job manager since 3 0 public static i job manager get job manager return internal platform get default get job manager ijobmanager getjobmanager internalplatform getdefault getjobmanager returns the extension registry for this platform return the extension registry see i extension registry since 3 0 public static i extension registry get extension registry return internal platform get default get registry iextensionregistry iextensionregistry getextensionregistry internalplatform getdefault getregistry returns a url for the given path in the given bundle returns code null code if the url could not be computed or created param bundle the bundle in which to search param path path relative to plug in installation location return a url for the given path or code null code the actual form of the returned url is not specified see find bundle i path map see resolve url see as localurl url since 3 0 public static url find bundle bundle i path path return find support find bundle path null ipath aslocalurl ipath findsupport returns a url for the given path in the given bundle returns code null code if the url could not be computed or created p find looks for this path in given bundle and any attached fragments code null code is returned if no such entry is found note that there is no specific order to the fragments p p the following arguments may also be used pre nl for language specific information os for operating system specific information ws for windowing system specific information pre p p a path of nl about properties in an environment with a default locale of en ca will return a url corresponding to the first place about properties is found according to the following order pre plugin root nl en ca about properties fragment1 root nl en ca about properties fragment2 root nl en ca about properties plugin root nl en about properties fragment1 root nl en about properties fragment2 root nl en about properties plugin root about properties fragment1 root about properties fragment2 root about properties pre p p the current environment variable values can be overridden using the override map argument p param bundle the bundle in which to search param path file path relative to plug in installation location param override map of override substitution arguments to be used for any arg path elements the map keys correspond to the substitution arguments eg nl or os the resulting values must be of type java lang string if the map is code null code or does not contain the required substitution argument the default is used return a url for the given path or code null code the actual form of the returned url is not specified see resolve url see as localurl url since 3 0 public static url find bundle bundle i path path map override return find support find bundle path override en_ca aslocalurl ipath findsupport returns the location in the local file system of the plug in state area for the given bundle if the plug in state area did not exist prior to this call it is created p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings and other configuration parameters p param bundle the bundle whose state location if returned return a local file system path since 3 0 public static i path get state location bundle bundle return internal platform get default get state location bundle ipath getstatelocation internalplatform getdefault getstatelocation returns a number that changes whenever the set of installed plug ins changes this can be used for invalidating caches that are based on the set of currently installed plug ins e g extensions return a number related to the set of installed plug ins since 3 1 public static long get state stamp return internal platform get default get state time stamp getstatestamp internalplatform getdefault getstatetimestamp returns the log for the given bundle if no such log exists one is created param bundle the bundle whose log is returned return the log for the given bundle since 3 0 public static i log get log bundle bundle return internal platform get default get log bundle ilog getlog internalplatform getdefault getlog returns the given bundle s resource bundle for the current locale p this resource bundle is typically stored as the plugin properties file in the plug in itself and contains any translatable strings used in the plug in manifest file plugin xml p p this mechanism is intended only for externalizing strings found in the plug in manifest file using this method for externalizing strings in your code may result in degraded memory performance p param bundle the bundle whose resource bundle is being queried return the resource bundle exception missing resource exception if the resource bundle was not found since 3 0 public static resource bundle get resource bundle bundle bundle throws missing resource exception return internal platform get default get resource bundle bundle missingresourceexception resourcebundle getresourcebundle missingresourceexception internalplatform getdefault getresourcebundle returns a resource string corresponding to the given argument value if the argument value specifies a resource key the string is looked up in the default resource bundle for the given runtime bundle if the argument does not specify a valid key the argument itself is returned as the resource string the key lookup is performed in the file referenced in the bundle localization header of the bundle manifest if a resource string corresponding to the key is not found in the resource bundle the key value or any default text following the key in the argument value is returned as the resource string a key is identified as a string beginning with the character note that the character is stripped off prior to lookup in the resource bundle p equivalent to code get resource string bundle value get resource bundle code p param bundle the bundle whose resource bundle is being queried param value the value to look for return the resource string see get resource bundle bundle since 3 0 public static string get resource string bundle bundle string value return internal platform get default get resource string bundle value getresourcestring getresourcebundle getresourcebundle getresourcestring internalplatform getdefault getresourcestring returns a resource string corresponding to the given argument value and resource bundle in the given runtime bundle if the argument value specifies a resource key the string is looked up in the given resource bundle if the argument does not specify a valid key the argument itself is returned as the resource string the key lookup is performed against the specified resource bundle if a resource string corresponding to the key is not found in the resource bundle the key value or any default text following the key in the argument value is returned as the resource string a key is identified as a string beginning with the character note that the character is stripped off prior to lookup in the resource bundle p for example assume resource bundle plugin properties contains name project name pre get resource string hello world returns hello world li get resource string name returns project name li get resource string name hello world returns project name li get resource string abcd hello world returns hello world li get resource string abcd returns abcd li get resource string name returns name li pre p param bundle the bundle whose resource bundle is being queried param value the value param resource bundle the resource bundle to query return the resource string see get resource bundle bundle since 3 0 public static string get resource string bundle bundle string value resource bundle resource bundle return internal platform get default get resource string bundle value resource bundle getresourcestring getresourcestring getresourcestring getresourcestring getresourcestring getresourcestring resourcebundle getresourcebundle getresourcestring resourcebundle resourcebundle internalplatform getdefault getresourcestring resourcebundle returns the string name of the current system architecture the value is a user defined string if the architecture is specified on the command line otherwise it is the value returned by code java lang system get property os arch code return the string name of the current system architecture since 3 0 public static string getos arch return internal platform get default getos arch getproperty getosarch internalplatform getdefault getosarch returns the string name of the current locale for use in finding files whose path starts with code nl code return the string name of the current locale since 3 0 public static string getnl return internal platform get default getnl internalplatform getdefault returns the string name of the current operating system for use in finding files whose path starts with code os code code os unknown code is returned if the operating system cannot be determined the value may indicate one of the operating systems known to the platform as specified in code knownos values code or a user defined string if the operating system name is specified on the command line return the string name of the current operating system since 3 0 public static string getos return internal platform get default getos os_unknown knownosvalues internalplatform getdefault returns the string name of the current window system for use in finding files whose path starts with code ws code code null code is returned if the window system cannot be determined return the string name of the current window system or code null code since 3 0 public static string getws return internal platform get default getws internalplatform getdefault returns the arguments not consumed by the framework implementation itself which arguments are consumed is implementation specific these arguments are available for use by the application return the array of command line arguments not consumed by the framework since 3 0 public static string get application args return internal platform get default get application args getapplicationargs internalplatform getdefault getapplicationargs returns the platform administrator for this running eclipse p note this is an internal method and em must not em be used by clients which are not part of the eclipse platform this method allows access to classes which are not eclipse platform api but are part of the os gi runtime that the eclipse platform is built on even as the eclipse platform evolves in compatible ways from release to release the details of the os gi implementation might not p return the platform admin for this instance of eclipse since 3 0 public static platform admin get platform admin return internal platform get default get platform admin osgi osgi platformadmin getplatformadmin internalplatform getdefault getplatformadmin returns the location of the platform s working directory also known as the instance data area code null code is returned if the platform is running without an instance location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi instance area p return the location of the platform s instance data area or code null code if none since 3 0 public static location get instance location return internal platform get default get instance location getinstancelocation internalplatform getdefault getinstancelocation returns the currently registered bundle group providers return the currently registered bundle group providers since 3 0 public static i bundle group provider get bundle group providers return internal platform get default get bundle group providers ibundlegroupprovider getbundlegroupproviders internalplatform getdefault getbundlegroupproviders return the interface into the preference mechanism the returned object can be used for such operations as searching for preference values across multiple scopes and preference import export return an object to interface into the preference mechanism since 3 0 public static i preferences service get preferences service return internal platform get default get preferences service ipreferencesservice getpreferencesservice internalplatform getdefault getpreferencesservice returns the product which was selected when running this eclipse instance or code null code if none return the current product or code null code if none since 3 0 public static i product get product return internal platform get default get product iproduct getproduct internalplatform getdefault getproduct registers the given bundle group provider with the platform param provider a provider to register since 3 0 public static void register bundle group provider i bundle group provider provider internal platform get default register bundle group provider provider registerbundlegroupprovider ibundlegroupprovider internalplatform getdefault registerbundlegroupprovider de registers the given bundle group provider with the platform param provider a provider to de register since 3 0 public static void unregister bundle group provider i bundle group provider provider internal platform get default unregister bundle group provider provider unregisterbundlegroupprovider ibundlegroupprovider internalplatform getdefault unregisterbundlegroupprovider returns the location of the configuration information used to run this instance of eclipse the configuration area typically contains the list of plug ins available for use various settings those shared across different instances of the same configuration and any other such data needed by plug ins code null code is returned if the platform is running without a configuration location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi configuration area p return the location of the platform s configuration data area or code null code if none since 3 0 public static location get configuration location return internal platform get default get configuration location getconfigurationlocation internalplatform getdefault getconfigurationlocation returns the location of the platform s user data area the user data area is a location on the system which is specific to the system s current user by default it is located relative to the location given by the system property user home code null code is returned if the platform is running without an user location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi user area p return the location of the platform s user data area or code null code if none since 3 0 public static location get user location return internal platform get default get user location getuserlocation internalplatform getdefault getuserlocation returns the location of the base installation for the running platform code null code is returned if the platform is running without a configuration location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi install area p return the location of the platform s installation area or code null code if none since 3 0 public static location get install location return internal platform get default get install location getinstalllocation internalplatform getdefault getinstalllocation checks if the specified bundle is a fragment bundle param bundle the bundle to query return true if the specified bundle is a fragment bundle otherwise false is returned since 3 0 public static boolean is fragment bundle bundle return internal platform get default is fragment bundle isfragment internalplatform getdefault isfragment returns an array of attached fragment bundles for the specified bundle if the specified bundle is a fragment then tt null tt is returned if no fragments are attached to the specified bundle then tt null tt is returned param bundle the bundle to get the attached fragment bundles for return an array of fragment bundles or tt null tt if the bundle does not have any attached fragment bundles since 3 0 public static bundle get fragments bundle bundle return internal platform get default get fragments bundle getfragments internalplatform getdefault getfragments returns the resolved bundle with the specified symbolic name that has the highest version if no resolved bundles are installed that have the specified symbolic name then null is returned param symbolic name the symbolic name of the bundle to be returned return the bundle that has the specified symbolic name with the highest version or tt null tt if no bundle is found since 3 0 public static bundle get bundle string symbolic name return internal platform get default get bundle symbolic name symbolicname getbundle symbolicname internalplatform getdefault getbundle symbolicname returns all bundles with the specified symbolic name if no resolved bundles with the specified symbolic name can be found tt null tt is returned if the version argument is not null then only the bundles that have the specified symbolic name and a version greater than or equal to the specified version are returned the returned bundles are ordered in descending bundle version order param symbolic name the symbolic name of the bundles that are to be returned param version the version that the return bundle versions must match or tt null tt if no version matching is to be done return the array of bundles with the specified name that match the specified version and match rule or tt null tt if no bundles are found public static bundle get bundles string symbolic name string version return internal platform get default get bundles symbolic name version symbolicname getbundles symbolicname internalplatform getdefault getbundles symbolicname returns an array of host bundles that the specified fragment bundle is attached to or tt null tt if the specified bundle is not attached to a host if the bundle is not a fragment bundle then tt null tt is returned param bundle the bundle to get the host bundles for return an array of host bundles or null if the bundle does not have any host bundles since 3 0 public static bundle get hosts bundle bundle return internal platform get default get hosts bundle gethosts internalplatform getdefault gethosts returns whether the platform is running return code true code if the platform is running and code false code otherwise since 3 0 public static boolean is running return internal platform get default is running isrunning internalplatform getdefault isrunning returns a list of known system architectures p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getos arch code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of system architectures known to the system see getos arch since 3 0 public static string knownos arch values return internal platform get default knownos arch values getosarch getosarch knownosarchvalues internalplatform getdefault knownosarchvalues returns a list of known operating system names p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getos code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of operating systems known to the system see getos since 3 0 public static string knownos values return internal platform get default knownos values knownosvalues internalplatform getdefault knownosvalues returns a map of known platform line separators the keys are translated names of platforms and the values are their associated line separator strings return a map of platform to their line separator string since 3 1 public static map known platform line separators map result new hash map result put line separator key mac os 9 line separator value cr result put line separator key unix line separator value lf result put line separator key windows line separator value crlf return result knownplatformlineseparators hashmap line_separator_key_mac_os_9 line_separator_value_cr line_separator_key_unix line_separator_value_lf line_separator_key_windows line_separator_value_crlf returns a list of known windowing system names p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getws code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of window systems known to the system see getws since 3 0 public static string knownws values return internal platform get default knownws values knownwsvalues internalplatform getdefault knownwsvalues returns code true code if the platform is currently running in debug mode the platform is typically put in debug mode using the debug command line argument return whether or not the platform is running in debug mode since 3 0 public static boolean in debug mode return system get property osgi debug null non nls 1 indebugmode getproperty returns code true code if the platform is currently running in development mode that is if special procedures are to be taken when defining plug in class paths the platform is typically put in development mode using the dev command line argument return whether or not the platform is running in development mode since 3 0 public static boolean in development mode return system get property osgi dev null non nls 1 indevelopmentmode getproperty private constructor to block instance creation private platform super adds the given authorization information to the key ring the information is relevant for the specified protection space and the given authorization scheme the protection space is defined by the combination of the given server url and realm the authorization scheme determines what the authorization information contains and how it should be used the authorization information is a code map code of code string code to code string code and typically contains information such as user names and passwords param server url the url identifying the server for this authorization information for example http www example com param realm the subsection of the given server to which this authorization information applies for example realm1 example com or for no realm param auth scheme the scheme for which this authorization information applies for example basic or for no authorization scheme param info a code map code containing authorization information such as user names and passwords key type code string code value type code string code exception core exception if there are problems setting the authorization information reasons include ul li the keyring could not be saved li ul public static void add authorization info url server url string realm string auth scheme map info throws core exception internal platform get default add authorization info server url realm auth scheme info serverurl authscheme coreexception addauthorizationinfo serverurl authscheme coreexception internalplatform getdefault addauthorizationinfo serverurl authscheme adds the given log listener to the notification list of the platform p once registered a listener starts receiving notification as entries are added to plug in logs via code i log log code the listener continues to receive notifications until it is replaced or removed p param listener the listener to register see i log add log listener i log listener see remove log listener i log listener public static void add log listener i log listener listener internal platform get default add log listener listener ilog ilog addloglistener iloglistener removeloglistener iloglistener addloglistener iloglistener internalplatform getdefault addloglistener adds the specified resource to the protection space specified by the given realm all targets at or deeper than the depth of the last symbolic element in the path of the given resource url are assumed to be in the same protection space param resource url the url identifying the resources to be added to the specified protection space for example http www example com folder param realm the name of the protection space for example realm1 example com exception core exception if there are problems setting the authorization information reasons include ul li the key ring could not be saved li ul public static void add protection space url resource url string realm throws core exception internal platform get default add protection space resource url realm resourceurl coreexception addprotectionspace resourceurl coreexception internalplatform getdefault addprotectionspace resourceurl returns a url that is the local equivalent of the supplied url this method is expected to be used with the plug in relative ur ls returned by i plugin descriptor bundle get entry and platform find if the specified url is not a plug in relative url it is returned as is if the specified url is a plug in relative url of a file including jar archive it is returned as a locally accessible url using file protocol extracting caching the file locally if required if the specified url is a plug in relative url of a directory the directory and any files and directories under it are made locally accessible likewise if param url original plug in relative url return the resolved url exception io exception if unable to resolve url see resolve url see find bundle i path see bundle get entry string public static url as localurl url url throws io exception return internal platform get default as localurl url urls iplugindescriptor getentry ioexception ipath getentry aslocalurl ioexception internalplatform getdefault aslocalurl takes down the splash screen if one was put up public static void end splash internal platform get default end splash endsplash internalplatform getdefault endsplash removes the authorization information for the specified protection space and given authorization scheme the protection space is defined by the given server url and realm param server url the url identifying the server to remove the authorization information for for example http www example com param realm the subsection of the given server to remove the authorization information for for example realm1 example com or for no realm param auth scheme the scheme for which the authorization information to remove applies for example basic or for no authorization scheme exception core exception if there are problems removing the authorization information reasons include ul li the keyring could not be saved li ul public static void flush authorization info url server url string realm string auth scheme throws core exception internal platform get default flush authorization info server url realm auth scheme serverurl authscheme coreexception flushauthorizationinfo serverurl authscheme coreexception internalplatform getdefault flushauthorizationinfo serverurl authscheme returns the adapter manager used for extending code i adaptable code objects return the adapter manager for this platform see i adapter manager public static i adapter manager get adapter manager return internal platform get default get adapter manager iadaptable iadaptermanager iadaptermanager getadaptermanager internalplatform getdefault getadaptermanager returns the authorization information for the specified protection space and given authorization scheme the protection space is defined by the given server url and realm returns code null code if no such information exists param server url the url identifying the server for the authorization information for example http www example com param realm the subsection of the given server to which the authorization information applies for example realm1 example com or for no realm param auth scheme the scheme for which the authorization information applies for example basic or for no authorization scheme return the authorization information for the specified protection space and given authorization scheme or code null code if no such information exists public static map get authorization info url server url string realm string auth scheme return internal platform get default get authorization info server url realm auth scheme serverurl authscheme getauthorizationinfo serverurl authscheme internalplatform getdefault getauthorizationinfo serverurl authscheme returns the command line args provided to the eclipse runtime layer when it was first run the returned value does not include arguments consumed by the lower levels of eclipse e g os gi or the launcher note that individual platform runnables may be provided with different arguments if they are being run individually rather than with code platform run code return the command line used to start the platform public static string get command line args return internal platform get default get command line args osgi getcommandlineargs internalplatform getdefault getcommandlineargs returns the content type manager return the content type manager since 3 0 public static i content type manager get content type manager return internal platform get default get content type manager icontenttypemanager getcontenttypemanager internalplatform getdefault getcontenttypemanager returns the identified option code null code is returned if no such option is found options are specified in the general form i lt plug in id gt lt option path gt i for example code org eclipse core runtime debug code param option the name of the option to lookup return the value of the requested debug option or code null code public static string get debug option string option return internal platform get default get option option getdebugoption internalplatform getdefault getoption returns the location of the platform working directory p callers of this method should consider using code get instance location code instead in various typically non ide related configurations of eclipse the platform working directory may not be on the local file system as such the more general form of this location is as a url p return the location of the platform see get instance location public static i path get location throws illegal state exception return internal platform get default get location getinstancelocation getinstancelocation ipath getlocation illegalstateexception internalplatform getdefault getlocation returns the location of the platform log file this file may contain information about errors that have previously occurred during this invocation of the platform p it is recommended not to keep this value as the log location may vary when an instance location is being set p p note it is very important that users of this method do not leave the log file open for extended periods of time doing so may prevent others from writing to the log file which could result in important error messages being lost it is strongly recommended that clients wanting to read the log file for extended periods should copy the log file contents elsewhere and immediately close the original file p return the path of the log file on disk public static i path get log file location return internal platform get default get meta area get log location ipath getlogfilelocation internalplatform getdefault getmetaarea getloglocation returns the plug in runtime object for the identified plug in or code null code if no such plug in can be found if the plug in is defined but not yet activated the plug in will be activated before being returned p b note b this method is only able to find and return plug in objects for plug ins described using plugin xml according to the traditional eclipse conventions eclipse 3 0 permits plug ins to be described in manifest mf files and to define their own bundle activators such plug ins cannot be discovered by this method p param id the unique identifier of the desired plug in e g code com example acme code return the plug in runtime object or code null code deprecated this method only works if the compatibility layer is installed and must not be used otherwise see the comments on link i plugin descriptor get plugin for details public static plugin get plugin string id try i plugin registry registry get plugin registry if registry null throw new illegal state exception i plugin descriptor pd registry get plugin descriptor id if pd null return null return pd get plugin catch core exception e todo log the exception return null iplugindescriptor getplugin getplugin ipluginregistry getpluginregistry illegalstateexception iplugindescriptor getplugindescriptor getplugin coreexception returns the plug in registry for this platform return the plug in registry see i plugin registry deprecated code i plugin registry code was refactored in eclipse 3 0 this method only works if the compatibility layer is installed and must not be used otherwise see the comments on link i plugin registry and its methods for details public static i plugin registry get plugin registry bundle compatibility internal platform get default get bundle compatibility helper pi runtime compatibility if compatibility null throw new illegal state exception class old internal platform null try old internal platform compatibility load class org eclipse core internal plugins internal platform non nls 1 method get plugin registry old internal platform get method get plugin registry null non nls 1 return i plugin registry get plugin registry invoke old internal platform null catch exception e ignore the exceptions return null return null ipluginregistry ipluginregistry ipluginregistry ipluginregistry getpluginregistry internalplatform getdefault getbundle compatibilityhelper pi_runtime_compatibility illegalstateexception oldinternalplatform oldinternalplatform loadclass internalplatform getpluginregistry oldinternalplatform getmethod getpluginregistry ipluginregistry getpluginregistry oldinternalplatform returns the location in the local file system of the plug in state area for the given plug in the platform must be running p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings p param plugin the plug in whose state location is returned return a local file system path public static i path get plugin state location plugin plugin return plugin get state location ipath getpluginstatelocation getstatelocation returns the protection space realm for the specified resource or code null code if the realm is unknown param resource url the url of the resource whose protection space is returned for example http www example com folder return the protection space realm for the specified resource or code null code if the realm is unknown public static string get protection space url resource url return internal platform get default get protection space resource url resourceurl getprotectionspace resourceurl internalplatform getdefault getprotectionspace resourceurl removes the indicated identical log listener from the notification list of the platform if no such listener exists no action is taken param listener the listener to de register see i log remove log listener i log listener see add log listener i log listener public static void remove log listener i log listener listener internal platform get default remove log listener listener ilog removeloglistener iloglistener addloglistener iloglistener removeloglistener iloglistener internalplatform getdefault removeloglistener returns a url which is the resolved equivalent of the supplied url this method is expected to be used with the plug in relative ur ls returned by i plugin descriptor bundle get entry and platform find p if the specified url is not a plug in relative url it is returned as is if the specified url is a plug in relative url this method attempts to reduce the given url to one which is native to the java class library eg file http etc p p note however that users of this api should not assume too much about the results of this method while it may consistently return a file url in certain installation configurations others may result in jar or http ur ls p param url original plug in relative url return the resolved url exception io exception if unable to resolve url see as localurl url see find bundle i path see bundle get entry string public static url resolve url url throws io exception return internal platform get default resolve url urls iplugindescriptor getentry urls ioexception aslocalurl ipath getentry ioexception internalplatform getdefault runs the given runnable in a protected mode exceptions thrown in the runnable are logged and passed to the runnable s exception handler such exceptions are not rethrown by this method param runnable the runnable to run public static void run i safe runnable runnable internal platform get default run runnable isaferunnable internalplatform getdefault returns the platform job manager return the platform s job manager since 3 0 public static i job manager get job manager return internal platform get default get job manager ijobmanager getjobmanager internalplatform getdefault getjobmanager returns the extension registry for this platform return the extension registry see i extension registry since 3 0 public static i extension registry get extension registry return internal platform get default get registry iextensionregistry iextensionregistry getextensionregistry internalplatform getdefault getregistry returns a url for the given path in the given bundle returns code null code if the url could not be computed or created param bundle the bundle in which to search param path path relative to plug in installation location return a url for the given path or code null code the actual form of the returned url is not specified see find bundle i path map see resolve url see as localurl url since 3 0 public static url find bundle bundle i path path return find support find bundle path null ipath aslocalurl ipath findsupport returns a url for the given path in the given bundle returns code null code if the url could not be computed or created p find looks for this path in given bundle and any attached fragments code null code is returned if no such entry is found note that there is no specific order to the fragments p p the following arguments may also be used pre nl for language specific information os for operating system specific information ws for windowing system specific information pre p p a path of nl about properties in an environment with a default locale of en ca will return a url corresponding to the first place about properties is found according to the following order pre plugin root nl en ca about properties fragment1 root nl en ca about properties fragment2 root nl en ca about properties plugin root nl en about properties fragment1 root nl en about properties fragment2 root nl en about properties plugin root about properties fragment1 root about properties fragment2 root about properties pre p p the current environment variable values can be overridden using the override map argument p param bundle the bundle in which to search param path file path relative to plug in installation location param override map of override substitution arguments to be used for any arg path elements the map keys correspond to the substitution arguments eg nl or os the resulting values must be of type java lang string if the map is code null code or does not contain the required substitution argument the default is used return a url for the given path or code null code the actual form of the returned url is not specified see resolve url see as localurl url since 3 0 public static url find bundle bundle i path path map override return find support find bundle path override en_ca aslocalurl ipath findsupport returns the location in the local file system of the plug in state area for the given bundle if the plug in state area did not exist prior to this call it is created p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings and other configuration parameters p param bundle the bundle whose state location if returned return a local file system path since 3 0 public static i path get state location bundle bundle return internal platform get default get state location bundle ipath getstatelocation internalplatform getdefault getstatelocation returns a number that changes whenever the set of installed plug ins changes this can be used for invalidating caches that are based on the set of currently installed plug ins e g extensions return a number related to the set of installed plug ins since 3 1 public static long get state stamp return internal platform get default get state time stamp getstatestamp internalplatform getdefault getstatetimestamp returns the log for the given bundle if no such log exists one is created param bundle the bundle whose log is returned return the log for the given bundle since 3 0 public static i log get log bundle bundle return internal platform get default get log bundle ilog getlog internalplatform getdefault getlog returns the given bundle s resource bundle for the current locale p this resource bundle is typically stored as the plugin properties file in the plug in itself and contains any translatable strings used in the plug in manifest file plugin xml p p this mechanism is intended only for externalizing strings found in the plug in manifest file using this method for externalizing strings in your code may result in degraded memory performance p param bundle the bundle whose resource bundle is being queried return the resource bundle exception missing resource exception if the resource bundle was not found since 3 0 public static resource bundle get resource bundle bundle bundle throws missing resource exception return internal platform get default get resource bundle bundle missingresourceexception resourcebundle getresourcebundle missingresourceexception internalplatform getdefault getresourcebundle returns a resource string corresponding to the given argument value if the argument value specifies a resource key the string is looked up in the default resource bundle for the given runtime bundle if the argument does not specify a valid key the argument itself is returned as the resource string the key lookup is performed in the file referenced in the bundle localization header of the bundle manifest if a resource string corresponding to the key is not found in the resource bundle the key value or any default text following the key in the argument value is returned as the resource string a key is identified as a string beginning with the character note that the character is stripped off prior to lookup in the resource bundle p equivalent to code get resource string bundle value get resource bundle code p param bundle the bundle whose resource bundle is being queried param value the value to look for return the resource string see get resource bundle bundle since 3 0 public static string get resource string bundle bundle string value return internal platform get default get resource string bundle value getresourcestring getresourcebundle getresourcebundle getresourcestring internalplatform getdefault getresourcestring returns a resource string corresponding to the given argument value and resource bundle in the given runtime bundle if the argument value specifies a resource key the string is looked up in the given resource bundle if the argument does not specify a valid key the argument itself is returned as the resource string the key lookup is performed against the specified resource bundle if a resource string corresponding to the key is not found in the resource bundle the key value or any default text following the key in the argument value is returned as the resource string a key is identified as a string beginning with the character note that the character is stripped off prior to lookup in the resource bundle p for example assume resource bundle plugin properties contains name project name pre get resource string hello world returns hello world li get resource string name returns project name li get resource string name hello world returns project name li get resource string abcd hello world returns hello world li get resource string abcd returns abcd li get resource string name returns name li pre p param bundle the bundle whose resource bundle is being queried param value the value param resource bundle the resource bundle to query return the resource string see get resource bundle bundle since 3 0 public static string get resource string bundle bundle string value resource bundle resource bundle return internal platform get default get resource string bundle value resource bundle getresourcestring getresourcestring getresourcestring getresourcestring getresourcestring getresourcestring resourcebundle getresourcebundle getresourcestring resourcebundle resourcebundle internalplatform getdefault getresourcestring resourcebundle returns the string name of the current system architecture the value is a user defined string if the architecture is specified on the command line otherwise it is the value returned by code java lang system get property os arch code return the string name of the current system architecture since 3 0 public static string getos arch return internal platform get default getos arch getproperty getosarch internalplatform getdefault getosarch returns the string name of the current locale for use in finding files whose path starts with code nl code return the string name of the current locale since 3 0 public static string getnl return internal platform get default getnl internalplatform getdefault returns the string name of the current operating system for use in finding files whose path starts with code os code code os unknown code is returned if the operating system cannot be determined the value may indicate one of the operating systems known to the platform as specified in code knownos values code or a user defined string if the operating system name is specified on the command line return the string name of the current operating system since 3 0 public static string getos return internal platform get default getos os_unknown knownosvalues internalplatform getdefault returns the string name of the current window system for use in finding files whose path starts with code ws code code null code is returned if the window system cannot be determined return the string name of the current window system or code null code since 3 0 public static string getws return internal platform get default getws internalplatform getdefault returns the arguments not consumed by the framework implementation itself which arguments are consumed is implementation specific these arguments are available for use by the application return the array of command line arguments not consumed by the framework since 3 0 public static string get application args return internal platform get default get application args getapplicationargs internalplatform getdefault getapplicationargs returns the platform administrator for this running eclipse p note this is an internal method and em must not em be used by clients which are not part of the eclipse platform this method allows access to classes which are not eclipse platform api but are part of the os gi runtime that the eclipse platform is built on even as the eclipse platform evolves in compatible ways from release to release the details of the os gi implementation might not p return the platform admin for this instance of eclipse since 3 0 public static platform admin get platform admin return internal platform get default get platform admin osgi osgi platformadmin getplatformadmin internalplatform getdefault getplatformadmin returns the location of the platform s working directory also known as the instance data area code null code is returned if the platform is running without an instance location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi instance area p return the location of the platform s instance data area or code null code if none since 3 0 public static location get instance location return internal platform get default get instance location getinstancelocation internalplatform getdefault getinstancelocation returns the currently registered bundle group providers return the currently registered bundle group providers since 3 0 public static i bundle group provider get bundle group providers return internal platform get default get bundle group providers ibundlegroupprovider getbundlegroupproviders internalplatform getdefault getbundlegroupproviders return the interface into the preference mechanism the returned object can be used for such operations as searching for preference values across multiple scopes and preference import export return an object to interface into the preference mechanism since 3 0 public static i preferences service get preferences service return internal platform get default get preferences service ipreferencesservice getpreferencesservice internalplatform getdefault getpreferencesservice returns the product which was selected when running this eclipse instance or code null code if none return the current product or code null code if none since 3 0 public static i product get product return internal platform get default get product iproduct getproduct internalplatform getdefault getproduct registers the given bundle group provider with the platform param provider a provider to register since 3 0 public static void register bundle group provider i bundle group provider provider internal platform get default register bundle group provider provider registerbundlegroupprovider ibundlegroupprovider internalplatform getdefault registerbundlegroupprovider de registers the given bundle group provider with the platform param provider a provider to de register since 3 0 public static void unregister bundle group provider i bundle group provider provider internal platform get default unregister bundle group provider provider unregisterbundlegroupprovider ibundlegroupprovider internalplatform getdefault unregisterbundlegroupprovider returns the location of the configuration information used to run this instance of eclipse the configuration area typically contains the list of plug ins available for use various settings those shared across different instances of the same configuration and any other such data needed by plug ins code null code is returned if the platform is running without a configuration location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi configuration area p return the location of the platform s configuration data area or code null code if none since 3 0 public static location get configuration location return internal platform get default get configuration location getconfigurationlocation internalplatform getdefault getconfigurationlocation returns the location of the platform s user data area the user data area is a location on the system which is specific to the system s current user by default it is located relative to the location given by the system property user home code null code is returned if the platform is running without an user location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi user area p return the location of the platform s user data area or code null code if none since 3 0 public static location get user location return internal platform get default get user location getuserlocation internalplatform getdefault getuserlocation returns the location of the base installation for the running platform code null code is returned if the platform is running without a configuration location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi install area p return the location of the platform s installation area or code null code if none since 3 0 public static location get install location return internal platform get default get install location getinstalllocation internalplatform getdefault getinstalllocation checks if the specified bundle is a fragment bundle param bundle the bundle to query return true if the specified bundle is a fragment bundle otherwise false is returned since 3 0 public static boolean is fragment bundle bundle return internal platform get default is fragment bundle isfragment internalplatform getdefault isfragment returns an array of attached fragment bundles for the specified bundle if the specified bundle is a fragment then tt null tt is returned if no fragments are attached to the specified bundle then tt null tt is returned param bundle the bundle to get the attached fragment bundles for return an array of fragment bundles or tt null tt if the bundle does not have any attached fragment bundles since 3 0 public static bundle get fragments bundle bundle return internal platform get default get fragments bundle getfragments internalplatform getdefault getfragments returns the resolved bundle with the specified symbolic name that has the highest version if no resolved bundles are installed that have the specified symbolic name then null is returned param symbolic name the symbolic name of the bundle to be returned return the bundle that has the specified symbolic name with the highest version or tt null tt if no bundle is found since 3 0 public static bundle get bundle string symbolic name return internal platform get default get bundle symbolic name symbolicname getbundle symbolicname internalplatform getdefault getbundle symbolicname returns all bundles with the specified symbolic name if no resolved bundles with the specified symbolic name can be found tt null tt is returned if the version argument is not null then only the bundles that have the specified symbolic name and a version greater than or equal to the specified version are returned the returned bundles are ordered in descending bundle version order param symbolic name the symbolic name of the bundles that are to be returned param version the version that the return bundle versions must match or tt null tt if no version matching is to be done return the array of bundles with the specified name that match the specified version and match rule or tt null tt if no bundles are found public static bundle get bundles string symbolic name string version return internal platform get default get bundles symbolic name version symbolicname getbundles symbolicname internalplatform getdefault getbundles symbolicname returns an array of host bundles that the specified fragment bundle is attached to or tt null tt if the specified bundle is not attached to a host if the bundle is not a fragment bundle then tt null tt is returned param bundle the bundle to get the host bundles for return an array of host bundles or null if the bundle does not have any host bundles since 3 0 public static bundle get hosts bundle bundle return internal platform get default get hosts bundle gethosts internalplatform getdefault gethosts returns whether the platform is running return code true code if the platform is running and code false code otherwise since 3 0 public static boolean is running return internal platform get default is running isrunning internalplatform getdefault isrunning returns a list of known system architectures p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getos arch code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of system architectures known to the system see getos arch since 3 0 public static string knownos arch values return internal platform get default knownos arch values getosarch getosarch knownosarchvalues internalplatform getdefault knownosarchvalues returns a list of known operating system names p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getos code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of operating systems known to the system see getos since 3 0 public static string knownos values return internal platform get default knownos values knownosvalues internalplatform getdefault knownosvalues returns a map of known platform line separators the keys are translated names of platforms and the values are their associated line separator strings return a map of platform to their line separator string since 3 1 public static map known platform line separators map result new hash map result put line separator key mac os 9 line separator value cr result put line separator key unix line separator value lf result put line separator key windows line separator value crlf return result knownplatformlineseparators hashmap line_separator_key_mac_os_9 line_separator_value_cr line_separator_key_unix line_separator_value_lf line_separator_key_windows line_separator_value_crlf returns a list of known windowing system names p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getws code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of window systems known to the system see getws since 3 0 public static string knownws values return internal platform get default knownws values knownwsvalues internalplatform getdefault knownwsvalues returns code true code if the platform is currently running in debug mode the platform is typically put in debug mode using the debug command line argument return whether or not the platform is running in debug mode since 3 0 public static boolean in debug mode return system get property osgi debug null non nls 1 indebugmode getproperty returns code true code if the platform is currently running in development mode that is if special procedures are to be taken when defining plug in class paths the platform is typically put in development mode using the dev command line argument return whether or not the platform is running in development mode since 3 0 public static boolean in development mode return system get property osgi dev null non nls 1 indevelopmentmode getproperty private constructor to block instance creation private platform super adds the given authorization information to the key ring the information is relevant for the specified protection space and the given authorization scheme the protection space is defined by the combination of the given server url and realm the authorization scheme determines what the authorization information contains and how it should be used the authorization information is a code map code of code string code to code string code and typically contains information such as user names and passwords param server url the url identifying the server for this authorization information for example http www example com param realm the subsection of the given server to which this authorization information applies for example realm1 example com or for no realm param auth scheme the scheme for which this authorization information applies for example basic or for no authorization scheme param info a code map code containing authorization information such as user names and passwords key type code string code value type code string code exception core exception if there are problems setting the authorization information reasons include ul li the keyring could not be saved li ul public static void add authorization info url server url string realm string auth scheme map info throws core exception internal platform get default add authorization info server url realm auth scheme info serverurl authscheme coreexception addauthorizationinfo serverurl authscheme coreexception internalplatform getdefault addauthorizationinfo serverurl authscheme adds the given log listener to the notification list of the platform p once registered a listener starts receiving notification as entries are added to plug in logs via code i log log code the listener continues to receive notifications until it is replaced or removed p param listener the listener to register see i log add log listener i log listener see remove log listener i log listener public static void add log listener i log listener listener internal platform get default add log listener listener ilog ilog addloglistener iloglistener removeloglistener iloglistener addloglistener iloglistener internalplatform getdefault addloglistener adds the specified resource to the protection space specified by the given realm all targets at or deeper than the depth of the last symbolic element in the path of the given resource url are assumed to be in the same protection space param resource url the url identifying the resources to be added to the specified protection space for example http www example com folder param realm the name of the protection space for example realm1 example com exception core exception if there are problems setting the authorization information reasons include ul li the key ring could not be saved li ul public static void add protection space url resource url string realm throws core exception internal platform get default add protection space resource url realm resourceurl coreexception addprotectionspace resourceurl coreexception internalplatform getdefault addprotectionspace resourceurl returns a url that is the local equivalent of the supplied url this method is expected to be used with the plug in relative ur ls returned by i plugin descriptor bundle get entry and platform find if the specified url is not a plug in relative url it is returned as is if the specified url is a plug in relative url of a file including jar archive it is returned as a locally accessible url using file protocol extracting caching the file locally if required if the specified url is a plug in relative url of a directory the directory and any files and directories under it are made locally accessible likewise if param url original plug in relative url return the resolved url exception io exception if unable to resolve url see resolve url see find bundle i path see bundle get entry string public static url as localurl url url throws io exception return internal platform get default as localurl url urls iplugindescriptor getentry ioexception ipath getentry aslocalurl ioexception internalplatform getdefault aslocalurl takes down the splash screen if one was put up public static void end splash internal platform get default end splash endsplash internalplatform getdefault endsplash removes the authorization information for the specified protection space and given authorization scheme the protection space is defined by the given server url and realm param server url the url identifying the server to remove the authorization information for for example http www example com param realm the subsection of the given server to remove the authorization information for for example realm1 example com or for no realm param auth scheme the scheme for which the authorization information to remove applies for example basic or for no authorization scheme exception core exception if there are problems removing the authorization information reasons include ul li the keyring could not be saved li ul public static void flush authorization info url server url string realm string auth scheme throws core exception internal platform get default flush authorization info server url realm auth scheme serverurl authscheme coreexception flushauthorizationinfo serverurl authscheme coreexception internalplatform getdefault flushauthorizationinfo serverurl authscheme returns the adapter manager used for extending code i adaptable code objects return the adapter manager for this platform see i adapter manager public static i adapter manager get adapter manager return internal platform get default get adapter manager iadaptable iadaptermanager iadaptermanager getadaptermanager internalplatform getdefault getadaptermanager returns the authorization information for the specified protection space and given authorization scheme the protection space is defined by the given server url and realm returns code null code if no such information exists param server url the url identifying the server for the authorization information for example http www example com param realm the subsection of the given server to which the authorization information applies for example realm1 example com or for no realm param auth scheme the scheme for which the authorization information applies for example basic or for no authorization scheme return the authorization information for the specified protection space and given authorization scheme or code null code if no such information exists public static map get authorization info url server url string realm string auth scheme return internal platform get default get authorization info server url realm auth scheme serverurl authscheme getauthorizationinfo serverurl authscheme internalplatform getdefault getauthorizationinfo serverurl authscheme returns the command line args provided to the eclipse runtime layer when it was first run the returned value does not include arguments consumed by the lower levels of eclipse e g os gi or the launcher note that individual platform runnables may be provided with different arguments if they are being run individually rather than with code platform run code return the command line used to start the platform public static string get command line args return internal platform get default get command line args osgi getcommandlineargs internalplatform getdefault getcommandlineargs returns the content type manager return the content type manager since 3 0 public static i content type manager get content type manager return internal platform get default get content type manager icontenttypemanager getcontenttypemanager internalplatform getdefault getcontenttypemanager returns the identified option code null code is returned if no such option is found options are specified in the general form i lt plug in id gt lt option path gt i for example code org eclipse core runtime debug code param option the name of the option to lookup return the value of the requested debug option or code null code public static string get debug option string option return internal platform get default get option option getdebugoption internalplatform getdefault getoption returns the location of the platform working directory p callers of this method should consider using code get instance location code instead in various typically non ide related configurations of eclipse the platform working directory may not be on the local file system as such the more general form of this location is as a url p return the location of the platform see get instance location public static i path get location throws illegal state exception return internal platform get default get location getinstancelocation getinstancelocation ipath getlocation illegalstateexception internalplatform getdefault getlocation returns the location of the platform log file this file may contain information about errors that have previously occurred during this invocation of the platform p it is recommended not to keep this value as the log location may vary when an instance location is being set p p note it is very important that users of this method do not leave the log file open for extended periods of time doing so may prevent others from writing to the log file which could result in important error messages being lost it is strongly recommended that clients wanting to read the log file for extended periods should copy the log file contents elsewhere and immediately close the original file p return the path of the log file on disk public static i path get log file location return internal platform get default get meta area get log location ipath getlogfilelocation internalplatform getdefault getmetaarea getloglocation returns the plug in runtime object for the identified plug in or code null code if no such plug in can be found if the plug in is defined but not yet activated the plug in will be activated before being returned p b note b this method is only able to find and return plug in objects for plug ins described using plugin xml according to the traditional eclipse conventions eclipse 3 0 permits plug ins to be described in manifest mf files and to define their own bundle activators such plug ins cannot be discovered by this method p param id the unique identifier of the desired plug in e g code com example acme code return the plug in runtime object or code null code deprecated this method only works if the compatibility layer is installed and must not be used otherwise see the comments on link i plugin descriptor get plugin for details public static plugin get plugin string id try i plugin registry registry get plugin registry if registry null throw new illegal state exception i plugin descriptor pd registry get plugin descriptor id if pd null return null return pd get plugin catch core exception e todo log the exception return null iplugindescriptor getplugin getplugin ipluginregistry getpluginregistry illegalstateexception iplugindescriptor getplugindescriptor getplugin coreexception returns the plug in registry for this platform return the plug in registry see i plugin registry deprecated code i plugin registry code was refactored in eclipse 3 0 this method only works if the compatibility layer is installed and must not be used otherwise see the comments on link i plugin registry and its methods for details public static i plugin registry get plugin registry bundle compatibility internal platform get default get bundle compatibility helper pi runtime compatibility if compatibility null throw new illegal state exception class old internal platform null try old internal platform compatibility load class org eclipse core internal plugins internal platform non nls 1 method get plugin registry old internal platform get method get plugin registry null non nls 1 return i plugin registry get plugin registry invoke old internal platform null catch exception e ignore the exceptions return null return null ipluginregistry ipluginregistry ipluginregistry ipluginregistry getpluginregistry internalplatform getdefault getbundle compatibilityhelper pi_runtime_compatibility illegalstateexception oldinternalplatform oldinternalplatform loadclass internalplatform getpluginregistry oldinternalplatform getmethod getpluginregistry ipluginregistry getpluginregistry oldinternalplatform returns the location in the local file system of the plug in state area for the given plug in the platform must be running p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings p param plugin the plug in whose state location is returned return a local file system path public static i path get plugin state location plugin plugin return plugin get state location ipath getpluginstatelocation getstatelocation returns the protection space realm for the specified resource or code null code if the realm is unknown param resource url the url of the resource whose protection space is returned for example http www example com folder return the protection space realm for the specified resource or code null code if the realm is unknown public static string get protection space url resource url return internal platform get default get protection space resource url resourceurl getprotectionspace resourceurl internalplatform getdefault getprotectionspace resourceurl removes the indicated identical log listener from the notification list of the platform if no such listener exists no action is taken param listener the listener to de register see i log remove log listener i log listener see add log listener i log listener public static void remove log listener i log listener listener internal platform get default remove log listener listener ilog removeloglistener iloglistener addloglistener iloglistener removeloglistener iloglistener internalplatform getdefault removeloglistener returns a url which is the resolved equivalent of the supplied url this method is expected to be used with the plug in relative ur ls returned by i plugin descriptor bundle get entry and platform find p if the specified url is not a plug in relative url it is returned as is if the specified url is a plug in relative url this method attempts to reduce the given url to one which is native to the java class library eg file http etc p p note however that users of this api should not assume too much about the results of this method while it may consistently return a file url in certain installation configurations others may result in jar or http ur ls p param url original plug in relative url return the resolved url exception io exception if unable to resolve url see as localurl url see find bundle i path see bundle get entry string public static url resolve url url throws io exception return internal platform get default resolve url urls iplugindescriptor getentry urls ioexception aslocalurl ipath getentry ioexception internalplatform getdefault runs the given runnable in a protected mode exceptions thrown in the runnable are logged and passed to the runnable s exception handler such exceptions are not rethrown by this method param runnable the runnable to run public static void run i safe runnable runnable internal platform get default run runnable isaferunnable internalplatform getdefault returns the platform job manager return the platform s job manager since 3 0 public static i job manager get job manager return internal platform get default get job manager ijobmanager getjobmanager internalplatform getdefault getjobmanager returns the extension registry for this platform return the extension registry see i extension registry since 3 0 public static i extension registry get extension registry return internal platform get default get registry iextensionregistry iextensionregistry getextensionregistry internalplatform getdefault getregistry returns a url for the given path in the given bundle returns code null code if the url could not be computed or created param bundle the bundle in which to search param path path relative to plug in installation location return a url for the given path or code null code the actual form of the returned url is not specified see find bundle i path map see resolve url see as localurl url since 3 0 public static url find bundle bundle i path path return find support find bundle path null ipath aslocalurl ipath findsupport returns a url for the given path in the given bundle returns code null code if the url could not be computed or created p find looks for this path in given bundle and any attached fragments code null code is returned if no such entry is found note that there is no specific order to the fragments p p the following arguments may also be used pre nl for language specific information os for operating system specific information ws for windowing system specific information pre p p a path of nl about properties in an environment with a default locale of en ca will return a url corresponding to the first place about properties is found according to the following order pre plugin root nl en ca about properties fragment1 root nl en ca about properties fragment2 root nl en ca about properties plugin root nl en about properties fragment1 root nl en about properties fragment2 root nl en about properties plugin root about properties fragment1 root about properties fragment2 root about properties pre p p the current environment variable values can be overridden using the override map argument p param bundle the bundle in which to search param path file path relative to plug in installation location param override map of override substitution arguments to be used for any arg path elements the map keys correspond to the substitution arguments eg nl or os the resulting values must be of type java lang string if the map is code null code or does not contain the required substitution argument the default is used return a url for the given path or code null code the actual form of the returned url is not specified see resolve url see as localurl url since 3 0 public static url find bundle bundle i path path map override return find support find bundle path override en_ca aslocalurl ipath findsupport returns the location in the local file system of the plug in state area for the given bundle if the plug in state area did not exist prior to this call it is created p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings and other configuration parameters p param bundle the bundle whose state location if returned return a local file system path since 3 0 public static i path get state location bundle bundle return internal platform get default get state location bundle ipath getstatelocation internalplatform getdefault getstatelocation returns a number that changes whenever the set of installed plug ins changes this can be used for invalidating caches that are based on the set of currently installed plug ins e g extensions return a number related to the set of installed plug ins since 3 1 public static long get state stamp return internal platform get default get state time stamp getstatestamp internalplatform getdefault getstatetimestamp returns the log for the given bundle if no such log exists one is created param bundle the bundle whose log is returned return the log for the given bundle since 3 0 public static i log get log bundle bundle return internal platform get default get log bundle ilog getlog internalplatform getdefault getlog returns the given bundle s resource bundle for the current locale p this resource bundle is typically stored as the plugin properties file in the plug in itself and contains any translatable strings used in the plug in manifest file plugin xml p p this mechanism is intended only for externalizing strings found in the plug in manifest file using this method for externalizing strings in your code may result in degraded memory performance p param bundle the bundle whose resource bundle is being queried return the resource bundle exception missing resource exception if the resource bundle was not found since 3 0 public static resource bundle get resource bundle bundle bundle throws missing resource exception return internal platform get default get resource bundle bundle missingresourceexception resourcebundle getresourcebundle missingresourceexception internalplatform getdefault getresourcebundle returns a resource string corresponding to the given argument value if the argument value specifies a resource key the string is looked up in the default resource bundle for the given runtime bundle if the argument does not specify a valid key the argument itself is returned as the resource string the key lookup is performed in the file referenced in the bundle localization header of the bundle manifest if a resource string corresponding to the key is not found in the resource bundle the key value or any default text following the key in the argument value is returned as the resource string a key is identified as a string beginning with the character note that the character is stripped off prior to lookup in the resource bundle p equivalent to code get resource string bundle value get resource bundle code p param bundle the bundle whose resource bundle is being queried param value the value to look for return the resource string see get resource bundle bundle since 3 0 public static string get resource string bundle bundle string value return internal platform get default get resource string bundle value getresourcestring getresourcebundle getresourcebundle getresourcestring internalplatform getdefault getresourcestring returns a resource string corresponding to the given argument value and resource bundle in the given runtime bundle if the argument value specifies a resource key the string is looked up in the given resource bundle if the argument does not specify a valid key the argument itself is returned as the resource string the key lookup is performed against the specified resource bundle if a resource string corresponding to the key is not found in the resource bundle the key value or any default text following the key in the argument value is returned as the resource string a key is identified as a string beginning with the character note that the character is stripped off prior to lookup in the resource bundle p for example assume resource bundle plugin properties contains name project name pre get resource string hello world returns hello world li get resource string name returns project name li get resource string name hello world returns project name li get resource string abcd hello world returns hello world li get resource string abcd returns abcd li get resource string name returns name li pre p param bundle the bundle whose resource bundle is being queried param value the value param resource bundle the resource bundle to query return the resource string see get resource bundle bundle since 3 0 public static string get resource string bundle bundle string value resource bundle resource bundle return internal platform get default get resource string bundle value resource bundle getresourcestring getresourcestring getresourcestring getresourcestring getresourcestring getresourcestring resourcebundle getresourcebundle getresourcestring resourcebundle resourcebundle internalplatform getdefault getresourcestring resourcebundle returns the string name of the current system architecture the value is a user defined string if the architecture is specified on the command line otherwise it is the value returned by code java lang system get property os arch code return the string name of the current system architecture since 3 0 public static string getos arch return internal platform get default getos arch getproperty getosarch internalplatform getdefault getosarch returns the string name of the current locale for use in finding files whose path starts with code nl code return the string name of the current locale since 3 0 public static string getnl return internal platform get default getnl internalplatform getdefault returns the string name of the current operating system for use in finding files whose path starts with code os code code os unknown code is returned if the operating system cannot be determined the value may indicate one of the operating systems known to the platform as specified in code knownos values code or a user defined string if the operating system name is specified on the command line return the string name of the current operating system since 3 0 public static string getos return internal platform get default getos os_unknown knownosvalues internalplatform getdefault returns the string name of the current window system for use in finding files whose path starts with code ws code code null code is returned if the window system cannot be determined return the string name of the current window system or code null code since 3 0 public static string getws return internal platform get default getws internalplatform getdefault returns the arguments not consumed by the framework implementation itself which arguments are consumed is implementation specific these arguments are available for use by the application return the array of command line arguments not consumed by the framework since 3 0 public static string get application args return internal platform get default get application args getapplicationargs internalplatform getdefault getapplicationargs returns the platform administrator for this running eclipse p note this is an internal method and em must not em be used by clients which are not part of the eclipse platform this method allows access to classes which are not eclipse platform api but are part of the os gi runtime that the eclipse platform is built on even as the eclipse platform evolves in compatible ways from release to release the details of the os gi implementation might not p return the platform admin for this instance of eclipse since 3 0 public static platform admin get platform admin return internal platform get default get platform admin osgi osgi platformadmin getplatformadmin internalplatform getdefault getplatformadmin returns the location of the platform s working directory also known as the instance data area code null code is returned if the platform is running without an instance location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi instance area p return the location of the platform s instance data area or code null code if none since 3 0 public static location get instance location return internal platform get default get instance location getinstancelocation internalplatform getdefault getinstancelocation returns the currently registered bundle group providers return the currently registered bundle group providers since 3 0 public static i bundle group provider get bundle group providers return internal platform get default get bundle group providers ibundlegroupprovider getbundlegroupproviders internalplatform getdefault getbundlegroupproviders return the interface into the preference mechanism the returned object can be used for such operations as searching for preference values across multiple scopes and preference import export return an object to interface into the preference mechanism since 3 0 public static i preferences service get preferences service return internal platform get default get preferences service ipreferencesservice getpreferencesservice internalplatform getdefault getpreferencesservice returns the product which was selected when running this eclipse instance or code null code if none return the current product or code null code if none since 3 0 public static i product get product return internal platform get default get product iproduct getproduct internalplatform getdefault getproduct registers the given bundle group provider with the platform param provider a provider to register since 3 0 public static void register bundle group provider i bundle group provider provider internal platform get default register bundle group provider provider registerbundlegroupprovider ibundlegroupprovider internalplatform getdefault registerbundlegroupprovider de registers the given bundle group provider with the platform param provider a provider to de register since 3 0 public static void unregister bundle group provider i bundle group provider provider internal platform get default unregister bundle group provider provider unregisterbundlegroupprovider ibundlegroupprovider internalplatform getdefault unregisterbundlegroupprovider returns the location of the configuration information used to run this instance of eclipse the configuration area typically contains the list of plug ins available for use various settings those shared across different instances of the same configuration and any other such data needed by plug ins code null code is returned if the platform is running without a configuration location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi configuration area p return the location of the platform s configuration data area or code null code if none since 3 0 public static location get configuration location return internal platform get default get configuration location getconfigurationlocation internalplatform getdefault getconfigurationlocation returns the location of the platform s user data area the user data area is a location on the system which is specific to the system s current user by default it is located relative to the location given by the system property user home code null code is returned if the platform is running without an user location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi user area p return the location of the platform s user data area or code null code if none since 3 0 public static location get user location return internal platform get default get user location getuserlocation internalplatform getdefault getuserlocation returns the location of the base installation for the running platform code null code is returned if the platform is running without a configuration location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi install area p return the location of the platform s installation area or code null code if none since 3 0 public static location get install location return internal platform get default get install location getinstalllocation internalplatform getdefault getinstalllocation checks if the specified bundle is a fragment bundle param bundle the bundle to query return true if the specified bundle is a fragment bundle otherwise false is returned since 3 0 public static boolean is fragment bundle bundle return internal platform get default is fragment bundle isfragment internalplatform getdefault isfragment returns an array of attached fragment bundles for the specified bundle if the specified bundle is a fragment then tt null tt is returned if no fragments are attached to the specified bundle then tt null tt is returned param bundle the bundle to get the attached fragment bundles for return an array of fragment bundles or tt null tt if the bundle does not have any attached fragment bundles since 3 0 public static bundle get fragments bundle bundle return internal platform get default get fragments bundle getfragments internalplatform getdefault getfragments returns the resolved bundle with the specified symbolic name that has the highest version if no resolved bundles are installed that have the specified symbolic name then null is returned param symbolic name the symbolic name of the bundle to be returned return the bundle that has the specified symbolic name with the highest version or tt null tt if no bundle is found since 3 0 public static bundle get bundle string symbolic name return internal platform get default get bundle symbolic name symbolicname getbundle symbolicname internalplatform getdefault getbundle symbolicname returns all bundles with the specified symbolic name if no resolved bundles with the specified symbolic name can be found tt null tt is returned if the version argument is not null then only the bundles that have the specified symbolic name and a version greater than or equal to the specified version are returned the returned bundles are ordered in descending bundle version order param symbolic name the symbolic name of the bundles that are to be returned param version the version that the return bundle versions must match or tt null tt if no version matching is to be done return the array of bundles with the specified name that match the specified version and match rule or tt null tt if no bundles are found public static bundle get bundles string symbolic name string version return internal platform get default get bundles symbolic name version symbolicname getbundles symbolicname internalplatform getdefault getbundles symbolicname returns an array of host bundles that the specified fragment bundle is attached to or tt null tt if the specified bundle is not attached to a host if the bundle is not a fragment bundle then tt null tt is returned param bundle the bundle to get the host bundles for return an array of host bundles or null if the bundle does not have any host bundles since 3 0 public static bundle get hosts bundle bundle return internal platform get default get hosts bundle gethosts internalplatform getdefault gethosts returns whether the platform is running return code true code if the platform is running and code false code otherwise since 3 0 public static boolean is running return internal platform get default is running isrunning internalplatform getdefault isrunning returns a list of known system architectures p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getos arch code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of system architectures known to the system see getos arch since 3 0 public static string knownos arch values return internal platform get default knownos arch values getosarch getosarch knownosarchvalues internalplatform getdefault knownosarchvalues returns a list of known operating system names p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getos code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of operating systems known to the system see getos since 3 0 public static string knownos values return internal platform get default knownos values knownosvalues internalplatform getdefault knownosvalues returns a map of known platform line separators the keys are translated names of platforms and the values are their associated line separator strings return a map of platform to their line separator string since 3 1 public static map known platform line separators map result new hash map result put line separator key mac os 9 line separator value cr result put line separator key unix line separator value lf result put line separator key windows line separator value crlf return result knownplatformlineseparators hashmap line_separator_key_mac_os_9 line_separator_value_cr line_separator_key_unix line_separator_value_lf line_separator_key_windows line_separator_value_crlf returns a list of known windowing system names p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getws code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of window systems known to the system see getws since 3 0 public static string knownws values return internal platform get default knownws values knownwsvalues internalplatform getdefault knownwsvalues returns code true code if the platform is currently running in debug mode the platform is typically put in debug mode using the debug command line argument return whether or not the platform is running in debug mode since 3 0 public static boolean in debug mode return system get property osgi debug null non nls 1 indebugmode getproperty returns code true code if the platform is currently running in development mode that is if special procedures are to be taken when defining plug in class paths the platform is typically put in development mode using the dev command line argument return whether or not the platform is running in development mode since 3 0 public static boolean in development mode return system get property osgi dev null non nls 1 indevelopmentmode getproperty private constructor to block instance creation private platform super adds the given authorization information to the key ring the information is relevant for the specified protection space and the given authorization scheme the protection space is defined by the combination of the given server url and realm the authorization scheme determines what the authorization information contains and how it should be used the authorization information is a code map code of code string code to code string code and typically contains information such as user names and passwords param server url the url identifying the server for this authorization information for example http www example com param realm the subsection of the given server to which this authorization information applies for example realm1 example com or for no realm param auth scheme the scheme for which this authorization information applies for example basic or for no authorization scheme param info a code map code containing authorization information such as user names and passwords key type code string code value type code string code exception core exception if there are problems setting the authorization information reasons include ul li the keyring could not be saved li ul public static void add authorization info url server url string realm string auth scheme map info throws core exception internal platform get default add authorization info server url realm auth scheme info serverurl authscheme coreexception addauthorizationinfo serverurl authscheme coreexception internalplatform getdefault addauthorizationinfo serverurl authscheme adds the given log listener to the notification list of the platform p once registered a listener starts receiving notification as entries are added to plug in logs via code i log log code the listener continues to receive notifications until it is replaced or removed p param listener the listener to register see i log add log listener i log listener see remove log listener i log listener public static void add log listener i log listener listener internal platform get default add log listener listener ilog ilog addloglistener iloglistener removeloglistener iloglistener addloglistener iloglistener internalplatform getdefault addloglistener adds the specified resource to the protection space specified by the given realm all targets at or deeper than the depth of the last symbolic element in the path of the given resource url are assumed to be in the same protection space param resource url the url identifying the resources to be added to the specified protection space for example http www example com folder param realm the name of the protection space for example realm1 example com exception core exception if there are problems setting the authorization information reasons include ul li the key ring could not be saved li ul public static void add protection space url resource url string realm throws core exception internal platform get default add protection space resource url realm resourceurl coreexception addprotectionspace resourceurl coreexception internalplatform getdefault addprotectionspace resourceurl returns a url that is the local equivalent of the supplied url this method is expected to be used with the plug in relative ur ls returned by i plugin descriptor bundle get entry and platform find if the specified url is not a plug in relative url it is returned as is if the specified url is a plug in relative url of a file including jar archive it is returned as a locally accessible url using file protocol extracting caching the file locally if required if the specified url is a plug in relative url of a directory the directory and any files and directories under it are made locally accessible likewise if param url original plug in relative url return the resolved url exception io exception if unable to resolve url see resolve url see find bundle i path see bundle get entry string public static url as localurl url url throws io exception return internal platform get default as localurl url urls iplugindescriptor getentry ioexception ipath getentry aslocalurl ioexception internalplatform getdefault aslocalurl takes down the splash screen if one was put up public static void end splash internal platform get default end splash endsplash internalplatform getdefault endsplash removes the authorization information for the specified protection space and given authorization scheme the protection space is defined by the given server url and realm param server url the url identifying the server to remove the authorization information for for example http www example com param realm the subsection of the given server to remove the authorization information for for example realm1 example com or for no realm param auth scheme the scheme for which the authorization information to remove applies for example basic or for no authorization scheme exception core exception if there are problems removing the authorization information reasons include ul li the keyring could not be saved li ul public static void flush authorization info url server url string realm string auth scheme throws core exception internal platform get default flush authorization info server url realm auth scheme serverurl authscheme coreexception flushauthorizationinfo serverurl authscheme coreexception internalplatform getdefault flushauthorizationinfo serverurl authscheme returns the adapter manager used for extending code i adaptable code objects return the adapter manager for this platform see i adapter manager public static i adapter manager get adapter manager return internal platform get default get adapter manager iadaptable iadaptermanager iadaptermanager getadaptermanager internalplatform getdefault getadaptermanager returns the authorization information for the specified protection space and given authorization scheme the protection space is defined by the given server url and realm returns code null code if no such information exists param server url the url identifying the server for the authorization information for example http www example com param realm the subsection of the given server to which the authorization information applies for example realm1 example com or for no realm param auth scheme the scheme for which the authorization information applies for example basic or for no authorization scheme return the authorization information for the specified protection space and given authorization scheme or code null code if no such information exists public static map get authorization info url server url string realm string auth scheme return internal platform get default get authorization info server url realm auth scheme serverurl authscheme getauthorizationinfo serverurl authscheme internalplatform getdefault getauthorizationinfo serverurl authscheme returns the command line args provided to the eclipse runtime layer when it was first run the returned value does not include arguments consumed by the lower levels of eclipse e g os gi or the launcher note that individual platform runnables may be provided with different arguments if they are being run individually rather than with code platform run code return the command line used to start the platform public static string get command line args return internal platform get default get command line args osgi getcommandlineargs internalplatform getdefault getcommandlineargs returns the content type manager return the content type manager since 3 0 public static i content type manager get content type manager return internal platform get default get content type manager icontenttypemanager getcontenttypemanager internalplatform getdefault getcontenttypemanager returns the identified option code null code is returned if no such option is found options are specified in the general form i lt plug in id gt lt option path gt i for example code org eclipse core runtime debug code param option the name of the option to lookup return the value of the requested debug option or code null code public static string get debug option string option return internal platform get default get option option getdebugoption internalplatform getdefault getoption returns the location of the platform working directory p callers of this method should consider using code get instance location code instead in various typically non ide related configurations of eclipse the platform working directory may not be on the local file system as such the more general form of this location is as a url p return the location of the platform see get instance location public static i path get location throws illegal state exception return internal platform get default get location getinstancelocation getinstancelocation ipath getlocation illegalstateexception internalplatform getdefault getlocation returns the location of the platform log file this file may contain information about errors that have previously occurred during this invocation of the platform p it is recommended not to keep this value as the log location may vary when an instance location is being set p p note it is very important that users of this method do not leave the log file open for extended periods of time doing so may prevent others from writing to the log file which could result in important error messages being lost it is strongly recommended that clients wanting to read the log file for extended periods should copy the log file contents elsewhere and immediately close the original file p return the path of the log file on disk public static i path get log file location return internal platform get default get meta area get log location ipath getlogfilelocation internalplatform getdefault getmetaarea getloglocation returns the plug in runtime object for the identified plug in or code null code if no such plug in can be found if the plug in is defined but not yet activated the plug in will be activated before being returned p b note b this method is only able to find and return plug in objects for plug ins described using plugin xml according to the traditional eclipse conventions eclipse 3 0 permits plug ins to be described in manifest mf files and to define their own bundle activators such plug ins cannot be discovered by this method p param id the unique identifier of the desired plug in e g code com example acme code return the plug in runtime object or code null code deprecated this method only works if the compatibility layer is installed and must not be used otherwise see the comments on link i plugin descriptor get plugin for details public static plugin get plugin string id try i plugin registry registry get plugin registry if registry null throw new illegal state exception i plugin descriptor pd registry get plugin descriptor id if pd null return null return pd get plugin catch core exception e todo log the exception return null iplugindescriptor getplugin getplugin ipluginregistry getpluginregistry illegalstateexception iplugindescriptor getplugindescriptor getplugin coreexception returns the plug in registry for this platform return the plug in registry see i plugin registry deprecated code i plugin registry code was refactored in eclipse 3 0 this method only works if the compatibility layer is installed and must not be used otherwise see the comments on link i plugin registry and its methods for details public static i plugin registry get plugin registry bundle compatibility internal platform get default get bundle compatibility helper pi runtime compatibility if compatibility null throw new illegal state exception class old internal platform null try old internal platform compatibility load class org eclipse core internal plugins internal platform non nls 1 method get plugin registry old internal platform get method get plugin registry null non nls 1 return i plugin registry get plugin registry invoke old internal platform null catch exception e ignore the exceptions return null return null ipluginregistry ipluginregistry ipluginregistry ipluginregistry getpluginregistry internalplatform getdefault getbundle compatibilityhelper pi_runtime_compatibility illegalstateexception oldinternalplatform oldinternalplatform loadclass internalplatform getpluginregistry oldinternalplatform getmethod getpluginregistry ipluginregistry getpluginregistry oldinternalplatform returns the location in the local file system of the plug in state area for the given plug in the platform must be running p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings p param plugin the plug in whose state location is returned return a local file system path public static i path get plugin state location plugin plugin return plugin get state location ipath getpluginstatelocation getstatelocation returns the protection space realm for the specified resource or code null code if the realm is unknown param resource url the url of the resource whose protection space is returned for example http www example com folder return the protection space realm for the specified resource or code null code if the realm is unknown public static string get protection space url resource url return internal platform get default get protection space resource url resourceurl getprotectionspace resourceurl internalplatform getdefault getprotectionspace resourceurl removes the indicated identical log listener from the notification list of the platform if no such listener exists no action is taken param listener the listener to de register see i log remove log listener i log listener see add log listener i log listener public static void remove log listener i log listener listener internal platform get default remove log listener listener ilog removeloglistener iloglistener addloglistener iloglistener removeloglistener iloglistener internalplatform getdefault removeloglistener returns a url which is the resolved equivalent of the supplied url this method is expected to be used with the plug in relative ur ls returned by i plugin descriptor bundle get entry and platform find p if the specified url is not a plug in relative url it is returned as is if the specified url is a plug in relative url this method attempts to reduce the given url to one which is native to the java class library eg file http etc p p note however that users of this api should not assume too much about the results of this method while it may consistently return a file url in certain installation configurations others may result in jar or http ur ls p param url original plug in relative url return the resolved url exception io exception if unable to resolve url see as localurl url see find bundle i path see bundle get entry string public static url resolve url url throws io exception return internal platform get default resolve url urls iplugindescriptor getentry urls ioexception aslocalurl ipath getentry ioexception internalplatform getdefault runs the given runnable in a protected mode exceptions thrown in the runnable are logged and passed to the runnable s exception handler such exceptions are not rethrown by this method param runnable the runnable to run public static void run i safe runnable runnable internal platform get default run runnable isaferunnable internalplatform getdefault returns the platform job manager return the platform s job manager since 3 0 public static i job manager get job manager return internal platform get default get job manager ijobmanager getjobmanager internalplatform getdefault getjobmanager returns the extension registry for this platform return the extension registry see i extension registry since 3 0 public static i extension registry get extension registry return internal platform get default get registry iextensionregistry iextensionregistry getextensionregistry internalplatform getdefault getregistry returns a url for the given path in the given bundle returns code null code if the url could not be computed or created param bundle the bundle in which to search param path path relative to plug in installation location return a url for the given path or code null code the actual form of the returned url is not specified see find bundle i path map see resolve url see as localurl url since 3 0 public static url find bundle bundle i path path return find support find bundle path null ipath aslocalurl ipath findsupport returns a url for the given path in the given bundle returns code null code if the url could not be computed or created p find looks for this path in given bundle and any attached fragments code null code is returned if no such entry is found note that there is no specific order to the fragments p p the following arguments may also be used pre nl for language specific information os for operating system specific information ws for windowing system specific information pre p p a path of nl about properties in an environment with a default locale of en ca will return a url corresponding to the first place about properties is found according to the following order pre plugin root nl en ca about properties fragment1 root nl en ca about properties fragment2 root nl en ca about properties plugin root nl en about properties fragment1 root nl en about properties fragment2 root nl en about properties plugin root about properties fragment1 root about properties fragment2 root about properties pre p p the current environment variable values can be overridden using the override map argument p param bundle the bundle in which to search param path file path relative to plug in installation location param override map of override substitution arguments to be used for any arg path elements the map keys correspond to the substitution arguments eg nl or os the resulting values must be of type java lang string if the map is code null code or does not contain the required substitution argument the default is used return a url for the given path or code null code the actual form of the returned url is not specified see resolve url see as localurl url since 3 0 public static url find bundle bundle i path path map override return find support find bundle path override en_ca aslocalurl ipath findsupport returns the location in the local file system of the plug in state area for the given bundle if the plug in state area did not exist prior to this call it is created p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings and other configuration parameters p param bundle the bundle whose state location if returned return a local file system path since 3 0 public static i path get state location bundle bundle return internal platform get default get state location bundle ipath getstatelocation internalplatform getdefault getstatelocation returns a number that changes whenever the set of installed plug ins changes this can be used for invalidating caches that are based on the set of currently installed plug ins e g extensions return a number related to the set of installed plug ins since 3 1 public static long get state stamp return internal platform get default get state time stamp getstatestamp internalplatform getdefault getstatetimestamp returns the log for the given bundle if no such log exists one is created param bundle the bundle whose log is returned return the log for the given bundle since 3 0 public static i log get log bundle bundle return internal platform get default get log bundle ilog getlog internalplatform getdefault getlog returns the given bundle s resource bundle for the current locale p this resource bundle is typically stored as the plugin properties file in the plug in itself and contains any translatable strings used in the plug in manifest file plugin xml p p this mechanism is intended only for externalizing strings found in the plug in manifest file using this method for externalizing strings in your code may result in degraded memory performance p param bundle the bundle whose resource bundle is being queried return the resource bundle exception missing resource exception if the resource bundle was not found since 3 0 public static resource bundle get resource bundle bundle bundle throws missing resource exception return internal platform get default get resource bundle bundle missingresourceexception resourcebundle getresourcebundle missingresourceexception internalplatform getdefault getresourcebundle returns a resource string corresponding to the given argument value if the argument value specifies a resource key the string is looked up in the default resource bundle for the given runtime bundle if the argument does not specify a valid key the argument itself is returned as the resource string the key lookup is performed in the file referenced in the bundle localization header of the bundle manifest if a resource string corresponding to the key is not found in the resource bundle the key value or any default text following the key in the argument value is returned as the resource string a key is identified as a string beginning with the character note that the character is stripped off prior to lookup in the resource bundle p equivalent to code get resource string bundle value get resource bundle code p param bundle the bundle whose resource bundle is being queried param value the value to look for return the resource string see get resource bundle bundle since 3 0 public static string get resource string bundle bundle string value return internal platform get default get resource string bundle value getresourcestring getresourcebundle getresourcebundle getresourcestring internalplatform getdefault getresourcestring returns a resource string corresponding to the given argument value and resource bundle in the given runtime bundle if the argument value specifies a resource key the string is looked up in the given resource bundle if the argument does not specify a valid key the argument itself is returned as the resource string the key lookup is performed against the specified resource bundle if a resource string corresponding to the key is not found in the resource bundle the key value or any default text following the key in the argument value is returned as the resource string a key is identified as a string beginning with the character note that the character is stripped off prior to lookup in the resource bundle p for example assume resource bundle plugin properties contains name project name pre get resource string hello world returns hello world li get resource string name returns project name li get resource string name hello world returns project name li get resource string abcd hello world returns hello world li get resource string abcd returns abcd li get resource string name returns name li pre p param bundle the bundle whose resource bundle is being queried param value the value param resource bundle the resource bundle to query return the resource string see get resource bundle bundle since 3 0 public static string get resource string bundle bundle string value resource bundle resource bundle return internal platform get default get resource string bundle value resource bundle getresourcestring getresourcestring getresourcestring getresourcestring getresourcestring getresourcestring resourcebundle getresourcebundle getresourcestring resourcebundle resourcebundle internalplatform getdefault getresourcestring resourcebundle returns the string name of the current system architecture the value is a user defined string if the architecture is specified on the command line otherwise it is the value returned by code java lang system get property os arch code return the string name of the current system architecture since 3 0 public static string getos arch return internal platform get default getos arch getproperty getosarch internalplatform getdefault getosarch returns the string name of the current locale for use in finding files whose path starts with code nl code return the string name of the current locale since 3 0 public static string getnl return internal platform get default getnl internalplatform getdefault returns the string name of the current operating system for use in finding files whose path starts with code os code code os unknown code is returned if the operating system cannot be determined the value may indicate one of the operating systems known to the platform as specified in code knownos values code or a user defined string if the operating system name is specified on the command line return the string name of the current operating system since 3 0 public static string getos return internal platform get default getos os_unknown knownosvalues internalplatform getdefault returns the string name of the current window system for use in finding files whose path starts with code ws code code null code is returned if the window system cannot be determined return the string name of the current window system or code null code since 3 0 public static string getws return internal platform get default getws internalplatform getdefault returns the arguments not consumed by the framework implementation itself which arguments are consumed is implementation specific these arguments are available for use by the application return the array of command line arguments not consumed by the framework since 3 0 public static string get application args return internal platform get default get application args getapplicationargs internalplatform getdefault getapplicationargs returns the platform administrator for this running eclipse p note this is an internal method and em must not em be used by clients which are not part of the eclipse platform this method allows access to classes which are not eclipse platform api but are part of the os gi runtime that the eclipse platform is built on even as the eclipse platform evolves in compatible ways from release to release the details of the os gi implementation might not p return the platform admin for this instance of eclipse since 3 0 public static platform admin get platform admin return internal platform get default get platform admin osgi osgi platformadmin getplatformadmin internalplatform getdefault getplatformadmin returns the location of the platform s working directory also known as the instance data area code null code is returned if the platform is running without an instance location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi instance area p return the location of the platform s instance data area or code null code if none since 3 0 public static location get instance location return internal platform get default get instance location getinstancelocation internalplatform getdefault getinstancelocation returns the currently registered bundle group providers return the currently registered bundle group providers since 3 0 public static i bundle group provider get bundle group providers return internal platform get default get bundle group providers ibundlegroupprovider getbundlegroupproviders internalplatform getdefault getbundlegroupproviders return the interface into the preference mechanism the returned object can be used for such operations as searching for preference values across multiple scopes and preference import export return an object to interface into the preference mechanism since 3 0 public static i preferences service get preferences service return internal platform get default get preferences service ipreferencesservice getpreferencesservice internalplatform getdefault getpreferencesservice returns the product which was selected when running this eclipse instance or code null code if none return the current product or code null code if none since 3 0 public static i product get product return internal platform get default get product iproduct getproduct internalplatform getdefault getproduct registers the given bundle group provider with the platform param provider a provider to register since 3 0 public static void register bundle group provider i bundle group provider provider internal platform get default register bundle group provider provider registerbundlegroupprovider ibundlegroupprovider internalplatform getdefault registerbundlegroupprovider de registers the given bundle group provider with the platform param provider a provider to de register since 3 0 public static void unregister bundle group provider i bundle group provider provider internal platform get default unregister bundle group provider provider unregisterbundlegroupprovider ibundlegroupprovider internalplatform getdefault unregisterbundlegroupprovider returns the location of the configuration information used to run this instance of eclipse the configuration area typically contains the list of plug ins available for use various settings those shared across different instances of the same configuration and any other such data needed by plug ins code null code is returned if the platform is running without a configuration location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi configuration area p return the location of the platform s configuration data area or code null code if none since 3 0 public static location get configuration location return internal platform get default get configuration location getconfigurationlocation internalplatform getdefault getconfigurationlocation returns the location of the platform s user data area the user data area is a location on the system which is specific to the system s current user by default it is located relative to the location given by the system property user home code null code is returned if the platform is running without an user location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi user area p return the location of the platform s user data area or code null code if none since 3 0 public static location get user location return internal platform get default get user location getuserlocation internalplatform getdefault getuserlocation returns the location of the base installation for the running platform code null code is returned if the platform is running without a configuration location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi install area p return the location of the platform s installation area or code null code if none since 3 0 public static location get install location return internal platform get default get install location getinstalllocation internalplatform getdefault getinstalllocation checks if the specified bundle is a fragment bundle param bundle the bundle to query return true if the specified bundle is a fragment bundle otherwise false is returned since 3 0 public static boolean is fragment bundle bundle return internal platform get default is fragment bundle isfragment internalplatform getdefault isfragment returns an array of attached fragment bundles for the specified bundle if the specified bundle is a fragment then tt null tt is returned if no fragments are attached to the specified bundle then tt null tt is returned param bundle the bundle to get the attached fragment bundles for return an array of fragment bundles or tt null tt if the bundle does not have any attached fragment bundles since 3 0 public static bundle get fragments bundle bundle return internal platform get default get fragments bundle getfragments internalplatform getdefault getfragments returns the resolved bundle with the specified symbolic name that has the highest version if no resolved bundles are installed that have the specified symbolic name then null is returned param symbolic name the symbolic name of the bundle to be returned return the bundle that has the specified symbolic name with the highest version or tt null tt if no bundle is found since 3 0 public static bundle get bundle string symbolic name return internal platform get default get bundle symbolic name symbolicname getbundle symbolicname internalplatform getdefault getbundle symbolicname returns all bundles with the specified symbolic name if no resolved bundles with the specified symbolic name can be found tt null tt is returned if the version argument is not null then only the bundles that have the specified symbolic name and a version greater than or equal to the specified version are returned the returned bundles are ordered in descending bundle version order param symbolic name the symbolic name of the bundles that are to be returned param version the version that the return bundle versions must match or tt null tt if no version matching is to be done return the array of bundles with the specified name that match the specified version and match rule or tt null tt if no bundles are found public static bundle get bundles string symbolic name string version return internal platform get default get bundles symbolic name version symbolicname getbundles symbolicname internalplatform getdefault getbundles symbolicname returns an array of host bundles that the specified fragment bundle is attached to or tt null tt if the specified bundle is not attached to a host if the bundle is not a fragment bundle then tt null tt is returned param bundle the bundle to get the host bundles for return an array of host bundles or null if the bundle does not have any host bundles since 3 0 public static bundle get hosts bundle bundle return internal platform get default get hosts bundle gethosts internalplatform getdefault gethosts returns whether the platform is running return code true code if the platform is running and code false code otherwise since 3 0 public static boolean is running return internal platform get default is running isrunning internalplatform getdefault isrunning returns a list of known system architectures p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getos arch code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of system architectures known to the system see getos arch since 3 0 public static string knownos arch values return internal platform get default knownos arch values getosarch getosarch knownosarchvalues internalplatform getdefault knownosarchvalues returns a list of known operating system names p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getos code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of operating systems known to the system see getos since 3 0 public static string knownos values return internal platform get default knownos values knownosvalues internalplatform getdefault knownosvalues returns a map of known platform line separators the keys are translated names of platforms and the values are their associated line separator strings return a map of platform to their line separator string since 3 1 public static map known platform line separators map result new hash map result put line separator key mac os 9 line separator value cr result put line separator key unix line separator value lf result put line separator key windows line separator value crlf return result knownplatformlineseparators hashmap line_separator_key_mac_os_9 line_separator_value_cr line_separator_key_unix line_separator_value_lf line_separator_key_windows line_separator_value_crlf returns a list of known windowing system names p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getws code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of window systems known to the system see getws since 3 0 public static string knownws values return internal platform get default knownws values knownwsvalues internalplatform getdefault knownwsvalues returns code true code if the platform is currently running in debug mode the platform is typically put in debug mode using the debug command line argument return whether or not the platform is running in debug mode since 3 0 public static boolean in debug mode return system get property osgi debug null non nls 1 indebugmode getproperty returns code true code if the platform is currently running in development mode that is if special procedures are to be taken when defining plug in class paths the platform is typically put in development mode using the dev command line argument return whether or not the platform is running in development mode since 3 0 public static boolean in development mode return system get property osgi dev null non nls 1 indevelopmentmode getproperty private constructor to block instance creation private platform super adds the given authorization information to the key ring the information is relevant for the specified protection space and the given authorization scheme the protection space is defined by the combination of the given server url and realm the authorization scheme determines what the authorization information contains and how it should be used the authorization information is a code map code of code string code to code string code and typically contains information such as user names and passwords param server url the url identifying the server for this authorization information for example http www example com param realm the subsection of the given server to which this authorization information applies for example realm1 example com or for no realm param auth scheme the scheme for which this authorization information applies for example basic or for no authorization scheme param info a code map code containing authorization information such as user names and passwords key type code string code value type code string code exception core exception if there are problems setting the authorization information reasons include ul li the keyring could not be saved li ul public static void add authorization info url server url string realm string auth scheme map info throws core exception internal platform get default add authorization info server url realm auth scheme info serverurl authscheme coreexception addauthorizationinfo serverurl authscheme coreexception internalplatform getdefault addauthorizationinfo serverurl authscheme adds the given log listener to the notification list of the platform p once registered a listener starts receiving notification as entries are added to plug in logs via code i log log code the listener continues to receive notifications until it is replaced or removed p param listener the listener to register see i log add log listener i log listener see remove log listener i log listener public static void add log listener i log listener listener internal platform get default add log listener listener ilog ilog addloglistener iloglistener removeloglistener iloglistener addloglistener iloglistener internalplatform getdefault addloglistener adds the specified resource to the protection space specified by the given realm all targets at or deeper than the depth of the last symbolic element in the path of the given resource url are assumed to be in the same protection space param resource url the url identifying the resources to be added to the specified protection space for example http www example com folder param realm the name of the protection space for example realm1 example com exception core exception if there are problems setting the authorization information reasons include ul li the key ring could not be saved li ul public static void add protection space url resource url string realm throws core exception internal platform get default add protection space resource url realm resourceurl coreexception addprotectionspace resourceurl coreexception internalplatform getdefault addprotectionspace resourceurl returns a url that is the local equivalent of the supplied url this method is expected to be used with the plug in relative ur ls returned by i plugin descriptor bundle get entry and platform find if the specified url is not a plug in relative url it is returned as is if the specified url is a plug in relative url of a file including jar archive it is returned as a locally accessible url using file protocol extracting caching the file locally if required if the specified url is a plug in relative url of a directory the directory and any files and directories under it are made locally accessible likewise if param url original plug in relative url return the resolved url exception io exception if unable to resolve url see resolve url see find bundle i path see bundle get entry string public static url as localurl url url throws io exception return internal platform get default as localurl url urls iplugindescriptor getentry ioexception ipath getentry aslocalurl ioexception internalplatform getdefault aslocalurl takes down the splash screen if one was put up public static void end splash internal platform get default end splash endsplash internalplatform getdefault endsplash removes the authorization information for the specified protection space and given authorization scheme the protection space is defined by the given server url and realm param server url the url identifying the server to remove the authorization information for for example http www example com param realm the subsection of the given server to remove the authorization information for for example realm1 example com or for no realm param auth scheme the scheme for which the authorization information to remove applies for example basic or for no authorization scheme exception core exception if there are problems removing the authorization information reasons include ul li the keyring could not be saved li ul public static void flush authorization info url server url string realm string auth scheme throws core exception internal platform get default flush authorization info server url realm auth scheme serverurl authscheme coreexception flushauthorizationinfo serverurl authscheme coreexception internalplatform getdefault flushauthorizationinfo serverurl authscheme returns the adapter manager used for extending code i adaptable code objects return the adapter manager for this platform see i adapter manager public static i adapter manager get adapter manager return internal platform get default get adapter manager iadaptable iadaptermanager iadaptermanager getadaptermanager internalplatform getdefault getadaptermanager returns the authorization information for the specified protection space and given authorization scheme the protection space is defined by the given server url and realm returns code null code if no such information exists param server url the url identifying the server for the authorization information for example http www example com param realm the subsection of the given server to which the authorization information applies for example realm1 example com or for no realm param auth scheme the scheme for which the authorization information applies for example basic or for no authorization scheme return the authorization information for the specified protection space and given authorization scheme or code null code if no such information exists public static map get authorization info url server url string realm string auth scheme return internal platform get default get authorization info server url realm auth scheme serverurl authscheme getauthorizationinfo serverurl authscheme internalplatform getdefault getauthorizationinfo serverurl authscheme returns the command line args provided to the eclipse runtime layer when it was first run the returned value does not include arguments consumed by the lower levels of eclipse e g os gi or the launcher note that individual platform runnables may be provided with different arguments if they are being run individually rather than with code platform run code return the command line used to start the platform public static string get command line args return internal platform get default get command line args osgi getcommandlineargs internalplatform getdefault getcommandlineargs returns the content type manager return the content type manager since 3 0 public static i content type manager get content type manager return internal platform get default get content type manager icontenttypemanager getcontenttypemanager internalplatform getdefault getcontenttypemanager returns the identified option code null code is returned if no such option is found options are specified in the general form i lt plug in id gt lt option path gt i for example code org eclipse core runtime debug code param option the name of the option to lookup return the value of the requested debug option or code null code public static string get debug option string option return internal platform get default get option option getdebugoption internalplatform getdefault getoption returns the location of the platform working directory p callers of this method should consider using code get instance location code instead in various typically non ide related configurations of eclipse the platform working directory may not be on the local file system as such the more general form of this location is as a url p return the location of the platform see get instance location public static i path get location throws illegal state exception return internal platform get default get location getinstancelocation getinstancelocation ipath getlocation illegalstateexception internalplatform getdefault getlocation returns the location of the platform log file this file may contain information about errors that have previously occurred during this invocation of the platform p it is recommended not to keep this value as the log location may vary when an instance location is being set p p note it is very important that users of this method do not leave the log file open for extended periods of time doing so may prevent others from writing to the log file which could result in important error messages being lost it is strongly recommended that clients wanting to read the log file for extended periods should copy the log file contents elsewhere and immediately close the original file p return the path of the log file on disk public static i path get log file location return internal platform get default get meta area get log location ipath getlogfilelocation internalplatform getdefault getmetaarea getloglocation returns the plug in runtime object for the identified plug in or code null code if no such plug in can be found if the plug in is defined but not yet activated the plug in will be activated before being returned p b note b this method is only able to find and return plug in objects for plug ins described using plugin xml according to the traditional eclipse conventions eclipse 3 0 permits plug ins to be described in manifest mf files and to define their own bundle activators such plug ins cannot be discovered by this method p param id the unique identifier of the desired plug in e g code com example acme code return the plug in runtime object or code null code deprecated this method only works if the compatibility layer is installed and must not be used otherwise see the comments on link i plugin descriptor get plugin for details public static plugin get plugin string id try i plugin registry registry get plugin registry if registry null throw new illegal state exception i plugin descriptor pd registry get plugin descriptor id if pd null return null return pd get plugin catch core exception e todo log the exception return null iplugindescriptor getplugin getplugin ipluginregistry getpluginregistry illegalstateexception iplugindescriptor getplugindescriptor getplugin coreexception returns the plug in registry for this platform return the plug in registry see i plugin registry deprecated code i plugin registry code was refactored in eclipse 3 0 this method only works if the compatibility layer is installed and must not be used otherwise see the comments on link i plugin registry and its methods for details public static i plugin registry get plugin registry bundle compatibility internal platform get default get bundle compatibility helper pi runtime compatibility if compatibility null throw new illegal state exception class old internal platform null try old internal platform compatibility load class org eclipse core internal plugins internal platform non nls 1 method get plugin registry old internal platform get method get plugin registry null non nls 1 return i plugin registry get plugin registry invoke old internal platform null catch exception e ignore the exceptions return null return null ipluginregistry ipluginregistry ipluginregistry ipluginregistry getpluginregistry internalplatform getdefault getbundle compatibilityhelper pi_runtime_compatibility illegalstateexception oldinternalplatform oldinternalplatform loadclass internalplatform getpluginregistry oldinternalplatform getmethod getpluginregistry ipluginregistry getpluginregistry oldinternalplatform returns the location in the local file system of the plug in state area for the given plug in the platform must be running p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings p param plugin the plug in whose state location is returned return a local file system path public static i path get plugin state location plugin plugin return plugin get state location ipath getpluginstatelocation getstatelocation returns the protection space realm for the specified resource or code null code if the realm is unknown param resource url the url of the resource whose protection space is returned for example http www example com folder return the protection space realm for the specified resource or code null code if the realm is unknown public static string get protection space url resource url return internal platform get default get protection space resource url resourceurl getprotectionspace resourceurl internalplatform getdefault getprotectionspace resourceurl removes the indicated identical log listener from the notification list of the platform if no such listener exists no action is taken param listener the listener to de register see i log remove log listener i log listener see add log listener i log listener public static void remove log listener i log listener listener internal platform get default remove log listener listener ilog removeloglistener iloglistener addloglistener iloglistener removeloglistener iloglistener internalplatform getdefault removeloglistener returns a url which is the resolved equivalent of the supplied url this method is expected to be used with the plug in relative ur ls returned by i plugin descriptor bundle get entry and platform find p if the specified url is not a plug in relative url it is returned as is if the specified url is a plug in relative url this method attempts to reduce the given url to one which is native to the java class library eg file http etc p p note however that users of this api should not assume too much about the results of this method while it may consistently return a file url in certain installation configurations others may result in jar or http ur ls p param url original plug in relative url return the resolved url exception io exception if unable to resolve url see as localurl url see find bundle i path see bundle get entry string public static url resolve url url throws io exception return internal platform get default resolve url urls iplugindescriptor getentry urls ioexception aslocalurl ipath getentry ioexception internalplatform getdefault runs the given runnable in a protected mode exceptions thrown in the runnable are logged and passed to the runnable s exception handler such exceptions are not rethrown by this method param runnable the runnable to run public static void run i safe runnable runnable internal platform get default run runnable isaferunnable internalplatform getdefault returns the platform job manager return the platform s job manager since 3 0 public static i job manager get job manager return internal platform get default get job manager ijobmanager getjobmanager internalplatform getdefault getjobmanager returns the extension registry for this platform return the extension registry see i extension registry since 3 0 public static i extension registry get extension registry return internal platform get default get registry iextensionregistry iextensionregistry getextensionregistry internalplatform getdefault getregistry returns a url for the given path in the given bundle returns code null code if the url could not be computed or created param bundle the bundle in which to search param path path relative to plug in installation location return a url for the given path or code null code the actual form of the returned url is not specified see find bundle i path map see resolve url see as localurl url since 3 0 public static url find bundle bundle i path path return find support find bundle path null ipath aslocalurl ipath findsupport returns a url for the given path in the given bundle returns code null code if the url could not be computed or created p find looks for this path in given bundle and any attached fragments code null code is returned if no such entry is found note that there is no specific order to the fragments p p the following arguments may also be used pre nl for language specific information os for operating system specific information ws for windowing system specific information pre p p a path of nl about properties in an environment with a default locale of en ca will return a url corresponding to the first place about properties is found according to the following order pre plugin root nl en ca about properties fragment1 root nl en ca about properties fragment2 root nl en ca about properties plugin root nl en about properties fragment1 root nl en about properties fragment2 root nl en about properties plugin root about properties fragment1 root about properties fragment2 root about properties pre p p the current environment variable values can be overridden using the override map argument p param bundle the bundle in which to search param path file path relative to plug in installation location param override map of override substitution arguments to be used for any arg path elements the map keys correspond to the substitution arguments eg nl or os the resulting values must be of type java lang string if the map is code null code or does not contain the required substitution argument the default is used return a url for the given path or code null code the actual form of the returned url is not specified see resolve url see as localurl url since 3 0 public static url find bundle bundle i path path map override return find support find bundle path override en_ca aslocalurl ipath findsupport returns the location in the local file system of the plug in state area for the given bundle if the plug in state area did not exist prior to this call it is created p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings and other configuration parameters p param bundle the bundle whose state location if returned return a local file system path since 3 0 public static i path get state location bundle bundle return internal platform get default get state location bundle ipath getstatelocation internalplatform getdefault getstatelocation returns a number that changes whenever the set of installed plug ins changes this can be used for invalidating caches that are based on the set of currently installed plug ins e g extensions return a number related to the set of installed plug ins since 3 1 public static long get state stamp return internal platform get default get state time stamp getstatestamp internalplatform getdefault getstatetimestamp returns the log for the given bundle if no such log exists one is created param bundle the bundle whose log is returned return the log for the given bundle since 3 0 public static i log get log bundle bundle return internal platform get default get log bundle ilog getlog internalplatform getdefault getlog returns the given bundle s resource bundle for the current locale p this resource bundle is typically stored as the plugin properties file in the plug in itself and contains any translatable strings used in the plug in manifest file plugin xml p p this mechanism is intended only for externalizing strings found in the plug in manifest file using this method for externalizing strings in your code may result in degraded memory performance p param bundle the bundle whose resource bundle is being queried return the resource bundle exception missing resource exception if the resource bundle was not found since 3 0 public static resource bundle get resource bundle bundle bundle throws missing resource exception return internal platform get default get resource bundle bundle missingresourceexception resourcebundle getresourcebundle missingresourceexception internalplatform getdefault getresourcebundle returns a resource string corresponding to the given argument value if the argument value specifies a resource key the string is looked up in the default resource bundle for the given runtime bundle if the argument does not specify a valid key the argument itself is returned as the resource string the key lookup is performed in the file referenced in the bundle localization header of the bundle manifest if a resource string corresponding to the key is not found in the resource bundle the key value or any default text following the key in the argument value is returned as the resource string a key is identified as a string beginning with the character note that the character is stripped off prior to lookup in the resource bundle p equivalent to code get resource string bundle value get resource bundle code p param bundle the bundle whose resource bundle is being queried param value the value to look for return the resource string see get resource bundle bundle since 3 0 public static string get resource string bundle bundle string value return internal platform get default get resource string bundle value getresourcestring getresourcebundle getresourcebundle getresourcestring internalplatform getdefault getresourcestring returns a resource string corresponding to the given argument value and resource bundle in the given runtime bundle if the argument value specifies a resource key the string is looked up in the given resource bundle if the argument does not specify a valid key the argument itself is returned as the resource string the key lookup is performed against the specified resource bundle if a resource string corresponding to the key is not found in the resource bundle the key value or any default text following the key in the argument value is returned as the resource string a key is identified as a string beginning with the character note that the character is stripped off prior to lookup in the resource bundle p for example assume resource bundle plugin properties contains name project name pre get resource string hello world returns hello world li get resource string name returns project name li get resource string name hello world returns project name li get resource string abcd hello world returns hello world li get resource string abcd returns abcd li get resource string name returns name li pre p param bundle the bundle whose resource bundle is being queried param value the value param resource bundle the resource bundle to query return the resource string see get resource bundle bundle since 3 0 public static string get resource string bundle bundle string value resource bundle resource bundle return internal platform get default get resource string bundle value resource bundle getresourcestring getresourcestring getresourcestring getresourcestring getresourcestring getresourcestring resourcebundle getresourcebundle getresourcestring resourcebundle resourcebundle internalplatform getdefault getresourcestring resourcebundle returns the string name of the current system architecture the value is a user defined string if the architecture is specified on the command line otherwise it is the value returned by code java lang system get property os arch code return the string name of the current system architecture since 3 0 public static string getos arch return internal platform get default getos arch getproperty getosarch internalplatform getdefault getosarch returns the string name of the current locale for use in finding files whose path starts with code nl code return the string name of the current locale since 3 0 public static string getnl return internal platform get default getnl internalplatform getdefault returns the string name of the current operating system for use in finding files whose path starts with code os code code os unknown code is returned if the operating system cannot be determined the value may indicate one of the operating systems known to the platform as specified in code knownos values code or a user defined string if the operating system name is specified on the command line return the string name of the current operating system since 3 0 public static string getos return internal platform get default getos os_unknown knownosvalues internalplatform getdefault returns the string name of the current window system for use in finding files whose path starts with code ws code code null code is returned if the window system cannot be determined return the string name of the current window system or code null code since 3 0 public static string getws return internal platform get default getws internalplatform getdefault returns the arguments not consumed by the framework implementation itself which arguments are consumed is implementation specific these arguments are available for use by the application return the array of command line arguments not consumed by the framework since 3 0 public static string get application args return internal platform get default get application args getapplicationargs internalplatform getdefault getapplicationargs returns the platform administrator for this running eclipse p note this is an internal method and em must not em be used by clients which are not part of the eclipse platform this method allows access to classes which are not eclipse platform api but are part of the os gi runtime that the eclipse platform is built on even as the eclipse platform evolves in compatible ways from release to release the details of the os gi implementation might not p return the platform admin for this instance of eclipse since 3 0 public static platform admin get platform admin return internal platform get default get platform admin osgi osgi platformadmin getplatformadmin internalplatform getdefault getplatformadmin returns the location of the platform s working directory also known as the instance data area code null code is returned if the platform is running without an instance location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi instance area p return the location of the platform s instance data area or code null code if none since 3 0 public static location get instance location return internal platform get default get instance location getinstancelocation internalplatform getdefault getinstancelocation returns the currently registered bundle group providers return the currently registered bundle group providers since 3 0 public static i bundle group provider get bundle group providers return internal platform get default get bundle group providers ibundlegroupprovider getbundlegroupproviders internalplatform getdefault getbundlegroupproviders return the interface into the preference mechanism the returned object can be used for such operations as searching for preference values across multiple scopes and preference import export return an object to interface into the preference mechanism since 3 0 public static i preferences service get preferences service return internal platform get default get preferences service ipreferencesservice getpreferencesservice internalplatform getdefault getpreferencesservice returns the product which was selected when running this eclipse instance or code null code if none return the current product or code null code if none since 3 0 public static i product get product return internal platform get default get product iproduct getproduct internalplatform getdefault getproduct registers the given bundle group provider with the platform param provider a provider to register since 3 0 public static void register bundle group provider i bundle group provider provider internal platform get default register bundle group provider provider registerbundlegroupprovider ibundlegroupprovider internalplatform getdefault registerbundlegroupprovider de registers the given bundle group provider with the platform param provider a provider to de register since 3 0 public static void unregister bundle group provider i bundle group provider provider internal platform get default unregister bundle group provider provider unregisterbundlegroupprovider ibundlegroupprovider internalplatform getdefault unregisterbundlegroupprovider returns the location of the configuration information used to run this instance of eclipse the configuration area typically contains the list of plug ins available for use various settings those shared across different instances of the same configuration and any other such data needed by plug ins code null code is returned if the platform is running without a configuration location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi configuration area p return the location of the platform s configuration data area or code null code if none since 3 0 public static location get configuration location return internal platform get default get configuration location getconfigurationlocation internalplatform getdefault getconfigurationlocation returns the location of the platform s user data area the user data area is a location on the system which is specific to the system s current user by default it is located relative to the location given by the system property user home code null code is returned if the platform is running without an user location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi user area p return the location of the platform s user data area or code null code if none since 3 0 public static location get user location return internal platform get default get user location getuserlocation internalplatform getdefault getuserlocation returns the location of the base installation for the running platform code null code is returned if the platform is running without a configuration location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi install area p return the location of the platform s installation area or code null code if none since 3 0 public static location get install location return internal platform get default get install location getinstalllocation internalplatform getdefault getinstalllocation checks if the specified bundle is a fragment bundle param bundle the bundle to query return true if the specified bundle is a fragment bundle otherwise false is returned since 3 0 public static boolean is fragment bundle bundle return internal platform get default is fragment bundle isfragment internalplatform getdefault isfragment returns an array of attached fragment bundles for the specified bundle if the specified bundle is a fragment then tt null tt is returned if no fragments are attached to the specified bundle then tt null tt is returned param bundle the bundle to get the attached fragment bundles for return an array of fragment bundles or tt null tt if the bundle does not have any attached fragment bundles since 3 0 public static bundle get fragments bundle bundle return internal platform get default get fragments bundle getfragments internalplatform getdefault getfragments returns the resolved bundle with the specified symbolic name that has the highest version if no resolved bundles are installed that have the specified symbolic name then null is returned param symbolic name the symbolic name of the bundle to be returned return the bundle that has the specified symbolic name with the highest version or tt null tt if no bundle is found since 3 0 public static bundle get bundle string symbolic name return internal platform get default get bundle symbolic name symbolicname getbundle symbolicname internalplatform getdefault getbundle symbolicname returns all bundles with the specified symbolic name if no resolved bundles with the specified symbolic name can be found tt null tt is returned if the version argument is not null then only the bundles that have the specified symbolic name and a version greater than or equal to the specified version are returned the returned bundles are ordered in descending bundle version order param symbolic name the symbolic name of the bundles that are to be returned param version the version that the return bundle versions must match or tt null tt if no version matching is to be done return the array of bundles with the specified name that match the specified version and match rule or tt null tt if no bundles are found public static bundle get bundles string symbolic name string version return internal platform get default get bundles symbolic name version symbolicname getbundles symbolicname internalplatform getdefault getbundles symbolicname returns an array of host bundles that the specified fragment bundle is attached to or tt null tt if the specified bundle is not attached to a host if the bundle is not a fragment bundle then tt null tt is returned param bundle the bundle to get the host bundles for return an array of host bundles or null if the bundle does not have any host bundles since 3 0 public static bundle get hosts bundle bundle return internal platform get default get hosts bundle gethosts internalplatform getdefault gethosts returns whether the platform is running return code true code if the platform is running and code false code otherwise since 3 0 public static boolean is running return internal platform get default is running isrunning internalplatform getdefault isrunning returns a list of known system architectures p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getos arch code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of system architectures known to the system see getos arch since 3 0 public static string knownos arch values return internal platform get default knownos arch values getosarch getosarch knownosarchvalues internalplatform getdefault knownosarchvalues returns a list of known operating system names p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getos code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of operating systems known to the system see getos since 3 0 public static string knownos values return internal platform get default knownos values knownosvalues internalplatform getdefault knownosvalues returns a map of known platform line separators the keys are translated names of platforms and the values are their associated line separator strings return a map of platform to their line separator string since 3 1 public static map known platform line separators map result new hash map result put line separator key mac os 9 line separator value cr result put line separator key unix line separator value lf result put line separator key windows line separator value crlf return result knownplatformlineseparators hashmap line_separator_key_mac_os_9 line_separator_value_cr line_separator_key_unix line_separator_value_lf line_separator_key_windows line_separator_value_crlf returns a list of known windowing system names p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getws code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of window systems known to the system see getws since 3 0 public static string knownws values return internal platform get default knownws values knownwsvalues internalplatform getdefault knownwsvalues returns code true code if the platform is currently running in debug mode the platform is typically put in debug mode using the debug command line argument return whether or not the platform is running in debug mode since 3 0 public static boolean in debug mode return system get property osgi debug null non nls 1 indebugmode getproperty returns code true code if the platform is currently running in development mode that is if special procedures are to be taken when defining plug in class paths the platform is typically put in development mode using the dev command line argument return whether or not the platform is running in development mode since 3 0 public static boolean in development mode return system get property osgi dev null non nls 1 indevelopmentmode getproperty private constructor to block instance creation private platform super adds the given authorization information to the key ring the information is relevant for the specified protection space and the given authorization scheme the protection space is defined by the combination of the given server url and realm the authorization scheme determines what the authorization information contains and how it should be used the authorization information is a code map code of code string code to code string code and typically contains information such as user names and passwords param server url the url identifying the server for this authorization information for example http www example com param realm the subsection of the given server to which this authorization information applies for example realm1 example com or for no realm param auth scheme the scheme for which this authorization information applies for example basic or for no authorization scheme param info a code map code containing authorization information such as user names and passwords key type code string code value type code string code exception core exception if there are problems setting the authorization information reasons include ul li the keyring could not be saved li ul public static void add authorization info url server url string realm string auth scheme map info throws core exception internal platform get default add authorization info server url realm auth scheme info serverurl authscheme coreexception addauthorizationinfo serverurl authscheme coreexception internalplatform getdefault addauthorizationinfo serverurl authscheme adds the given log listener to the notification list of the platform p once registered a listener starts receiving notification as entries are added to plug in logs via code i log log code the listener continues to receive notifications until it is replaced or removed p param listener the listener to register see i log add log listener i log listener see remove log listener i log listener public static void add log listener i log listener listener internal platform get default add log listener listener ilog ilog addloglistener iloglistener removeloglistener iloglistener addloglistener iloglistener internalplatform getdefault addloglistener adds the specified resource to the protection space specified by the given realm all targets at or deeper than the depth of the last symbolic element in the path of the given resource url are assumed to be in the same protection space param resource url the url identifying the resources to be added to the specified protection space for example http www example com folder param realm the name of the protection space for example realm1 example com exception core exception if there are problems setting the authorization information reasons include ul li the key ring could not be saved li ul public static void add protection space url resource url string realm throws core exception internal platform get default add protection space resource url realm resourceurl coreexception addprotectionspace resourceurl coreexception internalplatform getdefault addprotectionspace resourceurl returns a url that is the local equivalent of the supplied url this method is expected to be used with the plug in relative ur ls returned by i plugin descriptor bundle get entry and platform find if the specified url is not a plug in relative url it is returned as is if the specified url is a plug in relative url of a file including jar archive it is returned as a locally accessible url using file protocol extracting caching the file locally if required if the specified url is a plug in relative url of a directory the directory and any files and directories under it are made locally accessible likewise if param url original plug in relative url return the resolved url exception io exception if unable to resolve url see resolve url see find bundle i path see bundle get entry string public static url as localurl url url throws io exception return internal platform get default as localurl url urls iplugindescriptor getentry ioexception ipath getentry aslocalurl ioexception internalplatform getdefault aslocalurl takes down the splash screen if one was put up public static void end splash internal platform get default end splash endsplash internalplatform getdefault endsplash removes the authorization information for the specified protection space and given authorization scheme the protection space is defined by the given server url and realm param server url the url identifying the server to remove the authorization information for for example http www example com param realm the subsection of the given server to remove the authorization information for for example realm1 example com or for no realm param auth scheme the scheme for which the authorization information to remove applies for example basic or for no authorization scheme exception core exception if there are problems removing the authorization information reasons include ul li the keyring could not be saved li ul public static void flush authorization info url server url string realm string auth scheme throws core exception internal platform get default flush authorization info server url realm auth scheme serverurl authscheme coreexception flushauthorizationinfo serverurl authscheme coreexception internalplatform getdefault flushauthorizationinfo serverurl authscheme returns the adapter manager used for extending code i adaptable code objects return the adapter manager for this platform see i adapter manager public static i adapter manager get adapter manager return internal platform get default get adapter manager iadaptable iadaptermanager iadaptermanager getadaptermanager internalplatform getdefault getadaptermanager returns the authorization information for the specified protection space and given authorization scheme the protection space is defined by the given server url and realm returns code null code if no such information exists param server url the url identifying the server for the authorization information for example http www example com param realm the subsection of the given server to which the authorization information applies for example realm1 example com or for no realm param auth scheme the scheme for which the authorization information applies for example basic or for no authorization scheme return the authorization information for the specified protection space and given authorization scheme or code null code if no such information exists public static map get authorization info url server url string realm string auth scheme return internal platform get default get authorization info server url realm auth scheme serverurl authscheme getauthorizationinfo serverurl authscheme internalplatform getdefault getauthorizationinfo serverurl authscheme returns the command line args provided to the eclipse runtime layer when it was first run the returned value does not include arguments consumed by the lower levels of eclipse e g os gi or the launcher note that individual platform runnables may be provided with different arguments if they are being run individually rather than with code platform run code return the command line used to start the platform public static string get command line args return internal platform get default get command line args osgi getcommandlineargs internalplatform getdefault getcommandlineargs returns the content type manager return the content type manager since 3 0 public static i content type manager get content type manager return internal platform get default get content type manager icontenttypemanager getcontenttypemanager internalplatform getdefault getcontenttypemanager returns the identified option code null code is returned if no such option is found options are specified in the general form i lt plug in id gt lt option path gt i for example code org eclipse core runtime debug code param option the name of the option to lookup return the value of the requested debug option or code null code public static string get debug option string option return internal platform get default get option option getdebugoption internalplatform getdefault getoption returns the location of the platform working directory p callers of this method should consider using code get instance location code instead in various typically non ide related configurations of eclipse the platform working directory may not be on the local file system as such the more general form of this location is as a url p return the location of the platform see get instance location public static i path get location throws illegal state exception return internal platform get default get location getinstancelocation getinstancelocation ipath getlocation illegalstateexception internalplatform getdefault getlocation returns the location of the platform log file this file may contain information about errors that have previously occurred during this invocation of the platform p it is recommended not to keep this value as the log location may vary when an instance location is being set p p note it is very important that users of this method do not leave the log file open for extended periods of time doing so may prevent others from writing to the log file which could result in important error messages being lost it is strongly recommended that clients wanting to read the log file for extended periods should copy the log file contents elsewhere and immediately close the original file p return the path of the log file on disk public static i path get log file location return internal platform get default get meta area get log location ipath getlogfilelocation internalplatform getdefault getmetaarea getloglocation returns the plug in runtime object for the identified plug in or code null code if no such plug in can be found if the plug in is defined but not yet activated the plug in will be activated before being returned p b note b this method is only able to find and return plug in objects for plug ins described using plugin xml according to the traditional eclipse conventions eclipse 3 0 permits plug ins to be described in manifest mf files and to define their own bundle activators such plug ins cannot be discovered by this method p param id the unique identifier of the desired plug in e g code com example acme code return the plug in runtime object or code null code deprecated this method only works if the compatibility layer is installed and must not be used otherwise see the comments on link i plugin descriptor get plugin for details public static plugin get plugin string id try i plugin registry registry get plugin registry if registry null throw new illegal state exception i plugin descriptor pd registry get plugin descriptor id if pd null return null return pd get plugin catch core exception e todo log the exception return null iplugindescriptor getplugin getplugin ipluginregistry getpluginregistry illegalstateexception iplugindescriptor getplugindescriptor getplugin coreexception returns the plug in registry for this platform return the plug in registry see i plugin registry deprecated code i plugin registry code was refactored in eclipse 3 0 this method only works if the compatibility layer is installed and must not be used otherwise see the comments on link i plugin registry and its methods for details public static i plugin registry get plugin registry bundle compatibility internal platform get default get bundle compatibility helper pi runtime compatibility if compatibility null throw new illegal state exception class old internal platform null try old internal platform compatibility load class org eclipse core internal plugins internal platform non nls 1 method get plugin registry old internal platform get method get plugin registry null non nls 1 return i plugin registry get plugin registry invoke old internal platform null catch exception e ignore the exceptions return null return null ipluginregistry ipluginregistry ipluginregistry ipluginregistry getpluginregistry internalplatform getdefault getbundle compatibilityhelper pi_runtime_compatibility illegalstateexception oldinternalplatform oldinternalplatform loadclass internalplatform getpluginregistry oldinternalplatform getmethod getpluginregistry ipluginregistry getpluginregistry oldinternalplatform returns the location in the local file system of the plug in state area for the given plug in the platform must be running p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings p param plugin the plug in whose state location is returned return a local file system path public static i path get plugin state location plugin plugin return plugin get state location ipath getpluginstatelocation getstatelocation returns the protection space realm for the specified resource or code null code if the realm is unknown param resource url the url of the resource whose protection space is returned for example http www example com folder return the protection space realm for the specified resource or code null code if the realm is unknown public static string get protection space url resource url return internal platform get default get protection space resource url resourceurl getprotectionspace resourceurl internalplatform getdefault getprotectionspace resourceurl removes the indicated identical log listener from the notification list of the platform if no such listener exists no action is taken param listener the listener to de register see i log remove log listener i log listener see add log listener i log listener public static void remove log listener i log listener listener internal platform get default remove log listener listener ilog removeloglistener iloglistener addloglistener iloglistener removeloglistener iloglistener internalplatform getdefault removeloglistener returns a url which is the resolved equivalent of the supplied url this method is expected to be used with the plug in relative ur ls returned by i plugin descriptor bundle get entry and platform find p if the specified url is not a plug in relative url it is returned as is if the specified url is a plug in relative url this method attempts to reduce the given url to one which is native to the java class library eg file http etc p p note however that users of this api should not assume too much about the results of this method while it may consistently return a file url in certain installation configurations others may result in jar or http ur ls p param url original plug in relative url return the resolved url exception io exception if unable to resolve url see as localurl url see find bundle i path see bundle get entry string public static url resolve url url throws io exception return internal platform get default resolve url urls iplugindescriptor getentry urls ioexception aslocalurl ipath getentry ioexception internalplatform getdefault runs the given runnable in a protected mode exceptions thrown in the runnable are logged and passed to the runnable s exception handler such exceptions are not rethrown by this method param runnable the runnable to run public static void run i safe runnable runnable internal platform get default run runnable isaferunnable internalplatform getdefault returns the platform job manager return the platform s job manager since 3 0 public static i job manager get job manager return internal platform get default get job manager ijobmanager getjobmanager internalplatform getdefault getjobmanager returns the extension registry for this platform return the extension registry see i extension registry since 3 0 public static i extension registry get extension registry return internal platform get default get registry iextensionregistry iextensionregistry getextensionregistry internalplatform getdefault getregistry returns a url for the given path in the given bundle returns code null code if the url could not be computed or created param bundle the bundle in which to search param path path relative to plug in installation location return a url for the given path or code null code the actual form of the returned url is not specified see find bundle i path map see resolve url see as localurl url since 3 0 public static url find bundle bundle i path path return find support find bundle path null ipath aslocalurl ipath findsupport returns a url for the given path in the given bundle returns code null code if the url could not be computed or created p find looks for this path in given bundle and any attached fragments code null code is returned if no such entry is found note that there is no specific order to the fragments p p the following arguments may also be used pre nl for language specific information os for operating system specific information ws for windowing system specific information pre p p a path of nl about properties in an environment with a default locale of en ca will return a url corresponding to the first place about properties is found according to the following order pre plugin root nl en ca about properties fragment1 root nl en ca about properties fragment2 root nl en ca about properties plugin root nl en about properties fragment1 root nl en about properties fragment2 root nl en about properties plugin root about properties fragment1 root about properties fragment2 root about properties pre p p the current environment variable values can be overridden using the override map argument p param bundle the bundle in which to search param path file path relative to plug in installation location param override map of override substitution arguments to be used for any arg path elements the map keys correspond to the substitution arguments eg nl or os the resulting values must be of type java lang string if the map is code null code or does not contain the required substitution argument the default is used return a url for the given path or code null code the actual form of the returned url is not specified see resolve url see as localurl url since 3 0 public static url find bundle bundle i path path map override return find support find bundle path override en_ca aslocalurl ipath findsupport returns the location in the local file system of the plug in state area for the given bundle if the plug in state area did not exist prior to this call it is created p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings and other configuration parameters p param bundle the bundle whose state location if returned return a local file system path since 3 0 public static i path get state location bundle bundle return internal platform get default get state location bundle ipath getstatelocation internalplatform getdefault getstatelocation returns a number that changes whenever the set of installed plug ins changes this can be used for invalidating caches that are based on the set of currently installed plug ins e g extensions return a number related to the set of installed plug ins since 3 1 public static long get state stamp return internal platform get default get state time stamp getstatestamp internalplatform getdefault getstatetimestamp returns the log for the given bundle if no such log exists one is created param bundle the bundle whose log is returned return the log for the given bundle since 3 0 public static i log get log bundle bundle return internal platform get default get log bundle ilog getlog internalplatform getdefault getlog returns the given bundle s resource bundle for the current locale p this resource bundle is typically stored as the plugin properties file in the plug in itself and contains any translatable strings used in the plug in manifest file plugin xml p p this mechanism is intended only for externalizing strings found in the plug in manifest file using this method for externalizing strings in your code may result in degraded memory performance p param bundle the bundle whose resource bundle is being queried return the resource bundle exception missing resource exception if the resource bundle was not found since 3 0 public static resource bundle get resource bundle bundle bundle throws missing resource exception return internal platform get default get resource bundle bundle missingresourceexception resourcebundle getresourcebundle missingresourceexception internalplatform getdefault getresourcebundle returns a resource string corresponding to the given argument value if the argument value specifies a resource key the string is looked up in the default resource bundle for the given runtime bundle if the argument does not specify a valid key the argument itself is returned as the resource string the key lookup is performed in the file referenced in the bundle localization header of the bundle manifest if a resource string corresponding to the key is not found in the resource bundle the key value or any default text following the key in the argument value is returned as the resource string a key is identified as a string beginning with the character note that the character is stripped off prior to lookup in the resource bundle p equivalent to code get resource string bundle value get resource bundle code p param bundle the bundle whose resource bundle is being queried param value the value to look for return the resource string see get resource bundle bundle since 3 0 public static string get resource string bundle bundle string value return internal platform get default get resource string bundle value getresourcestring getresourcebundle getresourcebundle getresourcestring internalplatform getdefault getresourcestring returns a resource string corresponding to the given argument value and resource bundle in the given runtime bundle if the argument value specifies a resource key the string is looked up in the given resource bundle if the argument does not specify a valid key the argument itself is returned as the resource string the key lookup is performed against the specified resource bundle if a resource string corresponding to the key is not found in the resource bundle the key value or any default text following the key in the argument value is returned as the resource string a key is identified as a string beginning with the character note that the character is stripped off prior to lookup in the resource bundle p for example assume resource bundle plugin properties contains name project name pre get resource string hello world returns hello world li get resource string name returns project name li get resource string name hello world returns project name li get resource string abcd hello world returns hello world li get resource string abcd returns abcd li get resource string name returns name li pre p param bundle the bundle whose resource bundle is being queried param value the value param resource bundle the resource bundle to query return the resource string see get resource bundle bundle since 3 0 public static string get resource string bundle bundle string value resource bundle resource bundle return internal platform get default get resource string bundle value resource bundle getresourcestring getresourcestring getresourcestring getresourcestring getresourcestring getresourcestring resourcebundle getresourcebundle getresourcestring resourcebundle resourcebundle internalplatform getdefault getresourcestring resourcebundle returns the string name of the current system architecture the value is a user defined string if the architecture is specified on the command line otherwise it is the value returned by code java lang system get property os arch code return the string name of the current system architecture since 3 0 public static string getos arch return internal platform get default getos arch getproperty getosarch internalplatform getdefault getosarch returns the string name of the current locale for use in finding files whose path starts with code nl code return the string name of the current locale since 3 0 public static string getnl return internal platform get default getnl internalplatform getdefault returns the string name of the current operating system for use in finding files whose path starts with code os code code os unknown code is returned if the operating system cannot be determined the value may indicate one of the operating systems known to the platform as specified in code knownos values code or a user defined string if the operating system name is specified on the command line return the string name of the current operating system since 3 0 public static string getos return internal platform get default getos os_unknown knownosvalues internalplatform getdefault returns the string name of the current window system for use in finding files whose path starts with code ws code code null code is returned if the window system cannot be determined return the string name of the current window system or code null code since 3 0 public static string getws return internal platform get default getws internalplatform getdefault returns the arguments not consumed by the framework implementation itself which arguments are consumed is implementation specific these arguments are available for use by the application return the array of command line arguments not consumed by the framework since 3 0 public static string get application args return internal platform get default get application args getapplicationargs internalplatform getdefault getapplicationargs returns the platform administrator for this running eclipse p note this is an internal method and em must not em be used by clients which are not part of the eclipse platform this method allows access to classes which are not eclipse platform api but are part of the os gi runtime that the eclipse platform is built on even as the eclipse platform evolves in compatible ways from release to release the details of the os gi implementation might not p return the platform admin for this instance of eclipse since 3 0 public static platform admin get platform admin return internal platform get default get platform admin osgi osgi platformadmin getplatformadmin internalplatform getdefault getplatformadmin returns the location of the platform s working directory also known as the instance data area code null code is returned if the platform is running without an instance location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi instance area p return the location of the platform s instance data area or code null code if none since 3 0 public static location get instance location return internal platform get default get instance location getinstancelocation internalplatform getdefault getinstancelocation returns the currently registered bundle group providers return the currently registered bundle group providers since 3 0 public static i bundle group provider get bundle group providers return internal platform get default get bundle group providers ibundlegroupprovider getbundlegroupproviders internalplatform getdefault getbundlegroupproviders return the interface into the preference mechanism the returned object can be used for such operations as searching for preference values across multiple scopes and preference import export return an object to interface into the preference mechanism since 3 0 public static i preferences service get preferences service return internal platform get default get preferences service ipreferencesservice getpreferencesservice internalplatform getdefault getpreferencesservice returns the product which was selected when running this eclipse instance or code null code if none return the current product or code null code if none since 3 0 public static i product get product return internal platform get default get product iproduct getproduct internalplatform getdefault getproduct registers the given bundle group provider with the platform param provider a provider to register since 3 0 public static void register bundle group provider i bundle group provider provider internal platform get default register bundle group provider provider registerbundlegroupprovider ibundlegroupprovider internalplatform getdefault registerbundlegroupprovider de registers the given bundle group provider with the platform param provider a provider to de register since 3 0 public static void unregister bundle group provider i bundle group provider provider internal platform get default unregister bundle group provider provider unregisterbundlegroupprovider ibundlegroupprovider internalplatform getdefault unregisterbundlegroupprovider returns the location of the configuration information used to run this instance of eclipse the configuration area typically contains the list of plug ins available for use various settings those shared across different instances of the same configuration and any other such data needed by plug ins code null code is returned if the platform is running without a configuration location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi configuration area p return the location of the platform s configuration data area or code null code if none since 3 0 public static location get configuration location return internal platform get default get configuration location getconfigurationlocation internalplatform getdefault getconfigurationlocation returns the location of the platform s user data area the user data area is a location on the system which is specific to the system s current user by default it is located relative to the location given by the system property user home code null code is returned if the platform is running without an user location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi user area p return the location of the platform s user data area or code null code if none since 3 0 public static location get user location return internal platform get default get user location getuserlocation internalplatform getdefault getuserlocation returns the location of the base installation for the running platform code null code is returned if the platform is running without a configuration location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi install area p return the location of the platform s installation area or code null code if none since 3 0 public static location get install location return internal platform get default get install location getinstalllocation internalplatform getdefault getinstalllocation checks if the specified bundle is a fragment bundle param bundle the bundle to query return true if the specified bundle is a fragment bundle otherwise false is returned since 3 0 public static boolean is fragment bundle bundle return internal platform get default is fragment bundle isfragment internalplatform getdefault isfragment returns an array of attached fragment bundles for the specified bundle if the specified bundle is a fragment then tt null tt is returned if no fragments are attached to the specified bundle then tt null tt is returned param bundle the bundle to get the attached fragment bundles for return an array of fragment bundles or tt null tt if the bundle does not have any attached fragment bundles since 3 0 public static bundle get fragments bundle bundle return internal platform get default get fragments bundle getfragments internalplatform getdefault getfragments returns the resolved bundle with the specified symbolic name that has the highest version if no resolved bundles are installed that have the specified symbolic name then null is returned param symbolic name the symbolic name of the bundle to be returned return the bundle that has the specified symbolic name with the highest version or tt null tt if no bundle is found since 3 0 public static bundle get bundle string symbolic name return internal platform get default get bundle symbolic name symbolicname getbundle symbolicname internalplatform getdefault getbundle symbolicname returns all bundles with the specified symbolic name if no resolved bundles with the specified symbolic name can be found tt null tt is returned if the version argument is not null then only the bundles that have the specified symbolic name and a version greater than or equal to the specified version are returned the returned bundles are ordered in descending bundle version order param symbolic name the symbolic name of the bundles that are to be returned param version the version that the return bundle versions must match or tt null tt if no version matching is to be done return the array of bundles with the specified name that match the specified version and match rule or tt null tt if no bundles are found public static bundle get bundles string symbolic name string version return internal platform get default get bundles symbolic name version symbolicname getbundles symbolicname internalplatform getdefault getbundles symbolicname returns an array of host bundles that the specified fragment bundle is attached to or tt null tt if the specified bundle is not attached to a host if the bundle is not a fragment bundle then tt null tt is returned param bundle the bundle to get the host bundles for return an array of host bundles or null if the bundle does not have any host bundles since 3 0 public static bundle get hosts bundle bundle return internal platform get default get hosts bundle gethosts internalplatform getdefault gethosts returns whether the platform is running return code true code if the platform is running and code false code otherwise since 3 0 public static boolean is running return internal platform get default is running isrunning internalplatform getdefault isrunning returns a list of known system architectures p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getos arch code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of system architectures known to the system see getos arch since 3 0 public static string knownos arch values return internal platform get default knownos arch values getosarch getosarch knownosarchvalues internalplatform getdefault knownosarchvalues returns a list of known operating system names p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getos code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of operating systems known to the system see getos since 3 0 public static string knownos values return internal platform get default knownos values knownosvalues internalplatform getdefault knownosvalues returns a map of known platform line separators the keys are translated names of platforms and the values are their associated line separator strings return a map of platform to their line separator string since 3 1 public static map known platform line separators map result new hash map result put line separator key mac os 9 line separator value cr result put line separator key unix line separator value lf result put line separator key windows line separator value crlf return result knownplatformlineseparators hashmap line_separator_key_mac_os_9 line_separator_value_cr line_separator_key_unix line_separator_value_lf line_separator_key_windows line_separator_value_crlf returns a list of known windowing system names p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getws code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of window systems known to the system see getws since 3 0 public static string knownws values return internal platform get default knownws values knownwsvalues internalplatform getdefault knownwsvalues returns code true code if the platform is currently running in debug mode the platform is typically put in debug mode using the debug command line argument return whether or not the platform is running in debug mode since 3 0 public static boolean in debug mode return system get property osgi debug null non nls 1 indebugmode getproperty returns code true code if the platform is currently running in development mode that is if special procedures are to be taken when defining plug in class paths the platform is typically put in development mode using the dev command line argument return whether or not the platform is running in development mode since 3 0 public static boolean in development mode return system get property osgi dev null non nls 1 indevelopmentmode getproperty private constructor to block instance creation private platform super adds the given authorization information to the key ring the information is relevant for the specified protection space and the given authorization scheme the protection space is defined by the combination of the given server url and realm the authorization scheme determines what the authorization information contains and how it should be used the authorization information is a code map code of code string code to code string code and typically contains information such as user names and passwords param server url the url identifying the server for this authorization information for example http www example com param realm the subsection of the given server to which this authorization information applies for example realm1 example com or for no realm param auth scheme the scheme for which this authorization information applies for example basic or for no authorization scheme param info a code map code containing authorization information such as user names and passwords key type code string code value type code string code exception core exception if there are problems setting the authorization information reasons include ul li the keyring could not be saved li ul public static void add authorization info url server url string realm string auth scheme map info throws core exception internal platform get default add authorization info server url realm auth scheme info serverurl authscheme coreexception addauthorizationinfo serverurl authscheme coreexception internalplatform getdefault addauthorizationinfo serverurl authscheme adds the given log listener to the notification list of the platform p once registered a listener starts receiving notification as entries are added to plug in logs via code i log log code the listener continues to receive notifications until it is replaced or removed p param listener the listener to register see i log add log listener i log listener see remove log listener i log listener public static void add log listener i log listener listener internal platform get default add log listener listener ilog ilog addloglistener iloglistener removeloglistener iloglistener addloglistener iloglistener internalplatform getdefault addloglistener adds the specified resource to the protection space specified by the given realm all targets at or deeper than the depth of the last symbolic element in the path of the given resource url are assumed to be in the same protection space param resource url the url identifying the resources to be added to the specified protection space for example http www example com folder param realm the name of the protection space for example realm1 example com exception core exception if there are problems setting the authorization information reasons include ul li the key ring could not be saved li ul public static void add protection space url resource url string realm throws core exception internal platform get default add protection space resource url realm resourceurl coreexception addprotectionspace resourceurl coreexception internalplatform getdefault addprotectionspace resourceurl returns a url that is the local equivalent of the supplied url this method is expected to be used with the plug in relative ur ls returned by i plugin descriptor bundle get entry and platform find if the specified url is not a plug in relative url it is returned as is if the specified url is a plug in relative url of a file including jar archive it is returned as a locally accessible url using file protocol extracting caching the file locally if required if the specified url is a plug in relative url of a directory the directory and any files and directories under it are made locally accessible likewise if param url original plug in relative url return the resolved url exception io exception if unable to resolve url see resolve url see find bundle i path see bundle get entry string public static url as localurl url url throws io exception return internal platform get default as localurl url urls iplugindescriptor getentry ioexception ipath getentry aslocalurl ioexception internalplatform getdefault aslocalurl takes down the splash screen if one was put up public static void end splash internal platform get default end splash endsplash internalplatform getdefault endsplash removes the authorization information for the specified protection space and given authorization scheme the protection space is defined by the given server url and realm param server url the url identifying the server to remove the authorization information for for example http www example com param realm the subsection of the given server to remove the authorization information for for example realm1 example com or for no realm param auth scheme the scheme for which the authorization information to remove applies for example basic or for no authorization scheme exception core exception if there are problems removing the authorization information reasons include ul li the keyring could not be saved li ul public static void flush authorization info url server url string realm string auth scheme throws core exception internal platform get default flush authorization info server url realm auth scheme serverurl authscheme coreexception flushauthorizationinfo serverurl authscheme coreexception internalplatform getdefault flushauthorizationinfo serverurl authscheme returns the adapter manager used for extending code i adaptable code objects return the adapter manager for this platform see i adapter manager public static i adapter manager get adapter manager return internal platform get default get adapter manager iadaptable iadaptermanager iadaptermanager getadaptermanager internalplatform getdefault getadaptermanager returns the authorization information for the specified protection space and given authorization scheme the protection space is defined by the given server url and realm returns code null code if no such information exists param server url the url identifying the server for the authorization information for example http www example com param realm the subsection of the given server to which the authorization information applies for example realm1 example com or for no realm param auth scheme the scheme for which the authorization information applies for example basic or for no authorization scheme return the authorization information for the specified protection space and given authorization scheme or code null code if no such information exists public static map get authorization info url server url string realm string auth scheme return internal platform get default get authorization info server url realm auth scheme serverurl authscheme getauthorizationinfo serverurl authscheme internalplatform getdefault getauthorizationinfo serverurl authscheme returns the command line args provided to the eclipse runtime layer when it was first run the returned value does not include arguments consumed by the lower levels of eclipse e g os gi or the launcher note that individual platform runnables may be provided with different arguments if they are being run individually rather than with code platform run code return the command line used to start the platform public static string get command line args return internal platform get default get command line args osgi getcommandlineargs internalplatform getdefault getcommandlineargs returns the content type manager return the content type manager since 3 0 public static i content type manager get content type manager return internal platform get default get content type manager icontenttypemanager getcontenttypemanager internalplatform getdefault getcontenttypemanager returns the identified option code null code is returned if no such option is found options are specified in the general form i lt plug in id gt lt option path gt i for example code org eclipse core runtime debug code param option the name of the option to lookup return the value of the requested debug option or code null code public static string get debug option string option return internal platform get default get option option getdebugoption internalplatform getdefault getoption returns the location of the platform working directory p callers of this method should consider using code get instance location code instead in various typically non ide related configurations of eclipse the platform working directory may not be on the local file system as such the more general form of this location is as a url p return the location of the platform see get instance location public static i path get location throws illegal state exception return internal platform get default get location getinstancelocation getinstancelocation ipath getlocation illegalstateexception internalplatform getdefault getlocation returns the location of the platform log file this file may contain information about errors that have previously occurred during this invocation of the platform p it is recommended not to keep this value as the log location may vary when an instance location is being set p p note it is very important that users of this method do not leave the log file open for extended periods of time doing so may prevent others from writing to the log file which could result in important error messages being lost it is strongly recommended that clients wanting to read the log file for extended periods should copy the log file contents elsewhere and immediately close the original file p return the path of the log file on disk public static i path get log file location return internal platform get default get meta area get log location ipath getlogfilelocation internalplatform getdefault getmetaarea getloglocation returns the plug in runtime object for the identified plug in or code null code if no such plug in can be found if the plug in is defined but not yet activated the plug in will be activated before being returned p b note b this method is only able to find and return plug in objects for plug ins described using plugin xml according to the traditional eclipse conventions eclipse 3 0 permits plug ins to be described in manifest mf files and to define their own bundle activators such plug ins cannot be discovered by this method p param id the unique identifier of the desired plug in e g code com example acme code return the plug in runtime object or code null code deprecated this method only works if the compatibility layer is installed and must not be used otherwise see the comments on link i plugin descriptor get plugin for details public static plugin get plugin string id try i plugin registry registry get plugin registry if registry null throw new illegal state exception i plugin descriptor pd registry get plugin descriptor id if pd null return null return pd get plugin catch core exception e todo log the exception return null iplugindescriptor getplugin getplugin ipluginregistry getpluginregistry illegalstateexception iplugindescriptor getplugindescriptor getplugin coreexception returns the plug in registry for this platform return the plug in registry see i plugin registry deprecated code i plugin registry code was refactored in eclipse 3 0 this method only works if the compatibility layer is installed and must not be used otherwise see the comments on link i plugin registry and its methods for details public static i plugin registry get plugin registry bundle compatibility internal platform get default get bundle compatibility helper pi runtime compatibility if compatibility null throw new illegal state exception class old internal platform null try old internal platform compatibility load class org eclipse core internal plugins internal platform non nls 1 method get plugin registry old internal platform get method get plugin registry null non nls 1 return i plugin registry get plugin registry invoke old internal platform null catch exception e ignore the exceptions return null return null ipluginregistry ipluginregistry ipluginregistry ipluginregistry getpluginregistry internalplatform getdefault getbundle compatibilityhelper pi_runtime_compatibility illegalstateexception oldinternalplatform oldinternalplatform loadclass internalplatform getpluginregistry oldinternalplatform getmethod getpluginregistry ipluginregistry getpluginregistry oldinternalplatform returns the location in the local file system of the plug in state area for the given plug in the platform must be running p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings p param plugin the plug in whose state location is returned return a local file system path public static i path get plugin state location plugin plugin return plugin get state location ipath getpluginstatelocation getstatelocation returns the protection space realm for the specified resource or code null code if the realm is unknown param resource url the url of the resource whose protection space is returned for example http www example com folder return the protection space realm for the specified resource or code null code if the realm is unknown public static string get protection space url resource url return internal platform get default get protection space resource url resourceurl getprotectionspace resourceurl internalplatform getdefault getprotectionspace resourceurl removes the indicated identical log listener from the notification list of the platform if no such listener exists no action is taken param listener the listener to de register see i log remove log listener i log listener see add log listener i log listener public static void remove log listener i log listener listener internal platform get default remove log listener listener ilog removeloglistener iloglistener addloglistener iloglistener removeloglistener iloglistener internalplatform getdefault removeloglistener returns a url which is the resolved equivalent of the supplied url this method is expected to be used with the plug in relative ur ls returned by i plugin descriptor bundle get entry and platform find p if the specified url is not a plug in relative url it is returned as is if the specified url is a plug in relative url this method attempts to reduce the given url to one which is native to the java class library eg file http etc p p note however that users of this api should not assume too much about the results of this method while it may consistently return a file url in certain installation configurations others may result in jar or http ur ls p param url original plug in relative url return the resolved url exception io exception if unable to resolve url see as localurl url see find bundle i path see bundle get entry string public static url resolve url url throws io exception return internal platform get default resolve url urls iplugindescriptor getentry urls ioexception aslocalurl ipath getentry ioexception internalplatform getdefault runs the given runnable in a protected mode exceptions thrown in the runnable are logged and passed to the runnable s exception handler such exceptions are not rethrown by this method param runnable the runnable to run public static void run i safe runnable runnable internal platform get default run runnable isaferunnable internalplatform getdefault returns the platform job manager return the platform s job manager since 3 0 public static i job manager get job manager return internal platform get default get job manager ijobmanager getjobmanager internalplatform getdefault getjobmanager returns the extension registry for this platform return the extension registry see i extension registry since 3 0 public static i extension registry get extension registry return internal platform get default get registry iextensionregistry iextensionregistry getextensionregistry internalplatform getdefault getregistry returns a url for the given path in the given bundle returns code null code if the url could not be computed or created param bundle the bundle in which to search param path path relative to plug in installation location return a url for the given path or code null code the actual form of the returned url is not specified see find bundle i path map see resolve url see as localurl url since 3 0 public static url find bundle bundle i path path return find support find bundle path null ipath aslocalurl ipath findsupport returns a url for the given path in the given bundle returns code null code if the url could not be computed or created p find looks for this path in given bundle and any attached fragments code null code is returned if no such entry is found note that there is no specific order to the fragments p p the following arguments may also be used pre nl for language specific information os for operating system specific information ws for windowing system specific information pre p p a path of nl about properties in an environment with a default locale of en ca will return a url corresponding to the first place about properties is found according to the following order pre plugin root nl en ca about properties fragment1 root nl en ca about properties fragment2 root nl en ca about properties plugin root nl en about properties fragment1 root nl en about properties fragment2 root nl en about properties plugin root about properties fragment1 root about properties fragment2 root about properties pre p p the current environment variable values can be overridden using the override map argument p param bundle the bundle in which to search param path file path relative to plug in installation location param override map of override substitution arguments to be used for any arg path elements the map keys correspond to the substitution arguments eg nl or os the resulting values must be of type java lang string if the map is code null code or does not contain the required substitution argument the default is used return a url for the given path or code null code the actual form of the returned url is not specified see resolve url see as localurl url since 3 0 public static url find bundle bundle i path path map override return find support find bundle path override en_ca aslocalurl ipath findsupport returns the location in the local file system of the plug in state area for the given bundle if the plug in state area did not exist prior to this call it is created p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings and other configuration parameters p param bundle the bundle whose state location if returned return a local file system path since 3 0 public static i path get state location bundle bundle return internal platform get default get state location bundle ipath getstatelocation internalplatform getdefault getstatelocation returns a number that changes whenever the set of installed plug ins changes this can be used for invalidating caches that are based on the set of currently installed plug ins e g extensions return a number related to the set of installed plug ins since 3 1 public static long get state stamp return internal platform get default get state time stamp getstatestamp internalplatform getdefault getstatetimestamp returns the log for the given bundle if no such log exists one is created param bundle the bundle whose log is returned return the log for the given bundle since 3 0 public static i log get log bundle bundle return internal platform get default get log bundle ilog getlog internalplatform getdefault getlog returns the given bundle s resource bundle for the current locale p this resource bundle is typically stored as the plugin properties file in the plug in itself and contains any translatable strings used in the plug in manifest file plugin xml p p this mechanism is intended only for externalizing strings found in the plug in manifest file using this method for externalizing strings in your code may result in degraded memory performance p param bundle the bundle whose resource bundle is being queried return the resource bundle exception missing resource exception if the resource bundle was not found since 3 0 public static resource bundle get resource bundle bundle bundle throws missing resource exception return internal platform get default get resource bundle bundle missingresourceexception resourcebundle getresourcebundle missingresourceexception internalplatform getdefault getresourcebundle returns a resource string corresponding to the given argument value if the argument value specifies a resource key the string is looked up in the default resource bundle for the given runtime bundle if the argument does not specify a valid key the argument itself is returned as the resource string the key lookup is performed in the file referenced in the bundle localization header of the bundle manifest if a resource string corresponding to the key is not found in the resource bundle the key value or any default text following the key in the argument value is returned as the resource string a key is identified as a string beginning with the character note that the character is stripped off prior to lookup in the resource bundle p equivalent to code get resource string bundle value get resource bundle code p param bundle the bundle whose resource bundle is being queried param value the value to look for return the resource string see get resource bundle bundle since 3 0 public static string get resource string bundle bundle string value return internal platform get default get resource string bundle value getresourcestring getresourcebundle getresourcebundle getresourcestring internalplatform getdefault getresourcestring returns a resource string corresponding to the given argument value and resource bundle in the given runtime bundle if the argument value specifies a resource key the string is looked up in the given resource bundle if the argument does not specify a valid key the argument itself is returned as the resource string the key lookup is performed against the specified resource bundle if a resource string corresponding to the key is not found in the resource bundle the key value or any default text following the key in the argument value is returned as the resource string a key is identified as a string beginning with the character note that the character is stripped off prior to lookup in the resource bundle p for example assume resource bundle plugin properties contains name project name pre get resource string hello world returns hello world li get resource string name returns project name li get resource string name hello world returns project name li get resource string abcd hello world returns hello world li get resource string abcd returns abcd li get resource string name returns name li pre p param bundle the bundle whose resource bundle is being queried param value the value param resource bundle the resource bundle to query return the resource string see get resource bundle bundle since 3 0 public static string get resource string bundle bundle string value resource bundle resource bundle return internal platform get default get resource string bundle value resource bundle getresourcestring getresourcestring getresourcestring getresourcestring getresourcestring getresourcestring resourcebundle getresourcebundle getresourcestring resourcebundle resourcebundle internalplatform getdefault getresourcestring resourcebundle returns the string name of the current system architecture the value is a user defined string if the architecture is specified on the command line otherwise it is the value returned by code java lang system get property os arch code return the string name of the current system architecture since 3 0 public static string getos arch return internal platform get default getos arch getproperty getosarch internalplatform getdefault getosarch returns the string name of the current locale for use in finding files whose path starts with code nl code return the string name of the current locale since 3 0 public static string getnl return internal platform get default getnl internalplatform getdefault returns the string name of the current operating system for use in finding files whose path starts with code os code code os unknown code is returned if the operating system cannot be determined the value may indicate one of the operating systems known to the platform as specified in code knownos values code or a user defined string if the operating system name is specified on the command line return the string name of the current operating system since 3 0 public static string getos return internal platform get default getos os_unknown knownosvalues internalplatform getdefault returns the string name of the current window system for use in finding files whose path starts with code ws code code null code is returned if the window system cannot be determined return the string name of the current window system or code null code since 3 0 public static string getws return internal platform get default getws internalplatform getdefault returns the arguments not consumed by the framework implementation itself which arguments are consumed is implementation specific these arguments are available for use by the application return the array of command line arguments not consumed by the framework since 3 0 public static string get application args return internal platform get default get application args getapplicationargs internalplatform getdefault getapplicationargs returns the platform administrator for this running eclipse p note this is an internal method and em must not em be used by clients which are not part of the eclipse platform this method allows access to classes which are not eclipse platform api but are part of the os gi runtime that the eclipse platform is built on even as the eclipse platform evolves in compatible ways from release to release the details of the os gi implementation might not p return the platform admin for this instance of eclipse since 3 0 public static platform admin get platform admin return internal platform get default get platform admin osgi osgi platformadmin getplatformadmin internalplatform getdefault getplatformadmin returns the location of the platform s working directory also known as the instance data area code null code is returned if the platform is running without an instance location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi instance area p return the location of the platform s instance data area or code null code if none since 3 0 public static location get instance location return internal platform get default get instance location getinstancelocation internalplatform getdefault getinstancelocation returns the currently registered bundle group providers return the currently registered bundle group providers since 3 0 public static i bundle group provider get bundle group providers return internal platform get default get bundle group providers ibundlegroupprovider getbundlegroupproviders internalplatform getdefault getbundlegroupproviders return the interface into the preference mechanism the returned object can be used for such operations as searching for preference values across multiple scopes and preference import export return an object to interface into the preference mechanism since 3 0 public static i preferences service get preferences service return internal platform get default get preferences service ipreferencesservice getpreferencesservice internalplatform getdefault getpreferencesservice returns the product which was selected when running this eclipse instance or code null code if none return the current product or code null code if none since 3 0 public static i product get product return internal platform get default get product iproduct getproduct internalplatform getdefault getproduct registers the given bundle group provider with the platform param provider a provider to register since 3 0 public static void register bundle group provider i bundle group provider provider internal platform get default register bundle group provider provider registerbundlegroupprovider ibundlegroupprovider internalplatform getdefault registerbundlegroupprovider de registers the given bundle group provider with the platform param provider a provider to de register since 3 0 public static void unregister bundle group provider i bundle group provider provider internal platform get default unregister bundle group provider provider unregisterbundlegroupprovider ibundlegroupprovider internalplatform getdefault unregisterbundlegroupprovider returns the location of the configuration information used to run this instance of eclipse the configuration area typically contains the list of plug ins available for use various settings those shared across different instances of the same configuration and any other such data needed by plug ins code null code is returned if the platform is running without a configuration location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi configuration area p return the location of the platform s configuration data area or code null code if none since 3 0 public static location get configuration location return internal platform get default get configuration location getconfigurationlocation internalplatform getdefault getconfigurationlocation returns the location of the platform s user data area the user data area is a location on the system which is specific to the system s current user by default it is located relative to the location given by the system property user home code null code is returned if the platform is running without an user location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi user area p return the location of the platform s user data area or code null code if none since 3 0 public static location get user location return internal platform get default get user location getuserlocation internalplatform getdefault getuserlocation returns the location of the base installation for the running platform code null code is returned if the platform is running without a configuration location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi install area p return the location of the platform s installation area or code null code if none since 3 0 public static location get install location return internal platform get default get install location getinstalllocation internalplatform getdefault getinstalllocation checks if the specified bundle is a fragment bundle param bundle the bundle to query return true if the specified bundle is a fragment bundle otherwise false is returned since 3 0 public static boolean is fragment bundle bundle return internal platform get default is fragment bundle isfragment internalplatform getdefault isfragment returns an array of attached fragment bundles for the specified bundle if the specified bundle is a fragment then tt null tt is returned if no fragments are attached to the specified bundle then tt null tt is returned param bundle the bundle to get the attached fragment bundles for return an array of fragment bundles or tt null tt if the bundle does not have any attached fragment bundles since 3 0 public static bundle get fragments bundle bundle return internal platform get default get fragments bundle getfragments internalplatform getdefault getfragments returns the resolved bundle with the specified symbolic name that has the highest version if no resolved bundles are installed that have the specified symbolic name then null is returned param symbolic name the symbolic name of the bundle to be returned return the bundle that has the specified symbolic name with the highest version or tt null tt if no bundle is found since 3 0 public static bundle get bundle string symbolic name return internal platform get default get bundle symbolic name symbolicname getbundle symbolicname internalplatform getdefault getbundle symbolicname returns all bundles with the specified symbolic name if no resolved bundles with the specified symbolic name can be found tt null tt is returned if the version argument is not null then only the bundles that have the specified symbolic name and a version greater than or equal to the specified version are returned the returned bundles are ordered in descending bundle version order param symbolic name the symbolic name of the bundles that are to be returned param version the version that the return bundle versions must match or tt null tt if no version matching is to be done return the array of bundles with the specified name that match the specified version and match rule or tt null tt if no bundles are found public static bundle get bundles string symbolic name string version return internal platform get default get bundles symbolic name version symbolicname getbundles symbolicname internalplatform getdefault getbundles symbolicname returns an array of host bundles that the specified fragment bundle is attached to or tt null tt if the specified bundle is not attached to a host if the bundle is not a fragment bundle then tt null tt is returned param bundle the bundle to get the host bundles for return an array of host bundles or null if the bundle does not have any host bundles since 3 0 public static bundle get hosts bundle bundle return internal platform get default get hosts bundle gethosts internalplatform getdefault gethosts returns whether the platform is running return code true code if the platform is running and code false code otherwise since 3 0 public static boolean is running return internal platform get default is running isrunning internalplatform getdefault isrunning returns a list of known system architectures p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getos arch code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of system architectures known to the system see getos arch since 3 0 public static string knownos arch values return internal platform get default knownos arch values getosarch getosarch knownosarchvalues internalplatform getdefault knownosarchvalues returns a list of known operating system names p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getos code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of operating systems known to the system see getos since 3 0 public static string knownos values return internal platform get default knownos values knownosvalues internalplatform getdefault knownosvalues returns a map of known platform line separators the keys are translated names of platforms and the values are their associated line separator strings return a map of platform to their line separator string since 3 1 public static map known platform line separators map result new hash map result put line separator key mac os 9 line separator value cr result put line separator key unix line separator value lf result put line separator key windows line separator value crlf return result knownplatformlineseparators hashmap line_separator_key_mac_os_9 line_separator_value_cr line_separator_key_unix line_separator_value_lf line_separator_key_windows line_separator_value_crlf returns a list of known windowing system names p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getws code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of window systems known to the system see getws since 3 0 public static string knownws values return internal platform get default knownws values knownwsvalues internalplatform getdefault knownwsvalues returns code true code if the platform is currently running in debug mode the platform is typically put in debug mode using the debug command line argument return whether or not the platform is running in debug mode since 3 0 public static boolean in debug mode return system get property osgi debug null non nls 1 indebugmode getproperty returns code true code if the platform is currently running in development mode that is if special procedures are to be taken when defining plug in class paths the platform is typically put in development mode using the dev command line argument return whether or not the platform is running in development mode since 3 0 public static boolean in development mode return system get property osgi dev null non nls 1 indevelopmentmode getproperty private constructor to block instance creation private platform super adds the given authorization information to the key ring the information is relevant for the specified protection space and the given authorization scheme the protection space is defined by the combination of the given server url and realm the authorization scheme determines what the authorization information contains and how it should be used the authorization information is a code map code of code string code to code string code and typically contains information such as user names and passwords param server url the url identifying the server for this authorization information for example http www example com param realm the subsection of the given server to which this authorization information applies for example realm1 example com or for no realm param auth scheme the scheme for which this authorization information applies for example basic or for no authorization scheme param info a code map code containing authorization information such as user names and passwords key type code string code value type code string code exception core exception if there are problems setting the authorization information reasons include ul li the keyring could not be saved li ul public static void add authorization info url server url string realm string auth scheme map info throws core exception internal platform get default add authorization info server url realm auth scheme info serverurl authscheme coreexception addauthorizationinfo serverurl authscheme coreexception internalplatform getdefault addauthorizationinfo serverurl authscheme adds the given log listener to the notification list of the platform p once registered a listener starts receiving notification as entries are added to plug in logs via code i log log code the listener continues to receive notifications until it is replaced or removed p param listener the listener to register see i log add log listener i log listener see remove log listener i log listener public static void add log listener i log listener listener internal platform get default add log listener listener ilog ilog addloglistener iloglistener removeloglistener iloglistener addloglistener iloglistener internalplatform getdefault addloglistener adds the specified resource to the protection space specified by the given realm all targets at or deeper than the depth of the last symbolic element in the path of the given resource url are assumed to be in the same protection space param resource url the url identifying the resources to be added to the specified protection space for example http www example com folder param realm the name of the protection space for example realm1 example com exception core exception if there are problems setting the authorization information reasons include ul li the key ring could not be saved li ul public static void add protection space url resource url string realm throws core exception internal platform get default add protection space resource url realm resourceurl coreexception addprotectionspace resourceurl coreexception internalplatform getdefault addprotectionspace resourceurl returns a url that is the local equivalent of the supplied url this method is expected to be used with the plug in relative ur ls returned by i plugin descriptor bundle get entry and platform find if the specified url is not a plug in relative url it is returned as is if the specified url is a plug in relative url of a file including jar archive it is returned as a locally accessible url using file protocol extracting caching the file locally if required if the specified url is a plug in relative url of a directory the directory and any files and directories under it are made locally accessible likewise if param url original plug in relative url return the resolved url exception io exception if unable to resolve url see resolve url see find bundle i path see bundle get entry string public static url as localurl url url throws io exception return internal platform get default as localurl url urls iplugindescriptor getentry ioexception ipath getentry aslocalurl ioexception internalplatform getdefault aslocalurl takes down the splash screen if one was put up public static void end splash internal platform get default end splash endsplash internalplatform getdefault endsplash removes the authorization information for the specified protection space and given authorization scheme the protection space is defined by the given server url and realm param server url the url identifying the server to remove the authorization information for for example http www example com param realm the subsection of the given server to remove the authorization information for for example realm1 example com or for no realm param auth scheme the scheme for which the authorization information to remove applies for example basic or for no authorization scheme exception core exception if there are problems removing the authorization information reasons include ul li the keyring could not be saved li ul public static void flush authorization info url server url string realm string auth scheme throws core exception internal platform get default flush authorization info server url realm auth scheme serverurl authscheme coreexception flushauthorizationinfo serverurl authscheme coreexception internalplatform getdefault flushauthorizationinfo serverurl authscheme returns the adapter manager used for extending code i adaptable code objects return the adapter manager for this platform see i adapter manager public static i adapter manager get adapter manager return internal platform get default get adapter manager iadaptable iadaptermanager iadaptermanager getadaptermanager internalplatform getdefault getadaptermanager returns the authorization information for the specified protection space and given authorization scheme the protection space is defined by the given server url and realm returns code null code if no such information exists param server url the url identifying the server for the authorization information for example http www example com param realm the subsection of the given server to which the authorization information applies for example realm1 example com or for no realm param auth scheme the scheme for which the authorization information applies for example basic or for no authorization scheme return the authorization information for the specified protection space and given authorization scheme or code null code if no such information exists public static map get authorization info url server url string realm string auth scheme return internal platform get default get authorization info server url realm auth scheme serverurl authscheme getauthorizationinfo serverurl authscheme internalplatform getdefault getauthorizationinfo serverurl authscheme returns the command line args provided to the eclipse runtime layer when it was first run the returned value does not include arguments consumed by the lower levels of eclipse e g os gi or the launcher note that individual platform runnables may be provided with different arguments if they are being run individually rather than with code platform run code return the command line used to start the platform public static string get command line args return internal platform get default get command line args osgi getcommandlineargs internalplatform getdefault getcommandlineargs returns the content type manager return the content type manager since 3 0 public static i content type manager get content type manager return internal platform get default get content type manager icontenttypemanager getcontenttypemanager internalplatform getdefault getcontenttypemanager returns the identified option code null code is returned if no such option is found options are specified in the general form i lt plug in id gt lt option path gt i for example code org eclipse core runtime debug code param option the name of the option to lookup return the value of the requested debug option or code null code public static string get debug option string option return internal platform get default get option option getdebugoption internalplatform getdefault getoption returns the location of the platform working directory p callers of this method should consider using code get instance location code instead in various typically non ide related configurations of eclipse the platform working directory may not be on the local file system as such the more general form of this location is as a url p return the location of the platform see get instance location public static i path get location throws illegal state exception return internal platform get default get location getinstancelocation getinstancelocation ipath getlocation illegalstateexception internalplatform getdefault getlocation returns the location of the platform log file this file may contain information about errors that have previously occurred during this invocation of the platform p it is recommended not to keep this value as the log location may vary when an instance location is being set p p note it is very important that users of this method do not leave the log file open for extended periods of time doing so may prevent others from writing to the log file which could result in important error messages being lost it is strongly recommended that clients wanting to read the log file for extended periods should copy the log file contents elsewhere and immediately close the original file p return the path of the log file on disk public static i path get log file location return internal platform get default get meta area get log location ipath getlogfilelocation internalplatform getdefault getmetaarea getloglocation returns the plug in runtime object for the identified plug in or code null code if no such plug in can be found if the plug in is defined but not yet activated the plug in will be activated before being returned p b note b this method is only able to find and return plug in objects for plug ins described using plugin xml according to the traditional eclipse conventions eclipse 3 0 permits plug ins to be described in manifest mf files and to define their own bundle activators such plug ins cannot be discovered by this method p param id the unique identifier of the desired plug in e g code com example acme code return the plug in runtime object or code null code deprecated this method only works if the compatibility layer is installed and must not be used otherwise see the comments on link i plugin descriptor get plugin for details public static plugin get plugin string id try i plugin registry registry get plugin registry if registry null throw new illegal state exception i plugin descriptor pd registry get plugin descriptor id if pd null return null return pd get plugin catch core exception e todo log the exception return null iplugindescriptor getplugin getplugin ipluginregistry getpluginregistry illegalstateexception iplugindescriptor getplugindescriptor getplugin coreexception returns the plug in registry for this platform return the plug in registry see i plugin registry deprecated code i plugin registry code was refactored in eclipse 3 0 this method only works if the compatibility layer is installed and must not be used otherwise see the comments on link i plugin registry and its methods for details public static i plugin registry get plugin registry bundle compatibility internal platform get default get bundle compatibility helper pi runtime compatibility if compatibility null throw new illegal state exception class old internal platform null try old internal platform compatibility load class org eclipse core internal plugins internal platform non nls 1 method get plugin registry old internal platform get method get plugin registry null non nls 1 return i plugin registry get plugin registry invoke old internal platform null catch exception e ignore the exceptions return null return null ipluginregistry ipluginregistry ipluginregistry ipluginregistry getpluginregistry internalplatform getdefault getbundle compatibilityhelper pi_runtime_compatibility illegalstateexception oldinternalplatform oldinternalplatform loadclass internalplatform getpluginregistry oldinternalplatform getmethod getpluginregistry ipluginregistry getpluginregistry oldinternalplatform returns the location in the local file system of the plug in state area for the given plug in the platform must be running p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings p param plugin the plug in whose state location is returned return a local file system path public static i path get plugin state location plugin plugin return plugin get state location ipath getpluginstatelocation getstatelocation returns the protection space realm for the specified resource or code null code if the realm is unknown param resource url the url of the resource whose protection space is returned for example http www example com folder return the protection space realm for the specified resource or code null code if the realm is unknown public static string get protection space url resource url return internal platform get default get protection space resource url resourceurl getprotectionspace resourceurl internalplatform getdefault getprotectionspace resourceurl removes the indicated identical log listener from the notification list of the platform if no such listener exists no action is taken param listener the listener to de register see i log remove log listener i log listener see add log listener i log listener public static void remove log listener i log listener listener internal platform get default remove log listener listener ilog removeloglistener iloglistener addloglistener iloglistener removeloglistener iloglistener internalplatform getdefault removeloglistener returns a url which is the resolved equivalent of the supplied url this method is expected to be used with the plug in relative ur ls returned by i plugin descriptor bundle get entry and platform find p if the specified url is not a plug in relative url it is returned as is if the specified url is a plug in relative url this method attempts to reduce the given url to one which is native to the java class library eg file http etc p p note however that users of this api should not assume too much about the results of this method while it may consistently return a file url in certain installation configurations others may result in jar or http ur ls p param url original plug in relative url return the resolved url exception io exception if unable to resolve url see as localurl url see find bundle i path see bundle get entry string public static url resolve url url throws io exception return internal platform get default resolve url urls iplugindescriptor getentry urls ioexception aslocalurl ipath getentry ioexception internalplatform getdefault runs the given runnable in a protected mode exceptions thrown in the runnable are logged and passed to the runnable s exception handler such exceptions are not rethrown by this method param runnable the runnable to run public static void run i safe runnable runnable internal platform get default run runnable isaferunnable internalplatform getdefault returns the platform job manager return the platform s job manager since 3 0 public static i job manager get job manager return internal platform get default get job manager ijobmanager getjobmanager internalplatform getdefault getjobmanager returns the extension registry for this platform return the extension registry see i extension registry since 3 0 public static i extension registry get extension registry return internal platform get default get registry iextensionregistry iextensionregistry getextensionregistry internalplatform getdefault getregistry returns a url for the given path in the given bundle returns code null code if the url could not be computed or created param bundle the bundle in which to search param path path relative to plug in installation location return a url for the given path or code null code the actual form of the returned url is not specified see find bundle i path map see resolve url see as localurl url since 3 0 public static url find bundle bundle i path path return find support find bundle path null ipath aslocalurl ipath findsupport returns a url for the given path in the given bundle returns code null code if the url could not be computed or created p find looks for this path in given bundle and any attached fragments code null code is returned if no such entry is found note that there is no specific order to the fragments p p the following arguments may also be used pre nl for language specific information os for operating system specific information ws for windowing system specific information pre p p a path of nl about properties in an environment with a default locale of en ca will return a url corresponding to the first place about properties is found according to the following order pre plugin root nl en ca about properties fragment1 root nl en ca about properties fragment2 root nl en ca about properties plugin root nl en about properties fragment1 root nl en about properties fragment2 root nl en about properties plugin root about properties fragment1 root about properties fragment2 root about properties pre p p the current environment variable values can be overridden using the override map argument p param bundle the bundle in which to search param path file path relative to plug in installation location param override map of override substitution arguments to be used for any arg path elements the map keys correspond to the substitution arguments eg nl or os the resulting values must be of type java lang string if the map is code null code or does not contain the required substitution argument the default is used return a url for the given path or code null code the actual form of the returned url is not specified see resolve url see as localurl url since 3 0 public static url find bundle bundle i path path map override return find support find bundle path override en_ca aslocalurl ipath findsupport returns the location in the local file system of the plug in state area for the given bundle if the plug in state area did not exist prior to this call it is created p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings and other configuration parameters p param bundle the bundle whose state location if returned return a local file system path since 3 0 public static i path get state location bundle bundle return internal platform get default get state location bundle ipath getstatelocation internalplatform getdefault getstatelocation returns a number that changes whenever the set of installed plug ins changes this can be used for invalidating caches that are based on the set of currently installed plug ins e g extensions return a number related to the set of installed plug ins since 3 1 public static long get state stamp return internal platform get default get state time stamp getstatestamp internalplatform getdefault getstatetimestamp returns the log for the given bundle if no such log exists one is created param bundle the bundle whose log is returned return the log for the given bundle since 3 0 public static i log get log bundle bundle return internal platform get default get log bundle ilog getlog internalplatform getdefault getlog returns the given bundle s resource bundle for the current locale p this resource bundle is typically stored as the plugin properties file in the plug in itself and contains any translatable strings used in the plug in manifest file plugin xml p p this mechanism is intended only for externalizing strings found in the plug in manifest file using this method for externalizing strings in your code may result in degraded memory performance p param bundle the bundle whose resource bundle is being queried return the resource bundle exception missing resource exception if the resource bundle was not found since 3 0 public static resource bundle get resource bundle bundle bundle throws missing resource exception return internal platform get default get resource bundle bundle missingresourceexception resourcebundle getresourcebundle missingresourceexception internalplatform getdefault getresourcebundle returns a resource string corresponding to the given argument value if the argument value specifies a resource key the string is looked up in the default resource bundle for the given runtime bundle if the argument does not specify a valid key the argument itself is returned as the resource string the key lookup is performed in the file referenced in the bundle localization header of the bundle manifest if a resource string corresponding to the key is not found in the resource bundle the key value or any default text following the key in the argument value is returned as the resource string a key is identified as a string beginning with the character note that the character is stripped off prior to lookup in the resource bundle p equivalent to code get resource string bundle value get resource bundle code p param bundle the bundle whose resource bundle is being queried param value the value to look for return the resource string see get resource bundle bundle since 3 0 public static string get resource string bundle bundle string value return internal platform get default get resource string bundle value getresourcestring getresourcebundle getresourcebundle getresourcestring internalplatform getdefault getresourcestring returns a resource string corresponding to the given argument value and resource bundle in the given runtime bundle if the argument value specifies a resource key the string is looked up in the given resource bundle if the argument does not specify a valid key the argument itself is returned as the resource string the key lookup is performed against the specified resource bundle if a resource string corresponding to the key is not found in the resource bundle the key value or any default text following the key in the argument value is returned as the resource string a key is identified as a string beginning with the character note that the character is stripped off prior to lookup in the resource bundle p for example assume resource bundle plugin properties contains name project name pre get resource string hello world returns hello world li get resource string name returns project name li get resource string name hello world returns project name li get resource string abcd hello world returns hello world li get resource string abcd returns abcd li get resource string name returns name li pre p param bundle the bundle whose resource bundle is being queried param value the value param resource bundle the resource bundle to query return the resource string see get resource bundle bundle since 3 0 public static string get resource string bundle bundle string value resource bundle resource bundle return internal platform get default get resource string bundle value resource bundle getresourcestring getresourcestring getresourcestring getresourcestring getresourcestring getresourcestring resourcebundle getresourcebundle getresourcestring resourcebundle resourcebundle internalplatform getdefault getresourcestring resourcebundle returns the string name of the current system architecture the value is a user defined string if the architecture is specified on the command line otherwise it is the value returned by code java lang system get property os arch code return the string name of the current system architecture since 3 0 public static string getos arch return internal platform get default getos arch getproperty getosarch internalplatform getdefault getosarch returns the string name of the current locale for use in finding files whose path starts with code nl code return the string name of the current locale since 3 0 public static string getnl return internal platform get default getnl internalplatform getdefault returns the string name of the current operating system for use in finding files whose path starts with code os code code os unknown code is returned if the operating system cannot be determined the value may indicate one of the operating systems known to the platform as specified in code knownos values code or a user defined string if the operating system name is specified on the command line return the string name of the current operating system since 3 0 public static string getos return internal platform get default getos os_unknown knownosvalues internalplatform getdefault returns the string name of the current window system for use in finding files whose path starts with code ws code code null code is returned if the window system cannot be determined return the string name of the current window system or code null code since 3 0 public static string getws return internal platform get default getws internalplatform getdefault returns the arguments not consumed by the framework implementation itself which arguments are consumed is implementation specific these arguments are available for use by the application return the array of command line arguments not consumed by the framework since 3 0 public static string get application args return internal platform get default get application args getapplicationargs internalplatform getdefault getapplicationargs returns the platform administrator for this running eclipse p note this is an internal method and em must not em be used by clients which are not part of the eclipse platform this method allows access to classes which are not eclipse platform api but are part of the os gi runtime that the eclipse platform is built on even as the eclipse platform evolves in compatible ways from release to release the details of the os gi implementation might not p return the platform admin for this instance of eclipse since 3 0 public static platform admin get platform admin return internal platform get default get platform admin osgi osgi platformadmin getplatformadmin internalplatform getdefault getplatformadmin returns the location of the platform s working directory also known as the instance data area code null code is returned if the platform is running without an instance location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi instance area p return the location of the platform s instance data area or code null code if none since 3 0 public static location get instance location return internal platform get default get instance location getinstancelocation internalplatform getdefault getinstancelocation returns the currently registered bundle group providers return the currently registered bundle group providers since 3 0 public static i bundle group provider get bundle group providers return internal platform get default get bundle group providers ibundlegroupprovider getbundlegroupproviders internalplatform getdefault getbundlegroupproviders return the interface into the preference mechanism the returned object can be used for such operations as searching for preference values across multiple scopes and preference import export return an object to interface into the preference mechanism since 3 0 public static i preferences service get preferences service return internal platform get default get preferences service ipreferencesservice getpreferencesservice internalplatform getdefault getpreferencesservice returns the product which was selected when running this eclipse instance or code null code if none return the current product or code null code if none since 3 0 public static i product get product return internal platform get default get product iproduct getproduct internalplatform getdefault getproduct registers the given bundle group provider with the platform param provider a provider to register since 3 0 public static void register bundle group provider i bundle group provider provider internal platform get default register bundle group provider provider registerbundlegroupprovider ibundlegroupprovider internalplatform getdefault registerbundlegroupprovider de registers the given bundle group provider with the platform param provider a provider to de register since 3 0 public static void unregister bundle group provider i bundle group provider provider internal platform get default unregister bundle group provider provider unregisterbundlegroupprovider ibundlegroupprovider internalplatform getdefault unregisterbundlegroupprovider returns the location of the configuration information used to run this instance of eclipse the configuration area typically contains the list of plug ins available for use various settings those shared across different instances of the same configuration and any other such data needed by plug ins code null code is returned if the platform is running without a configuration location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi configuration area p return the location of the platform s configuration data area or code null code if none since 3 0 public static location get configuration location return internal platform get default get configuration location getconfigurationlocation internalplatform getdefault getconfigurationlocation returns the location of the platform s user data area the user data area is a location on the system which is specific to the system s current user by default it is located relative to the location given by the system property user home code null code is returned if the platform is running without an user location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi user area p return the location of the platform s user data area or code null code if none since 3 0 public static location get user location return internal platform get default get user location getuserlocation internalplatform getdefault getuserlocation returns the location of the base installation for the running platform code null code is returned if the platform is running without a configuration location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi install area p return the location of the platform s installation area or code null code if none since 3 0 public static location get install location return internal platform get default get install location getinstalllocation internalplatform getdefault getinstalllocation checks if the specified bundle is a fragment bundle param bundle the bundle to query return true if the specified bundle is a fragment bundle otherwise false is returned since 3 0 public static boolean is fragment bundle bundle return internal platform get default is fragment bundle isfragment internalplatform getdefault isfragment returns an array of attached fragment bundles for the specified bundle if the specified bundle is a fragment then tt null tt is returned if no fragments are attached to the specified bundle then tt null tt is returned param bundle the bundle to get the attached fragment bundles for return an array of fragment bundles or tt null tt if the bundle does not have any attached fragment bundles since 3 0 public static bundle get fragments bundle bundle return internal platform get default get fragments bundle getfragments internalplatform getdefault getfragments returns the resolved bundle with the specified symbolic name that has the highest version if no resolved bundles are installed that have the specified symbolic name then null is returned param symbolic name the symbolic name of the bundle to be returned return the bundle that has the specified symbolic name with the highest version or tt null tt if no bundle is found since 3 0 public static bundle get bundle string symbolic name return internal platform get default get bundle symbolic name symbolicname getbundle symbolicname internalplatform getdefault getbundle symbolicname returns all bundles with the specified symbolic name if no resolved bundles with the specified symbolic name can be found tt null tt is returned if the version argument is not null then only the bundles that have the specified symbolic name and a version greater than or equal to the specified version are returned the returned bundles are ordered in descending bundle version order param symbolic name the symbolic name of the bundles that are to be returned param version the version that the return bundle versions must match or tt null tt if no version matching is to be done return the array of bundles with the specified name that match the specified version and match rule or tt null tt if no bundles are found public static bundle get bundles string symbolic name string version return internal platform get default get bundles symbolic name version symbolicname getbundles symbolicname internalplatform getdefault getbundles symbolicname returns an array of host bundles that the specified fragment bundle is attached to or tt null tt if the specified bundle is not attached to a host if the bundle is not a fragment bundle then tt null tt is returned param bundle the bundle to get the host bundles for return an array of host bundles or null if the bundle does not have any host bundles since 3 0 public static bundle get hosts bundle bundle return internal platform get default get hosts bundle gethosts internalplatform getdefault gethosts returns whether the platform is running return code true code if the platform is running and code false code otherwise since 3 0 public static boolean is running return internal platform get default is running isrunning internalplatform getdefault isrunning returns a list of known system architectures p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getos arch code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of system architectures known to the system see getos arch since 3 0 public static string knownos arch values return internal platform get default knownos arch values getosarch getosarch knownosarchvalues internalplatform getdefault knownosarchvalues returns a list of known operating system names p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getos code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of operating systems known to the system see getos since 3 0 public static string knownos values return internal platform get default knownos values knownosvalues internalplatform getdefault knownosvalues returns a map of known platform line separators the keys are translated names of platforms and the values are their associated line separator strings return a map of platform to their line separator string since 3 1 public static map known platform line separators map result new hash map result put line separator key mac os 9 line separator value cr result put line separator key unix line separator value lf result put line separator key windows line separator value crlf return result knownplatformlineseparators hashmap line_separator_key_mac_os_9 line_separator_value_cr line_separator_key_unix line_separator_value_lf line_separator_key_windows line_separator_value_crlf returns a list of known windowing system names p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getws code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of window systems known to the system see getws since 3 0 public static string knownws values return internal platform get default knownws values knownwsvalues internalplatform getdefault knownwsvalues returns code true code if the platform is currently running in debug mode the platform is typically put in debug mode using the debug command line argument return whether or not the platform is running in debug mode since 3 0 public static boolean in debug mode return system get property osgi debug null non nls 1 indebugmode getproperty returns code true code if the platform is currently running in development mode that is if special procedures are to be taken when defining plug in class paths the platform is typically put in development mode using the dev command line argument return whether or not the platform is running in development mode since 3 0 public static boolean in development mode return system get property osgi dev null non nls 1 indevelopmentmode getproperty private constructor to block instance creation private platform super adds the given authorization information to the key ring the information is relevant for the specified protection space and the given authorization scheme the protection space is defined by the combination of the given server url and realm the authorization scheme determines what the authorization information contains and how it should be used the authorization information is a code map code of code string code to code string code and typically contains information such as user names and passwords param server url the url identifying the server for this authorization information for example http www example com param realm the subsection of the given server to which this authorization information applies for example realm1 example com or for no realm param auth scheme the scheme for which this authorization information applies for example basic or for no authorization scheme param info a code map code containing authorization information such as user names and passwords key type code string code value type code string code exception core exception if there are problems setting the authorization information reasons include ul li the keyring could not be saved li ul public static void add authorization info url server url string realm string auth scheme map info throws core exception internal platform get default add authorization info server url realm auth scheme info serverurl authscheme coreexception addauthorizationinfo serverurl authscheme coreexception internalplatform getdefault addauthorizationinfo serverurl authscheme adds the given log listener to the notification list of the platform p once registered a listener starts receiving notification as entries are added to plug in logs via code i log log code the listener continues to receive notifications until it is replaced or removed p param listener the listener to register see i log add log listener i log listener see remove log listener i log listener public static void add log listener i log listener listener internal platform get default add log listener listener ilog ilog addloglistener iloglistener removeloglistener iloglistener addloglistener iloglistener internalplatform getdefault addloglistener adds the specified resource to the protection space specified by the given realm all targets at or deeper than the depth of the last symbolic element in the path of the given resource url are assumed to be in the same protection space param resource url the url identifying the resources to be added to the specified protection space for example http www example com folder param realm the name of the protection space for example realm1 example com exception core exception if there are problems setting the authorization information reasons include ul li the key ring could not be saved li ul public static void add protection space url resource url string realm throws core exception internal platform get default add protection space resource url realm resourceurl coreexception addprotectionspace resourceurl coreexception internalplatform getdefault addprotectionspace resourceurl returns a url that is the local equivalent of the supplied url this method is expected to be used with the plug in relative ur ls returned by i plugin descriptor bundle get entry and platform find if the specified url is not a plug in relative url it is returned as is if the specified url is a plug in relative url of a file including jar archive it is returned as a locally accessible url using file protocol extracting caching the file locally if required if the specified url is a plug in relative url of a directory the directory and any files and directories under it are made locally accessible likewise if param url original plug in relative url return the resolved url exception io exception if unable to resolve url see resolve url see find bundle i path see bundle get entry string public static url as localurl url url throws io exception return internal platform get default as localurl url urls iplugindescriptor getentry ioexception ipath getentry aslocalurl ioexception internalplatform getdefault aslocalurl takes down the splash screen if one was put up public static void end splash internal platform get default end splash endsplash internalplatform getdefault endsplash removes the authorization information for the specified protection space and given authorization scheme the protection space is defined by the given server url and realm param server url the url identifying the server to remove the authorization information for for example http www example com param realm the subsection of the given server to remove the authorization information for for example realm1 example com or for no realm param auth scheme the scheme for which the authorization information to remove applies for example basic or for no authorization scheme exception core exception if there are problems removing the authorization information reasons include ul li the keyring could not be saved li ul public static void flush authorization info url server url string realm string auth scheme throws core exception internal platform get default flush authorization info server url realm auth scheme serverurl authscheme coreexception flushauthorizationinfo serverurl authscheme coreexception internalplatform getdefault flushauthorizationinfo serverurl authscheme returns the adapter manager used for extending code i adaptable code objects return the adapter manager for this platform see i adapter manager public static i adapter manager get adapter manager return internal platform get default get adapter manager iadaptable iadaptermanager iadaptermanager getadaptermanager internalplatform getdefault getadaptermanager returns the authorization information for the specified protection space and given authorization scheme the protection space is defined by the given server url and realm returns code null code if no such information exists param server url the url identifying the server for the authorization information for example http www example com param realm the subsection of the given server to which the authorization information applies for example realm1 example com or for no realm param auth scheme the scheme for which the authorization information applies for example basic or for no authorization scheme return the authorization information for the specified protection space and given authorization scheme or code null code if no such information exists public static map get authorization info url server url string realm string auth scheme return internal platform get default get authorization info server url realm auth scheme serverurl authscheme getauthorizationinfo serverurl authscheme internalplatform getdefault getauthorizationinfo serverurl authscheme returns the command line args provided to the eclipse runtime layer when it was first run the returned value does not include arguments consumed by the lower levels of eclipse e g os gi or the launcher note that individual platform runnables may be provided with different arguments if they are being run individually rather than with code platform run code return the command line used to start the platform public static string get command line args return internal platform get default get command line args osgi getcommandlineargs internalplatform getdefault getcommandlineargs returns the content type manager return the content type manager since 3 0 public static i content type manager get content type manager return internal platform get default get content type manager icontenttypemanager getcontenttypemanager internalplatform getdefault getcontenttypemanager returns the identified option code null code is returned if no such option is found options are specified in the general form i lt plug in id gt lt option path gt i for example code org eclipse core runtime debug code param option the name of the option to lookup return the value of the requested debug option or code null code public static string get debug option string option return internal platform get default get option option getdebugoption internalplatform getdefault getoption returns the location of the platform working directory p callers of this method should consider using code get instance location code instead in various typically non ide related configurations of eclipse the platform working directory may not be on the local file system as such the more general form of this location is as a url p return the location of the platform see get instance location public static i path get location throws illegal state exception return internal platform get default get location getinstancelocation getinstancelocation ipath getlocation illegalstateexception internalplatform getdefault getlocation returns the location of the platform log file this file may contain information about errors that have previously occurred during this invocation of the platform p it is recommended not to keep this value as the log location may vary when an instance location is being set p p note it is very important that users of this method do not leave the log file open for extended periods of time doing so may prevent others from writing to the log file which could result in important error messages being lost it is strongly recommended that clients wanting to read the log file for extended periods should copy the log file contents elsewhere and immediately close the original file p return the path of the log file on disk public static i path get log file location return internal platform get default get meta area get log location ipath getlogfilelocation internalplatform getdefault getmetaarea getloglocation returns the plug in runtime object for the identified plug in or code null code if no such plug in can be found if the plug in is defined but not yet activated the plug in will be activated before being returned p b note b this method is only able to find and return plug in objects for plug ins described using plugin xml according to the traditional eclipse conventions eclipse 3 0 permits plug ins to be described in manifest mf files and to define their own bundle activators such plug ins cannot be discovered by this method p param id the unique identifier of the desired plug in e g code com example acme code return the plug in runtime object or code null code deprecated this method only works if the compatibility layer is installed and must not be used otherwise see the comments on link i plugin descriptor get plugin for details public static plugin get plugin string id try i plugin registry registry get plugin registry if registry null throw new illegal state exception i plugin descriptor pd registry get plugin descriptor id if pd null return null return pd get plugin catch core exception e todo log the exception return null iplugindescriptor getplugin getplugin ipluginregistry getpluginregistry illegalstateexception iplugindescriptor getplugindescriptor getplugin coreexception returns the plug in registry for this platform return the plug in registry see i plugin registry deprecated code i plugin registry code was refactored in eclipse 3 0 this method only works if the compatibility layer is installed and must not be used otherwise see the comments on link i plugin registry and its methods for details public static i plugin registry get plugin registry bundle compatibility internal platform get default get bundle compatibility helper pi runtime compatibility if compatibility null throw new illegal state exception class old internal platform null try old internal platform compatibility load class org eclipse core internal plugins internal platform non nls 1 method get plugin registry old internal platform get method get plugin registry null non nls 1 return i plugin registry get plugin registry invoke old internal platform null catch exception e ignore the exceptions return null return null ipluginregistry ipluginregistry ipluginregistry ipluginregistry getpluginregistry internalplatform getdefault getbundle compatibilityhelper pi_runtime_compatibility illegalstateexception oldinternalplatform oldinternalplatform loadclass internalplatform getpluginregistry oldinternalplatform getmethod getpluginregistry ipluginregistry getpluginregistry oldinternalplatform returns the location in the local file system of the plug in state area for the given plug in the platform must be running p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings p param plugin the plug in whose state location is returned return a local file system path public static i path get plugin state location plugin plugin return plugin get state location ipath getpluginstatelocation getstatelocation returns the protection space realm for the specified resource or code null code if the realm is unknown param resource url the url of the resource whose protection space is returned for example http www example com folder return the protection space realm for the specified resource or code null code if the realm is unknown public static string get protection space url resource url return internal platform get default get protection space resource url resourceurl getprotectionspace resourceurl internalplatform getdefault getprotectionspace resourceurl removes the indicated identical log listener from the notification list of the platform if no such listener exists no action is taken param listener the listener to de register see i log remove log listener i log listener see add log listener i log listener public static void remove log listener i log listener listener internal platform get default remove log listener listener ilog removeloglistener iloglistener addloglistener iloglistener removeloglistener iloglistener internalplatform getdefault removeloglistener returns a url which is the resolved equivalent of the supplied url this method is expected to be used with the plug in relative ur ls returned by i plugin descriptor bundle get entry and platform find p if the specified url is not a plug in relative url it is returned as is if the specified url is a plug in relative url this method attempts to reduce the given url to one which is native to the java class library eg file http etc p p note however that users of this api should not assume too much about the results of this method while it may consistently return a file url in certain installation configurations others may result in jar or http ur ls p param url original plug in relative url return the resolved url exception io exception if unable to resolve url see as localurl url see find bundle i path see bundle get entry string public static url resolve url url throws io exception return internal platform get default resolve url urls iplugindescriptor getentry urls ioexception aslocalurl ipath getentry ioexception internalplatform getdefault runs the given runnable in a protected mode exceptions thrown in the runnable are logged and passed to the runnable s exception handler such exceptions are not rethrown by this method param runnable the runnable to run public static void run i safe runnable runnable internal platform get default run runnable isaferunnable internalplatform getdefault returns the platform job manager return the platform s job manager since 3 0 public static i job manager get job manager return internal platform get default get job manager ijobmanager getjobmanager internalplatform getdefault getjobmanager returns the extension registry for this platform return the extension registry see i extension registry since 3 0 public static i extension registry get extension registry return internal platform get default get registry iextensionregistry iextensionregistry getextensionregistry internalplatform getdefault getregistry returns a url for the given path in the given bundle returns code null code if the url could not be computed or created param bundle the bundle in which to search param path path relative to plug in installation location return a url for the given path or code null code the actual form of the returned url is not specified see find bundle i path map see resolve url see as localurl url since 3 0 public static url find bundle bundle i path path return find support find bundle path null ipath aslocalurl ipath findsupport returns a url for the given path in the given bundle returns code null code if the url could not be computed or created p find looks for this path in given bundle and any attached fragments code null code is returned if no such entry is found note that there is no specific order to the fragments p p the following arguments may also be used pre nl for language specific information os for operating system specific information ws for windowing system specific information pre p p a path of nl about properties in an environment with a default locale of en ca will return a url corresponding to the first place about properties is found according to the following order pre plugin root nl en ca about properties fragment1 root nl en ca about properties fragment2 root nl en ca about properties plugin root nl en about properties fragment1 root nl en about properties fragment2 root nl en about properties plugin root about properties fragment1 root about properties fragment2 root about properties pre p p the current environment variable values can be overridden using the override map argument p param bundle the bundle in which to search param path file path relative to plug in installation location param override map of override substitution arguments to be used for any arg path elements the map keys correspond to the substitution arguments eg nl or os the resulting values must be of type java lang string if the map is code null code or does not contain the required substitution argument the default is used return a url for the given path or code null code the actual form of the returned url is not specified see resolve url see as localurl url since 3 0 public static url find bundle bundle i path path map override return find support find bundle path override en_ca aslocalurl ipath findsupport returns the location in the local file system of the plug in state area for the given bundle if the plug in state area did not exist prior to this call it is created p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings and other configuration parameters p param bundle the bundle whose state location if returned return a local file system path since 3 0 public static i path get state location bundle bundle return internal platform get default get state location bundle ipath getstatelocation internalplatform getdefault getstatelocation returns a number that changes whenever the set of installed plug ins changes this can be used for invalidating caches that are based on the set of currently installed plug ins e g extensions return a number related to the set of installed plug ins since 3 1 public static long get state stamp return internal platform get default get state time stamp getstatestamp internalplatform getdefault getstatetimestamp returns the log for the given bundle if no such log exists one is created param bundle the bundle whose log is returned return the log for the given bundle since 3 0 public static i log get log bundle bundle return internal platform get default get log bundle ilog getlog internalplatform getdefault getlog returns the given bundle s resource bundle for the current locale p this resource bundle is typically stored as the plugin properties file in the plug in itself and contains any translatable strings used in the plug in manifest file plugin xml p p this mechanism is intended only for externalizing strings found in the plug in manifest file using this method for externalizing strings in your code may result in degraded memory performance p param bundle the bundle whose resource bundle is being queried return the resource bundle exception missing resource exception if the resource bundle was not found since 3 0 public static resource bundle get resource bundle bundle bundle throws missing resource exception return internal platform get default get resource bundle bundle missingresourceexception resourcebundle getresourcebundle missingresourceexception internalplatform getdefault getresourcebundle returns a resource string corresponding to the given argument value if the argument value specifies a resource key the string is looked up in the default resource bundle for the given runtime bundle if the argument does not specify a valid key the argument itself is returned as the resource string the key lookup is performed in the file referenced in the bundle localization header of the bundle manifest if a resource string corresponding to the key is not found in the resource bundle the key value or any default text following the key in the argument value is returned as the resource string a key is identified as a string beginning with the character note that the character is stripped off prior to lookup in the resource bundle p equivalent to code get resource string bundle value get resource bundle code p param bundle the bundle whose resource bundle is being queried param value the value to look for return the resource string see get resource bundle bundle since 3 0 public static string get resource string bundle bundle string value return internal platform get default get resource string bundle value getresourcestring getresourcebundle getresourcebundle getresourcestring internalplatform getdefault getresourcestring returns a resource string corresponding to the given argument value and resource bundle in the given runtime bundle if the argument value specifies a resource key the string is looked up in the given resource bundle if the argument does not specify a valid key the argument itself is returned as the resource string the key lookup is performed against the specified resource bundle if a resource string corresponding to the key is not found in the resource bundle the key value or any default text following the key in the argument value is returned as the resource string a key is identified as a string beginning with the character note that the character is stripped off prior to lookup in the resource bundle p for example assume resource bundle plugin properties contains name project name pre get resource string hello world returns hello world li get resource string name returns project name li get resource string name hello world returns project name li get resource string abcd hello world returns hello world li get resource string abcd returns abcd li get resource string name returns name li pre p param bundle the bundle whose resource bundle is being queried param value the value param resource bundle the resource bundle to query return the resource string see get resource bundle bundle since 3 0 public static string get resource string bundle bundle string value resource bundle resource bundle return internal platform get default get resource string bundle value resource bundle getresourcestring getresourcestring getresourcestring getresourcestring getresourcestring getresourcestring resourcebundle getresourcebundle getresourcestring resourcebundle resourcebundle internalplatform getdefault getresourcestring resourcebundle returns the string name of the current system architecture the value is a user defined string if the architecture is specified on the command line otherwise it is the value returned by code java lang system get property os arch code return the string name of the current system architecture since 3 0 public static string getos arch return internal platform get default getos arch getproperty getosarch internalplatform getdefault getosarch returns the string name of the current locale for use in finding files whose path starts with code nl code return the string name of the current locale since 3 0 public static string getnl return internal platform get default getnl internalplatform getdefault returns the string name of the current operating system for use in finding files whose path starts with code os code code os unknown code is returned if the operating system cannot be determined the value may indicate one of the operating systems known to the platform as specified in code knownos values code or a user defined string if the operating system name is specified on the command line return the string name of the current operating system since 3 0 public static string getos return internal platform get default getos os_unknown knownosvalues internalplatform getdefault returns the string name of the current window system for use in finding files whose path starts with code ws code code null code is returned if the window system cannot be determined return the string name of the current window system or code null code since 3 0 public static string getws return internal platform get default getws internalplatform getdefault returns the arguments not consumed by the framework implementation itself which arguments are consumed is implementation specific these arguments are available for use by the application return the array of command line arguments not consumed by the framework since 3 0 public static string get application args return internal platform get default get application args getapplicationargs internalplatform getdefault getapplicationargs returns the platform administrator for this running eclipse p note this is an internal method and em must not em be used by clients which are not part of the eclipse platform this method allows access to classes which are not eclipse platform api but are part of the os gi runtime that the eclipse platform is built on even as the eclipse platform evolves in compatible ways from release to release the details of the os gi implementation might not p return the platform admin for this instance of eclipse since 3 0 public static platform admin get platform admin return internal platform get default get platform admin osgi osgi platformadmin getplatformadmin internalplatform getdefault getplatformadmin returns the location of the platform s working directory also known as the instance data area code null code is returned if the platform is running without an instance location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi instance area p return the location of the platform s instance data area or code null code if none since 3 0 public static location get instance location return internal platform get default get instance location getinstancelocation internalplatform getdefault getinstancelocation returns the currently registered bundle group providers return the currently registered bundle group providers since 3 0 public static i bundle group provider get bundle group providers return internal platform get default get bundle group providers ibundlegroupprovider getbundlegroupproviders internalplatform getdefault getbundlegroupproviders return the interface into the preference mechanism the returned object can be used for such operations as searching for preference values across multiple scopes and preference import export return an object to interface into the preference mechanism since 3 0 public static i preferences service get preferences service return internal platform get default get preferences service ipreferencesservice getpreferencesservice internalplatform getdefault getpreferencesservice returns the product which was selected when running this eclipse instance or code null code if none return the current product or code null code if none since 3 0 public static i product get product return internal platform get default get product iproduct getproduct internalplatform getdefault getproduct registers the given bundle group provider with the platform param provider a provider to register since 3 0 public static void register bundle group provider i bundle group provider provider internal platform get default register bundle group provider provider registerbundlegroupprovider ibundlegroupprovider internalplatform getdefault registerbundlegroupprovider de registers the given bundle group provider with the platform param provider a provider to de register since 3 0 public static void unregister bundle group provider i bundle group provider provider internal platform get default unregister bundle group provider provider unregisterbundlegroupprovider ibundlegroupprovider internalplatform getdefault unregisterbundlegroupprovider returns the location of the configuration information used to run this instance of eclipse the configuration area typically contains the list of plug ins available for use various settings those shared across different instances of the same configuration and any other such data needed by plug ins code null code is returned if the platform is running without a configuration location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi configuration area p return the location of the platform s configuration data area or code null code if none since 3 0 public static location get configuration location return internal platform get default get configuration location getconfigurationlocation internalplatform getdefault getconfigurationlocation returns the location of the platform s user data area the user data area is a location on the system which is specific to the system s current user by default it is located relative to the location given by the system property user home code null code is returned if the platform is running without an user location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi user area p return the location of the platform s user data area or code null code if none since 3 0 public static location get user location return internal platform get default get user location getuserlocation internalplatform getdefault getuserlocation returns the location of the base installation for the running platform code null code is returned if the platform is running without a configuration location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi install area p return the location of the platform s installation area or code null code if none since 3 0 public static location get install location return internal platform get default get install location getinstalllocation internalplatform getdefault getinstalllocation checks if the specified bundle is a fragment bundle param bundle the bundle to query return true if the specified bundle is a fragment bundle otherwise false is returned since 3 0 public static boolean is fragment bundle bundle return internal platform get default is fragment bundle isfragment internalplatform getdefault isfragment returns an array of attached fragment bundles for the specified bundle if the specified bundle is a fragment then tt null tt is returned if no fragments are attached to the specified bundle then tt null tt is returned param bundle the bundle to get the attached fragment bundles for return an array of fragment bundles or tt null tt if the bundle does not have any attached fragment bundles since 3 0 public static bundle get fragments bundle bundle return internal platform get default get fragments bundle getfragments internalplatform getdefault getfragments returns the resolved bundle with the specified symbolic name that has the highest version if no resolved bundles are installed that have the specified symbolic name then null is returned param symbolic name the symbolic name of the bundle to be returned return the bundle that has the specified symbolic name with the highest version or tt null tt if no bundle is found since 3 0 public static bundle get bundle string symbolic name return internal platform get default get bundle symbolic name symbolicname getbundle symbolicname internalplatform getdefault getbundle symbolicname returns all bundles with the specified symbolic name if no resolved bundles with the specified symbolic name can be found tt null tt is returned if the version argument is not null then only the bundles that have the specified symbolic name and a version greater than or equal to the specified version are returned the returned bundles are ordered in descending bundle version order param symbolic name the symbolic name of the bundles that are to be returned param version the version that the return bundle versions must match or tt null tt if no version matching is to be done return the array of bundles with the specified name that match the specified version and match rule or tt null tt if no bundles are found public static bundle get bundles string symbolic name string version return internal platform get default get bundles symbolic name version symbolicname getbundles symbolicname internalplatform getdefault getbundles symbolicname returns an array of host bundles that the specified fragment bundle is attached to or tt null tt if the specified bundle is not attached to a host if the bundle is not a fragment bundle then tt null tt is returned param bundle the bundle to get the host bundles for return an array of host bundles or null if the bundle does not have any host bundles since 3 0 public static bundle get hosts bundle bundle return internal platform get default get hosts bundle gethosts internalplatform getdefault gethosts returns whether the platform is running return code true code if the platform is running and code false code otherwise since 3 0 public static boolean is running return internal platform get default is running isrunning internalplatform getdefault isrunning returns a list of known system architectures p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getos arch code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of system architectures known to the system see getos arch since 3 0 public static string knownos arch values return internal platform get default knownos arch values getosarch getosarch knownosarchvalues internalplatform getdefault knownosarchvalues returns a list of known operating system names p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getos code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of operating systems known to the system see getos since 3 0 public static string knownos values return internal platform get default knownos values knownosvalues internalplatform getdefault knownosvalues returns a map of known platform line separators the keys are translated names of platforms and the values are their associated line separator strings return a map of platform to their line separator string since 3 1 public static map known platform line separators map result new hash map result put line separator key mac os 9 line separator value cr result put line separator key unix line separator value lf result put line separator key windows line separator value crlf return result knownplatformlineseparators hashmap line_separator_key_mac_os_9 line_separator_value_cr line_separator_key_unix line_separator_value_lf line_separator_key_windows line_separator_value_crlf returns a list of known windowing system names p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getws code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of window systems known to the system see getws since 3 0 public static string knownws values return internal platform get default knownws values knownwsvalues internalplatform getdefault knownwsvalues returns code true code if the platform is currently running in debug mode the platform is typically put in debug mode using the debug command line argument return whether or not the platform is running in debug mode since 3 0 public static boolean in debug mode return system get property osgi debug null non nls 1 indebugmode getproperty returns code true code if the platform is currently running in development mode that is if special procedures are to be taken when defining plug in class paths the platform is typically put in development mode using the dev command line argument return whether or not the platform is running in development mode since 3 0 public static boolean in development mode return system get property osgi dev null non nls 1 indevelopmentmode getproperty private constructor to block instance creation private platform super adds the given authorization information to the key ring the information is relevant for the specified protection space and the given authorization scheme the protection space is defined by the combination of the given server url and realm the authorization scheme determines what the authorization information contains and how it should be used the authorization information is a code map code of code string code to code string code and typically contains information such as user names and passwords param server url the url identifying the server for this authorization information for example http www example com param realm the subsection of the given server to which this authorization information applies for example realm1 example com or for no realm param auth scheme the scheme for which this authorization information applies for example basic or for no authorization scheme param info a code map code containing authorization information such as user names and passwords key type code string code value type code string code exception core exception if there are problems setting the authorization information reasons include ul li the keyring could not be saved li ul public static void add authorization info url server url string realm string auth scheme map info throws core exception internal platform get default add authorization info server url realm auth scheme info serverurl authscheme coreexception addauthorizationinfo serverurl authscheme coreexception internalplatform getdefault addauthorizationinfo serverurl authscheme adds the given log listener to the notification list of the platform p once registered a listener starts receiving notification as entries are added to plug in logs via code i log log code the listener continues to receive notifications until it is replaced or removed p param listener the listener to register see i log add log listener i log listener see remove log listener i log listener public static void add log listener i log listener listener internal platform get default add log listener listener ilog ilog addloglistener iloglistener removeloglistener iloglistener addloglistener iloglistener internalplatform getdefault addloglistener adds the specified resource to the protection space specified by the given realm all targets at or deeper than the depth of the last symbolic element in the path of the given resource url are assumed to be in the same protection space param resource url the url identifying the resources to be added to the specified protection space for example http www example com folder param realm the name of the protection space for example realm1 example com exception core exception if there are problems setting the authorization information reasons include ul li the key ring could not be saved li ul public static void add protection space url resource url string realm throws core exception internal platform get default add protection space resource url realm resourceurl coreexception addprotectionspace resourceurl coreexception internalplatform getdefault addprotectionspace resourceurl returns a url that is the local equivalent of the supplied url this method is expected to be used with the plug in relative ur ls returned by i plugin descriptor bundle get entry and platform find if the specified url is not a plug in relative url it is returned as is if the specified url is a plug in relative url of a file including jar archive it is returned as a locally accessible url using file protocol extracting caching the file locally if required if the specified url is a plug in relative url of a directory the directory and any files and directories under it are made locally accessible likewise if param url original plug in relative url return the resolved url exception io exception if unable to resolve url see resolve url see find bundle i path see bundle get entry string public static url as localurl url url throws io exception return internal platform get default as localurl url urls iplugindescriptor getentry ioexception ipath getentry aslocalurl ioexception internalplatform getdefault aslocalurl takes down the splash screen if one was put up public static void end splash internal platform get default end splash endsplash internalplatform getdefault endsplash removes the authorization information for the specified protection space and given authorization scheme the protection space is defined by the given server url and realm param server url the url identifying the server to remove the authorization information for for example http www example com param realm the subsection of the given server to remove the authorization information for for example realm1 example com or for no realm param auth scheme the scheme for which the authorization information to remove applies for example basic or for no authorization scheme exception core exception if there are problems removing the authorization information reasons include ul li the keyring could not be saved li ul public static void flush authorization info url server url string realm string auth scheme throws core exception internal platform get default flush authorization info server url realm auth scheme serverurl authscheme coreexception flushauthorizationinfo serverurl authscheme coreexception internalplatform getdefault flushauthorizationinfo serverurl authscheme returns the adapter manager used for extending code i adaptable code objects return the adapter manager for this platform see i adapter manager public static i adapter manager get adapter manager return internal platform get default get adapter manager iadaptable iadaptermanager iadaptermanager getadaptermanager internalplatform getdefault getadaptermanager returns the authorization information for the specified protection space and given authorization scheme the protection space is defined by the given server url and realm returns code null code if no such information exists param server url the url identifying the server for the authorization information for example http www example com param realm the subsection of the given server to which the authorization information applies for example realm1 example com or for no realm param auth scheme the scheme for which the authorization information applies for example basic or for no authorization scheme return the authorization information for the specified protection space and given authorization scheme or code null code if no such information exists public static map get authorization info url server url string realm string auth scheme return internal platform get default get authorization info server url realm auth scheme serverurl authscheme getauthorizationinfo serverurl authscheme internalplatform getdefault getauthorizationinfo serverurl authscheme returns the command line args provided to the eclipse runtime layer when it was first run the returned value does not include arguments consumed by the lower levels of eclipse e g os gi or the launcher note that individual platform runnables may be provided with different arguments if they are being run individually rather than with code platform run code return the command line used to start the platform public static string get command line args return internal platform get default get command line args osgi getcommandlineargs internalplatform getdefault getcommandlineargs returns the content type manager return the content type manager since 3 0 public static i content type manager get content type manager return internal platform get default get content type manager icontenttypemanager getcontenttypemanager internalplatform getdefault getcontenttypemanager returns the identified option code null code is returned if no such option is found options are specified in the general form i lt plug in id gt lt option path gt i for example code org eclipse core runtime debug code param option the name of the option to lookup return the value of the requested debug option or code null code public static string get debug option string option return internal platform get default get option option getdebugoption internalplatform getdefault getoption returns the location of the platform working directory p callers of this method should consider using code get instance location code instead in various typically non ide related configurations of eclipse the platform working directory may not be on the local file system as such the more general form of this location is as a url p return the location of the platform see get instance location public static i path get location throws illegal state exception return internal platform get default get location getinstancelocation getinstancelocation ipath getlocation illegalstateexception internalplatform getdefault getlocation returns the location of the platform log file this file may contain information about errors that have previously occurred during this invocation of the platform p it is recommended not to keep this value as the log location may vary when an instance location is being set p p note it is very important that users of this method do not leave the log file open for extended periods of time doing so may prevent others from writing to the log file which could result in important error messages being lost it is strongly recommended that clients wanting to read the log file for extended periods should copy the log file contents elsewhere and immediately close the original file p return the path of the log file on disk public static i path get log file location return internal platform get default get meta area get log location ipath getlogfilelocation internalplatform getdefault getmetaarea getloglocation returns the plug in runtime object for the identified plug in or code null code if no such plug in can be found if the plug in is defined but not yet activated the plug in will be activated before being returned p b note b this method is only able to find and return plug in objects for plug ins described using plugin xml according to the traditional eclipse conventions eclipse 3 0 permits plug ins to be described in manifest mf files and to define their own bundle activators such plug ins cannot be discovered by this method p param id the unique identifier of the desired plug in e g code com example acme code return the plug in runtime object or code null code deprecated this method only works if the compatibility layer is installed and must not be used otherwise see the comments on link i plugin descriptor get plugin for details public static plugin get plugin string id try i plugin registry registry get plugin registry if registry null throw new illegal state exception i plugin descriptor pd registry get plugin descriptor id if pd null return null return pd get plugin catch core exception e todo log the exception return null iplugindescriptor getplugin getplugin ipluginregistry getpluginregistry illegalstateexception iplugindescriptor getplugindescriptor getplugin coreexception returns the plug in registry for this platform return the plug in registry see i plugin registry deprecated code i plugin registry code was refactored in eclipse 3 0 this method only works if the compatibility layer is installed and must not be used otherwise see the comments on link i plugin registry and its methods for details public static i plugin registry get plugin registry bundle compatibility internal platform get default get bundle compatibility helper pi runtime compatibility if compatibility null throw new illegal state exception class old internal platform null try old internal platform compatibility load class org eclipse core internal plugins internal platform non nls 1 method get plugin registry old internal platform get method get plugin registry null non nls 1 return i plugin registry get plugin registry invoke old internal platform null catch exception e ignore the exceptions return null return null ipluginregistry ipluginregistry ipluginregistry ipluginregistry getpluginregistry internalplatform getdefault getbundle compatibilityhelper pi_runtime_compatibility illegalstateexception oldinternalplatform oldinternalplatform loadclass internalplatform getpluginregistry oldinternalplatform getmethod getpluginregistry ipluginregistry getpluginregistry oldinternalplatform returns the location in the local file system of the plug in state area for the given plug in the platform must be running p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings p param plugin the plug in whose state location is returned return a local file system path public static i path get plugin state location plugin plugin return plugin get state location ipath getpluginstatelocation getstatelocation returns the protection space realm for the specified resource or code null code if the realm is unknown param resource url the url of the resource whose protection space is returned for example http www example com folder return the protection space realm for the specified resource or code null code if the realm is unknown public static string get protection space url resource url return internal platform get default get protection space resource url resourceurl getprotectionspace resourceurl internalplatform getdefault getprotectionspace resourceurl removes the indicated identical log listener from the notification list of the platform if no such listener exists no action is taken param listener the listener to de register see i log remove log listener i log listener see add log listener i log listener public static void remove log listener i log listener listener internal platform get default remove log listener listener ilog removeloglistener iloglistener addloglistener iloglistener removeloglistener iloglistener internalplatform getdefault removeloglistener returns a url which is the resolved equivalent of the supplied url this method is expected to be used with the plug in relative ur ls returned by i plugin descriptor bundle get entry and platform find p if the specified url is not a plug in relative url it is returned as is if the specified url is a plug in relative url this method attempts to reduce the given url to one which is native to the java class library eg file http etc p p note however that users of this api should not assume too much about the results of this method while it may consistently return a file url in certain installation configurations others may result in jar or http ur ls p param url original plug in relative url return the resolved url exception io exception if unable to resolve url see as localurl url see find bundle i path see bundle get entry string public static url resolve url url throws io exception return internal platform get default resolve url urls iplugindescriptor getentry urls ioexception aslocalurl ipath getentry ioexception internalplatform getdefault runs the given runnable in a protected mode exceptions thrown in the runnable are logged and passed to the runnable s exception handler such exceptions are not rethrown by this method param runnable the runnable to run public static void run i safe runnable runnable internal platform get default run runnable isaferunnable internalplatform getdefault returns the platform job manager return the platform s job manager since 3 0 public static i job manager get job manager return internal platform get default get job manager ijobmanager getjobmanager internalplatform getdefault getjobmanager returns the extension registry for this platform return the extension registry see i extension registry since 3 0 public static i extension registry get extension registry return internal platform get default get registry iextensionregistry iextensionregistry getextensionregistry internalplatform getdefault getregistry returns a url for the given path in the given bundle returns code null code if the url could not be computed or created param bundle the bundle in which to search param path path relative to plug in installation location return a url for the given path or code null code the actual form of the returned url is not specified see find bundle i path map see resolve url see as localurl url since 3 0 public static url find bundle bundle i path path return find support find bundle path null ipath aslocalurl ipath findsupport returns a url for the given path in the given bundle returns code null code if the url could not be computed or created p find looks for this path in given bundle and any attached fragments code null code is returned if no such entry is found note that there is no specific order to the fragments p p the following arguments may also be used pre nl for language specific information os for operating system specific information ws for windowing system specific information pre p p a path of nl about properties in an environment with a default locale of en ca will return a url corresponding to the first place about properties is found according to the following order pre plugin root nl en ca about properties fragment1 root nl en ca about properties fragment2 root nl en ca about properties plugin root nl en about properties fragment1 root nl en about properties fragment2 root nl en about properties plugin root about properties fragment1 root about properties fragment2 root about properties pre p p the current environment variable values can be overridden using the override map argument p param bundle the bundle in which to search param path file path relative to plug in installation location param override map of override substitution arguments to be used for any arg path elements the map keys correspond to the substitution arguments eg nl or os the resulting values must be of type java lang string if the map is code null code or does not contain the required substitution argument the default is used return a url for the given path or code null code the actual form of the returned url is not specified see resolve url see as localurl url since 3 0 public static url find bundle bundle i path path map override return find support find bundle path override en_ca aslocalurl ipath findsupport returns the location in the local file system of the plug in state area for the given bundle if the plug in state area did not exist prior to this call it is created p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings and other configuration parameters p param bundle the bundle whose state location if returned return a local file system path since 3 0 public static i path get state location bundle bundle return internal platform get default get state location bundle ipath getstatelocation internalplatform getdefault getstatelocation returns a number that changes whenever the set of installed plug ins changes this can be used for invalidating caches that are based on the set of currently installed plug ins e g extensions return a number related to the set of installed plug ins since 3 1 public static long get state stamp return internal platform get default get state time stamp getstatestamp internalplatform getdefault getstatetimestamp returns the log for the given bundle if no such log exists one is created param bundle the bundle whose log is returned return the log for the given bundle since 3 0 public static i log get log bundle bundle return internal platform get default get log bundle ilog getlog internalplatform getdefault getlog returns the given bundle s resource bundle for the current locale p this resource bundle is typically stored as the plugin properties file in the plug in itself and contains any translatable strings used in the plug in manifest file plugin xml p p this mechanism is intended only for externalizing strings found in the plug in manifest file using this method for externalizing strings in your code may result in degraded memory performance p param bundle the bundle whose resource bundle is being queried return the resource bundle exception missing resource exception if the resource bundle was not found since 3 0 public static resource bundle get resource bundle bundle bundle throws missing resource exception return internal platform get default get resource bundle bundle missingresourceexception resourcebundle getresourcebundle missingresourceexception internalplatform getdefault getresourcebundle returns a resource string corresponding to the given argument value if the argument value specifies a resource key the string is looked up in the default resource bundle for the given runtime bundle if the argument does not specify a valid key the argument itself is returned as the resource string the key lookup is performed in the file referenced in the bundle localization header of the bundle manifest if a resource string corresponding to the key is not found in the resource bundle the key value or any default text following the key in the argument value is returned as the resource string a key is identified as a string beginning with the character note that the character is stripped off prior to lookup in the resource bundle p equivalent to code get resource string bundle value get resource bundle code p param bundle the bundle whose resource bundle is being queried param value the value to look for return the resource string see get resource bundle bundle since 3 0 public static string get resource string bundle bundle string value return internal platform get default get resource string bundle value getresourcestring getresourcebundle getresourcebundle getresourcestring internalplatform getdefault getresourcestring returns a resource string corresponding to the given argument value and resource bundle in the given runtime bundle if the argument value specifies a resource key the string is looked up in the given resource bundle if the argument does not specify a valid key the argument itself is returned as the resource string the key lookup is performed against the specified resource bundle if a resource string corresponding to the key is not found in the resource bundle the key value or any default text following the key in the argument value is returned as the resource string a key is identified as a string beginning with the character note that the character is stripped off prior to lookup in the resource bundle p for example assume resource bundle plugin properties contains name project name pre get resource string hello world returns hello world li get resource string name returns project name li get resource string name hello world returns project name li get resource string abcd hello world returns hello world li get resource string abcd returns abcd li get resource string name returns name li pre p param bundle the bundle whose resource bundle is being queried param value the value param resource bundle the resource bundle to query return the resource string see get resource bundle bundle since 3 0 public static string get resource string bundle bundle string value resource bundle resource bundle return internal platform get default get resource string bundle value resource bundle getresourcestring getresourcestring getresourcestring getresourcestring getresourcestring getresourcestring resourcebundle getresourcebundle getresourcestring resourcebundle resourcebundle internalplatform getdefault getresourcestring resourcebundle returns the string name of the current system architecture the value is a user defined string if the architecture is specified on the command line otherwise it is the value returned by code java lang system get property os arch code return the string name of the current system architecture since 3 0 public static string getos arch return internal platform get default getos arch getproperty getosarch internalplatform getdefault getosarch returns the string name of the current locale for use in finding files whose path starts with code nl code return the string name of the current locale since 3 0 public static string getnl return internal platform get default getnl internalplatform getdefault returns the string name of the current operating system for use in finding files whose path starts with code os code code os unknown code is returned if the operating system cannot be determined the value may indicate one of the operating systems known to the platform as specified in code knownos values code or a user defined string if the operating system name is specified on the command line return the string name of the current operating system since 3 0 public static string getos return internal platform get default getos os_unknown knownosvalues internalplatform getdefault returns the string name of the current window system for use in finding files whose path starts with code ws code code null code is returned if the window system cannot be determined return the string name of the current window system or code null code since 3 0 public static string getws return internal platform get default getws internalplatform getdefault returns the arguments not consumed by the framework implementation itself which arguments are consumed is implementation specific these arguments are available for use by the application return the array of command line arguments not consumed by the framework since 3 0 public static string get application args return internal platform get default get application args getapplicationargs internalplatform getdefault getapplicationargs returns the platform administrator for this running eclipse p note this is an internal method and em must not em be used by clients which are not part of the eclipse platform this method allows access to classes which are not eclipse platform api but are part of the os gi runtime that the eclipse platform is built on even as the eclipse platform evolves in compatible ways from release to release the details of the os gi implementation might not p return the platform admin for this instance of eclipse since 3 0 public static platform admin get platform admin return internal platform get default get platform admin osgi osgi platformadmin getplatformadmin internalplatform getdefault getplatformadmin returns the location of the platform s working directory also known as the instance data area code null code is returned if the platform is running without an instance location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi instance area p return the location of the platform s instance data area or code null code if none since 3 0 public static location get instance location return internal platform get default get instance location getinstancelocation internalplatform getdefault getinstancelocation returns the currently registered bundle group providers return the currently registered bundle group providers since 3 0 public static i bundle group provider get bundle group providers return internal platform get default get bundle group providers ibundlegroupprovider getbundlegroupproviders internalplatform getdefault getbundlegroupproviders return the interface into the preference mechanism the returned object can be used for such operations as searching for preference values across multiple scopes and preference import export return an object to interface into the preference mechanism since 3 0 public static i preferences service get preferences service return internal platform get default get preferences service ipreferencesservice getpreferencesservice internalplatform getdefault getpreferencesservice returns the product which was selected when running this eclipse instance or code null code if none return the current product or code null code if none since 3 0 public static i product get product return internal platform get default get product iproduct getproduct internalplatform getdefault getproduct registers the given bundle group provider with the platform param provider a provider to register since 3 0 public static void register bundle group provider i bundle group provider provider internal platform get default register bundle group provider provider registerbundlegroupprovider ibundlegroupprovider internalplatform getdefault registerbundlegroupprovider de registers the given bundle group provider with the platform param provider a provider to de register since 3 0 public static void unregister bundle group provider i bundle group provider provider internal platform get default unregister bundle group provider provider unregisterbundlegroupprovider ibundlegroupprovider internalplatform getdefault unregisterbundlegroupprovider returns the location of the configuration information used to run this instance of eclipse the configuration area typically contains the list of plug ins available for use various settings those shared across different instances of the same configuration and any other such data needed by plug ins code null code is returned if the platform is running without a configuration location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi configuration area p return the location of the platform s configuration data area or code null code if none since 3 0 public static location get configuration location return internal platform get default get configuration location getconfigurationlocation internalplatform getdefault getconfigurationlocation returns the location of the platform s user data area the user data area is a location on the system which is specific to the system s current user by default it is located relative to the location given by the system property user home code null code is returned if the platform is running without an user location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi user area p return the location of the platform s user data area or code null code if none since 3 0 public static location get user location return internal platform get default get user location getuserlocation internalplatform getdefault getuserlocation returns the location of the base installation for the running platform code null code is returned if the platform is running without a configuration location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi install area p return the location of the platform s installation area or code null code if none since 3 0 public static location get install location return internal platform get default get install location getinstalllocation internalplatform getdefault getinstalllocation checks if the specified bundle is a fragment bundle param bundle the bundle to query return true if the specified bundle is a fragment bundle otherwise false is returned since 3 0 public static boolean is fragment bundle bundle return internal platform get default is fragment bundle isfragment internalplatform getdefault isfragment returns an array of attached fragment bundles for the specified bundle if the specified bundle is a fragment then tt null tt is returned if no fragments are attached to the specified bundle then tt null tt is returned param bundle the bundle to get the attached fragment bundles for return an array of fragment bundles or tt null tt if the bundle does not have any attached fragment bundles since 3 0 public static bundle get fragments bundle bundle return internal platform get default get fragments bundle getfragments internalplatform getdefault getfragments returns the resolved bundle with the specified symbolic name that has the highest version if no resolved bundles are installed that have the specified symbolic name then null is returned param symbolic name the symbolic name of the bundle to be returned return the bundle that has the specified symbolic name with the highest version or tt null tt if no bundle is found since 3 0 public static bundle get bundle string symbolic name return internal platform get default get bundle symbolic name symbolicname getbundle symbolicname internalplatform getdefault getbundle symbolicname returns all bundles with the specified symbolic name if no resolved bundles with the specified symbolic name can be found tt null tt is returned if the version argument is not null then only the bundles that have the specified symbolic name and a version greater than or equal to the specified version are returned the returned bundles are ordered in descending bundle version order param symbolic name the symbolic name of the bundles that are to be returned param version the version that the return bundle versions must match or tt null tt if no version matching is to be done return the array of bundles with the specified name that match the specified version and match rule or tt null tt if no bundles are found public static bundle get bundles string symbolic name string version return internal platform get default get bundles symbolic name version symbolicname getbundles symbolicname internalplatform getdefault getbundles symbolicname returns an array of host bundles that the specified fragment bundle is attached to or tt null tt if the specified bundle is not attached to a host if the bundle is not a fragment bundle then tt null tt is returned param bundle the bundle to get the host bundles for return an array of host bundles or null if the bundle does not have any host bundles since 3 0 public static bundle get hosts bundle bundle return internal platform get default get hosts bundle gethosts internalplatform getdefault gethosts returns whether the platform is running return code true code if the platform is running and code false code otherwise since 3 0 public static boolean is running return internal platform get default is running isrunning internalplatform getdefault isrunning returns a list of known system architectures p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getos arch code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of system architectures known to the system see getos arch since 3 0 public static string knownos arch values return internal platform get default knownos arch values getosarch getosarch knownosarchvalues internalplatform getdefault knownosarchvalues returns a list of known operating system names p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getos code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of operating systems known to the system see getos since 3 0 public static string knownos values return internal platform get default knownos values knownosvalues internalplatform getdefault knownosvalues returns a map of known platform line separators the keys are translated names of platforms and the values are their associated line separator strings return a map of platform to their line separator string since 3 1 public static map known platform line separators map result new hash map result put line separator key mac os 9 line separator value cr result put line separator key unix line separator value lf result put line separator key windows line separator value crlf return result knownplatformlineseparators hashmap line_separator_key_mac_os_9 line_separator_value_cr line_separator_key_unix line_separator_value_lf line_separator_key_windows line_separator_value_crlf returns a list of known windowing system names p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getws code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of window systems known to the system see getws since 3 0 public static string knownws values return internal platform get default knownws values knownwsvalues internalplatform getdefault knownwsvalues returns code true code if the platform is currently running in debug mode the platform is typically put in debug mode using the debug command line argument return whether or not the platform is running in debug mode since 3 0 public static boolean in debug mode return system get property osgi debug null non nls 1 indebugmode getproperty returns code true code if the platform is currently running in development mode that is if special procedures are to be taken when defining plug in class paths the platform is typically put in development mode using the dev command line argument return whether or not the platform is running in development mode since 3 0 public static boolean in development mode return system get property osgi dev null non nls 1 indevelopmentmode getproperty private constructor to block instance creation private platform super adds the given authorization information to the key ring the information is relevant for the specified protection space and the given authorization scheme the protection space is defined by the combination of the given server url and realm the authorization scheme determines what the authorization information contains and how it should be used the authorization information is a code map code of code string code to code string code and typically contains information such as user names and passwords param server url the url identifying the server for this authorization information for example http www example com param realm the subsection of the given server to which this authorization information applies for example realm1 example com or for no realm param auth scheme the scheme for which this authorization information applies for example basic or for no authorization scheme param info a code map code containing authorization information such as user names and passwords key type code string code value type code string code exception core exception if there are problems setting the authorization information reasons include ul li the keyring could not be saved li ul public static void add authorization info url server url string realm string auth scheme map info throws core exception internal platform get default add authorization info server url realm auth scheme info serverurl authscheme coreexception addauthorizationinfo serverurl authscheme coreexception internalplatform getdefault addauthorizationinfo serverurl authscheme adds the given log listener to the notification list of the platform p once registered a listener starts receiving notification as entries are added to plug in logs via code i log log code the listener continues to receive notifications until it is replaced or removed p param listener the listener to register see i log add log listener i log listener see remove log listener i log listener public static void add log listener i log listener listener internal platform get default add log listener listener ilog ilog addloglistener iloglistener removeloglistener iloglistener addloglistener iloglistener internalplatform getdefault addloglistener adds the specified resource to the protection space specified by the given realm all targets at or deeper than the depth of the last symbolic element in the path of the given resource url are assumed to be in the same protection space param resource url the url identifying the resources to be added to the specified protection space for example http www example com folder param realm the name of the protection space for example realm1 example com exception core exception if there are problems setting the authorization information reasons include ul li the key ring could not be saved li ul public static void add protection space url resource url string realm throws core exception internal platform get default add protection space resource url realm resourceurl coreexception addprotectionspace resourceurl coreexception internalplatform getdefault addprotectionspace resourceurl returns a url that is the local equivalent of the supplied url this method is expected to be used with the plug in relative ur ls returned by i plugin descriptor bundle get entry and platform find if the specified url is not a plug in relative url it is returned as is if the specified url is a plug in relative url of a file including jar archive it is returned as a locally accessible url using file protocol extracting caching the file locally if required if the specified url is a plug in relative url of a directory the directory and any files and directories under it are made locally accessible likewise if param url original plug in relative url return the resolved url exception io exception if unable to resolve url see resolve url see find bundle i path see bundle get entry string public static url as localurl url url throws io exception return internal platform get default as localurl url urls iplugindescriptor getentry ioexception ipath getentry aslocalurl ioexception internalplatform getdefault aslocalurl takes down the splash screen if one was put up public static void end splash internal platform get default end splash endsplash internalplatform getdefault endsplash removes the authorization information for the specified protection space and given authorization scheme the protection space is defined by the given server url and realm param server url the url identifying the server to remove the authorization information for for example http www example com param realm the subsection of the given server to remove the authorization information for for example realm1 example com or for no realm param auth scheme the scheme for which the authorization information to remove applies for example basic or for no authorization scheme exception core exception if there are problems removing the authorization information reasons include ul li the keyring could not be saved li ul public static void flush authorization info url server url string realm string auth scheme throws core exception internal platform get default flush authorization info server url realm auth scheme serverurl authscheme coreexception flushauthorizationinfo serverurl authscheme coreexception internalplatform getdefault flushauthorizationinfo serverurl authscheme returns the adapter manager used for extending code i adaptable code objects return the adapter manager for this platform see i adapter manager public static i adapter manager get adapter manager return internal platform get default get adapter manager iadaptable iadaptermanager iadaptermanager getadaptermanager internalplatform getdefault getadaptermanager returns the authorization information for the specified protection space and given authorization scheme the protection space is defined by the given server url and realm returns code null code if no such information exists param server url the url identifying the server for the authorization information for example http www example com param realm the subsection of the given server to which the authorization information applies for example realm1 example com or for no realm param auth scheme the scheme for which the authorization information applies for example basic or for no authorization scheme return the authorization information for the specified protection space and given authorization scheme or code null code if no such information exists public static map get authorization info url server url string realm string auth scheme return internal platform get default get authorization info server url realm auth scheme serverurl authscheme getauthorizationinfo serverurl authscheme internalplatform getdefault getauthorizationinfo serverurl authscheme returns the command line args provided to the eclipse runtime layer when it was first run the returned value does not include arguments consumed by the lower levels of eclipse e g os gi or the launcher note that individual platform runnables may be provided with different arguments if they are being run individually rather than with code platform run code return the command line used to start the platform public static string get command line args return internal platform get default get command line args osgi getcommandlineargs internalplatform getdefault getcommandlineargs returns the content type manager return the content type manager since 3 0 public static i content type manager get content type manager return internal platform get default get content type manager icontenttypemanager getcontenttypemanager internalplatform getdefault getcontenttypemanager returns the identified option code null code is returned if no such option is found options are specified in the general form i lt plug in id gt lt option path gt i for example code org eclipse core runtime debug code param option the name of the option to lookup return the value of the requested debug option or code null code public static string get debug option string option return internal platform get default get option option getdebugoption internalplatform getdefault getoption returns the location of the platform working directory p callers of this method should consider using code get instance location code instead in various typically non ide related configurations of eclipse the platform working directory may not be on the local file system as such the more general form of this location is as a url p return the location of the platform see get instance location public static i path get location throws illegal state exception return internal platform get default get location getinstancelocation getinstancelocation ipath getlocation illegalstateexception internalplatform getdefault getlocation returns the location of the platform log file this file may contain information about errors that have previously occurred during this invocation of the platform p it is recommended not to keep this value as the log location may vary when an instance location is being set p p note it is very important that users of this method do not leave the log file open for extended periods of time doing so may prevent others from writing to the log file which could result in important error messages being lost it is strongly recommended that clients wanting to read the log file for extended periods should copy the log file contents elsewhere and immediately close the original file p return the path of the log file on disk public static i path get log file location return internal platform get default get meta area get log location ipath getlogfilelocation internalplatform getdefault getmetaarea getloglocation returns the plug in runtime object for the identified plug in or code null code if no such plug in can be found if the plug in is defined but not yet activated the plug in will be activated before being returned p b note b this method is only able to find and return plug in objects for plug ins described using plugin xml according to the traditional eclipse conventions eclipse 3 0 permits plug ins to be described in manifest mf files and to define their own bundle activators such plug ins cannot be discovered by this method p param id the unique identifier of the desired plug in e g code com example acme code return the plug in runtime object or code null code deprecated this method only works if the compatibility layer is installed and must not be used otherwise see the comments on link i plugin descriptor get plugin for details public static plugin get plugin string id try i plugin registry registry get plugin registry if registry null throw new illegal state exception i plugin descriptor pd registry get plugin descriptor id if pd null return null return pd get plugin catch core exception e todo log the exception return null iplugindescriptor getplugin getplugin ipluginregistry getpluginregistry illegalstateexception iplugindescriptor getplugindescriptor getplugin coreexception returns the plug in registry for this platform return the plug in registry see i plugin registry deprecated code i plugin registry code was refactored in eclipse 3 0 this method only works if the compatibility layer is installed and must not be used otherwise see the comments on link i plugin registry and its methods for details public static i plugin registry get plugin registry bundle compatibility internal platform get default get bundle compatibility helper pi runtime compatibility if compatibility null throw new illegal state exception class old internal platform null try old internal platform compatibility load class org eclipse core internal plugins internal platform non nls 1 method get plugin registry old internal platform get method get plugin registry null non nls 1 return i plugin registry get plugin registry invoke old internal platform null catch exception e ignore the exceptions return null return null ipluginregistry ipluginregistry ipluginregistry ipluginregistry getpluginregistry internalplatform getdefault getbundle compatibilityhelper pi_runtime_compatibility illegalstateexception oldinternalplatform oldinternalplatform loadclass internalplatform getpluginregistry oldinternalplatform getmethod getpluginregistry ipluginregistry getpluginregistry oldinternalplatform returns the location in the local file system of the plug in state area for the given plug in the platform must be running p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings p param plugin the plug in whose state location is returned return a local file system path public static i path get plugin state location plugin plugin return plugin get state location ipath getpluginstatelocation getstatelocation returns the protection space realm for the specified resource or code null code if the realm is unknown param resource url the url of the resource whose protection space is returned for example http www example com folder return the protection space realm for the specified resource or code null code if the realm is unknown public static string get protection space url resource url return internal platform get default get protection space resource url resourceurl getprotectionspace resourceurl internalplatform getdefault getprotectionspace resourceurl removes the indicated identical log listener from the notification list of the platform if no such listener exists no action is taken param listener the listener to de register see i log remove log listener i log listener see add log listener i log listener public static void remove log listener i log listener listener internal platform get default remove log listener listener ilog removeloglistener iloglistener addloglistener iloglistener removeloglistener iloglistener internalplatform getdefault removeloglistener returns a url which is the resolved equivalent of the supplied url this method is expected to be used with the plug in relative ur ls returned by i plugin descriptor bundle get entry and platform find p if the specified url is not a plug in relative url it is returned as is if the specified url is a plug in relative url this method attempts to reduce the given url to one which is native to the java class library eg file http etc p p note however that users of this api should not assume too much about the results of this method while it may consistently return a file url in certain installation configurations others may result in jar or http ur ls p param url original plug in relative url return the resolved url exception io exception if unable to resolve url see as localurl url see find bundle i path see bundle get entry string public static url resolve url url throws io exception return internal platform get default resolve url urls iplugindescriptor getentry urls ioexception aslocalurl ipath getentry ioexception internalplatform getdefault runs the given runnable in a protected mode exceptions thrown in the runnable are logged and passed to the runnable s exception handler such exceptions are not rethrown by this method param runnable the runnable to run public static void run i safe runnable runnable internal platform get default run runnable isaferunnable internalplatform getdefault returns the platform job manager return the platform s job manager since 3 0 public static i job manager get job manager return internal platform get default get job manager ijobmanager getjobmanager internalplatform getdefault getjobmanager returns the extension registry for this platform return the extension registry see i extension registry since 3 0 public static i extension registry get extension registry return internal platform get default get registry iextensionregistry iextensionregistry getextensionregistry internalplatform getdefault getregistry returns a url for the given path in the given bundle returns code null code if the url could not be computed or created param bundle the bundle in which to search param path path relative to plug in installation location return a url for the given path or code null code the actual form of the returned url is not specified see find bundle i path map see resolve url see as localurl url since 3 0 public static url find bundle bundle i path path return find support find bundle path null ipath aslocalurl ipath findsupport returns a url for the given path in the given bundle returns code null code if the url could not be computed or created p find looks for this path in given bundle and any attached fragments code null code is returned if no such entry is found note that there is no specific order to the fragments p p the following arguments may also be used pre nl for language specific information os for operating system specific information ws for windowing system specific information pre p p a path of nl about properties in an environment with a default locale of en ca will return a url corresponding to the first place about properties is found according to the following order pre plugin root nl en ca about properties fragment1 root nl en ca about properties fragment2 root nl en ca about properties plugin root nl en about properties fragment1 root nl en about properties fragment2 root nl en about properties plugin root about properties fragment1 root about properties fragment2 root about properties pre p p the current environment variable values can be overridden using the override map argument p param bundle the bundle in which to search param path file path relative to plug in installation location param override map of override substitution arguments to be used for any arg path elements the map keys correspond to the substitution arguments eg nl or os the resulting values must be of type java lang string if the map is code null code or does not contain the required substitution argument the default is used return a url for the given path or code null code the actual form of the returned url is not specified see resolve url see as localurl url since 3 0 public static url find bundle bundle i path path map override return find support find bundle path override en_ca aslocalurl ipath findsupport returns the location in the local file system of the plug in state area for the given bundle if the plug in state area did not exist prior to this call it is created p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings and other configuration parameters p param bundle the bundle whose state location if returned return a local file system path since 3 0 public static i path get state location bundle bundle return internal platform get default get state location bundle ipath getstatelocation internalplatform getdefault getstatelocation returns a number that changes whenever the set of installed plug ins changes this can be used for invalidating caches that are based on the set of currently installed plug ins e g extensions return a number related to the set of installed plug ins since 3 1 public static long get state stamp return internal platform get default get state time stamp getstatestamp internalplatform getdefault getstatetimestamp returns the log for the given bundle if no such log exists one is created param bundle the bundle whose log is returned return the log for the given bundle since 3 0 public static i log get log bundle bundle return internal platform get default get log bundle ilog getlog internalplatform getdefault getlog returns the given bundle s resource bundle for the current locale p this resource bundle is typically stored as the plugin properties file in the plug in itself and contains any translatable strings used in the plug in manifest file plugin xml p p this mechanism is intended only for externalizing strings found in the plug in manifest file using this method for externalizing strings in your code may result in degraded memory performance p param bundle the bundle whose resource bundle is being queried return the resource bundle exception missing resource exception if the resource bundle was not found since 3 0 public static resource bundle get resource bundle bundle bundle throws missing resource exception return internal platform get default get resource bundle bundle missingresourceexception resourcebundle getresourcebundle missingresourceexception internalplatform getdefault getresourcebundle returns a resource string corresponding to the given argument value if the argument value specifies a resource key the string is looked up in the default resource bundle for the given runtime bundle if the argument does not specify a valid key the argument itself is returned as the resource string the key lookup is performed in the file referenced in the bundle localization header of the bundle manifest if a resource string corresponding to the key is not found in the resource bundle the key value or any default text following the key in the argument value is returned as the resource string a key is identified as a string beginning with the character note that the character is stripped off prior to lookup in the resource bundle p equivalent to code get resource string bundle value get resource bundle code p param bundle the bundle whose resource bundle is being queried param value the value to look for return the resource string see get resource bundle bundle since 3 0 public static string get resource string bundle bundle string value return internal platform get default get resource string bundle value getresourcestring getresourcebundle getresourcebundle getresourcestring internalplatform getdefault getresourcestring returns a resource string corresponding to the given argument value and resource bundle in the given runtime bundle if the argument value specifies a resource key the string is looked up in the given resource bundle if the argument does not specify a valid key the argument itself is returned as the resource string the key lookup is performed against the specified resource bundle if a resource string corresponding to the key is not found in the resource bundle the key value or any default text following the key in the argument value is returned as the resource string a key is identified as a string beginning with the character note that the character is stripped off prior to lookup in the resource bundle p for example assume resource bundle plugin properties contains name project name pre get resource string hello world returns hello world li get resource string name returns project name li get resource string name hello world returns project name li get resource string abcd hello world returns hello world li get resource string abcd returns abcd li get resource string name returns name li pre p param bundle the bundle whose resource bundle is being queried param value the value param resource bundle the resource bundle to query return the resource string see get resource bundle bundle since 3 0 public static string get resource string bundle bundle string value resource bundle resource bundle return internal platform get default get resource string bundle value resource bundle getresourcestring getresourcestring getresourcestring getresourcestring getresourcestring getresourcestring resourcebundle getresourcebundle getresourcestring resourcebundle resourcebundle internalplatform getdefault getresourcestring resourcebundle returns the string name of the current system architecture the value is a user defined string if the architecture is specified on the command line otherwise it is the value returned by code java lang system get property os arch code return the string name of the current system architecture since 3 0 public static string getos arch return internal platform get default getos arch getproperty getosarch internalplatform getdefault getosarch returns the string name of the current locale for use in finding files whose path starts with code nl code return the string name of the current locale since 3 0 public static string getnl return internal platform get default getnl internalplatform getdefault returns the string name of the current operating system for use in finding files whose path starts with code os code code os unknown code is returned if the operating system cannot be determined the value may indicate one of the operating systems known to the platform as specified in code knownos values code or a user defined string if the operating system name is specified on the command line return the string name of the current operating system since 3 0 public static string getos return internal platform get default getos os_unknown knownosvalues internalplatform getdefault returns the string name of the current window system for use in finding files whose path starts with code ws code code null code is returned if the window system cannot be determined return the string name of the current window system or code null code since 3 0 public static string getws return internal platform get default getws internalplatform getdefault returns the arguments not consumed by the framework implementation itself which arguments are consumed is implementation specific these arguments are available for use by the application return the array of command line arguments not consumed by the framework since 3 0 public static string get application args return internal platform get default get application args getapplicationargs internalplatform getdefault getapplicationargs returns the platform administrator for this running eclipse p note this is an internal method and em must not em be used by clients which are not part of the eclipse platform this method allows access to classes which are not eclipse platform api but are part of the os gi runtime that the eclipse platform is built on even as the eclipse platform evolves in compatible ways from release to release the details of the os gi implementation might not p return the platform admin for this instance of eclipse since 3 0 public static platform admin get platform admin return internal platform get default get platform admin osgi osgi platformadmin getplatformadmin internalplatform getdefault getplatformadmin returns the location of the platform s working directory also known as the instance data area code null code is returned if the platform is running without an instance location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi instance area p return the location of the platform s instance data area or code null code if none since 3 0 public static location get instance location return internal platform get default get instance location getinstancelocation internalplatform getdefault getinstancelocation returns the currently registered bundle group providers return the currently registered bundle group providers since 3 0 public static i bundle group provider get bundle group providers return internal platform get default get bundle group providers ibundlegroupprovider getbundlegroupproviders internalplatform getdefault getbundlegroupproviders return the interface into the preference mechanism the returned object can be used for such operations as searching for preference values across multiple scopes and preference import export return an object to interface into the preference mechanism since 3 0 public static i preferences service get preferences service return internal platform get default get preferences service ipreferencesservice getpreferencesservice internalplatform getdefault getpreferencesservice returns the product which was selected when running this eclipse instance or code null code if none return the current product or code null code if none since 3 0 public static i product get product return internal platform get default get product iproduct getproduct internalplatform getdefault getproduct registers the given bundle group provider with the platform param provider a provider to register since 3 0 public static void register bundle group provider i bundle group provider provider internal platform get default register bundle group provider provider registerbundlegroupprovider ibundlegroupprovider internalplatform getdefault registerbundlegroupprovider de registers the given bundle group provider with the platform param provider a provider to de register since 3 0 public static void unregister bundle group provider i bundle group provider provider internal platform get default unregister bundle group provider provider unregisterbundlegroupprovider ibundlegroupprovider internalplatform getdefault unregisterbundlegroupprovider returns the location of the configuration information used to run this instance of eclipse the configuration area typically contains the list of plug ins available for use various settings those shared across different instances of the same configuration and any other such data needed by plug ins code null code is returned if the platform is running without a configuration location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi configuration area p return the location of the platform s configuration data area or code null code if none since 3 0 public static location get configuration location return internal platform get default get configuration location getconfigurationlocation internalplatform getdefault getconfigurationlocation returns the location of the platform s user data area the user data area is a location on the system which is specific to the system s current user by default it is located relative to the location given by the system property user home code null code is returned if the platform is running without an user location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi user area p return the location of the platform s user data area or code null code if none since 3 0 public static location get user location return internal platform get default get user location getuserlocation internalplatform getdefault getuserlocation returns the location of the base installation for the running platform code null code is returned if the platform is running without a configuration location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi install area p return the location of the platform s installation area or code null code if none since 3 0 public static location get install location return internal platform get default get install location getinstalllocation internalplatform getdefault getinstalllocation checks if the specified bundle is a fragment bundle param bundle the bundle to query return true if the specified bundle is a fragment bundle otherwise false is returned since 3 0 public static boolean is fragment bundle bundle return internal platform get default is fragment bundle isfragment internalplatform getdefault isfragment returns an array of attached fragment bundles for the specified bundle if the specified bundle is a fragment then tt null tt is returned if no fragments are attached to the specified bundle then tt null tt is returned param bundle the bundle to get the attached fragment bundles for return an array of fragment bundles or tt null tt if the bundle does not have any attached fragment bundles since 3 0 public static bundle get fragments bundle bundle return internal platform get default get fragments bundle getfragments internalplatform getdefault getfragments returns the resolved bundle with the specified symbolic name that has the highest version if no resolved bundles are installed that have the specified symbolic name then null is returned param symbolic name the symbolic name of the bundle to be returned return the bundle that has the specified symbolic name with the highest version or tt null tt if no bundle is found since 3 0 public static bundle get bundle string symbolic name return internal platform get default get bundle symbolic name symbolicname getbundle symbolicname internalplatform getdefault getbundle symbolicname returns all bundles with the specified symbolic name if no resolved bundles with the specified symbolic name can be found tt null tt is returned if the version argument is not null then only the bundles that have the specified symbolic name and a version greater than or equal to the specified version are returned the returned bundles are ordered in descending bundle version order param symbolic name the symbolic name of the bundles that are to be returned param version the version that the return bundle versions must match or tt null tt if no version matching is to be done return the array of bundles with the specified name that match the specified version and match rule or tt null tt if no bundles are found public static bundle get bundles string symbolic name string version return internal platform get default get bundles symbolic name version symbolicname getbundles symbolicname internalplatform getdefault getbundles symbolicname returns an array of host bundles that the specified fragment bundle is attached to or tt null tt if the specified bundle is not attached to a host if the bundle is not a fragment bundle then tt null tt is returned param bundle the bundle to get the host bundles for return an array of host bundles or null if the bundle does not have any host bundles since 3 0 public static bundle get hosts bundle bundle return internal platform get default get hosts bundle gethosts internalplatform getdefault gethosts returns whether the platform is running return code true code if the platform is running and code false code otherwise since 3 0 public static boolean is running return internal platform get default is running isrunning internalplatform getdefault isrunning returns a list of known system architectures p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getos arch code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of system architectures known to the system see getos arch since 3 0 public static string knownos arch values return internal platform get default knownos arch values getosarch getosarch knownosarchvalues internalplatform getdefault knownosarchvalues returns a list of known operating system names p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getos code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of operating systems known to the system see getos since 3 0 public static string knownos values return internal platform get default knownos values knownosvalues internalplatform getdefault knownosvalues returns a map of known platform line separators the keys are translated names of platforms and the values are their associated line separator strings return a map of platform to their line separator string since 3 1 public static map known platform line separators map result new hash map result put line separator key mac os 9 line separator value cr result put line separator key unix line separator value lf result put line separator key windows line separator value crlf return result knownplatformlineseparators hashmap line_separator_key_mac_os_9 line_separator_value_cr line_separator_key_unix line_separator_value_lf line_separator_key_windows line_separator_value_crlf returns a list of known windowing system names p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getws code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of window systems known to the system see getws since 3 0 public static string knownws values return internal platform get default knownws values knownwsvalues internalplatform getdefault knownwsvalues returns code true code if the platform is currently running in debug mode the platform is typically put in debug mode using the debug command line argument return whether or not the platform is running in debug mode since 3 0 public static boolean in debug mode return system get property osgi debug null non nls 1 indebugmode getproperty returns code true code if the platform is currently running in development mode that is if special procedures are to be taken when defining plug in class paths the platform is typically put in development mode using the dev command line argument return whether or not the platform is running in development mode since 3 0 public static boolean in development mode return system get property osgi dev null non nls 1 indevelopmentmode getproperty private constructor to block instance creation private platform super adds the given authorization information to the key ring the information is relevant for the specified protection space and the given authorization scheme the protection space is defined by the combination of the given server url and realm the authorization scheme determines what the authorization information contains and how it should be used the authorization information is a code map code of code string code to code string code and typically contains information such as user names and passwords param server url the url identifying the server for this authorization information for example http www example com param realm the subsection of the given server to which this authorization information applies for example realm1 example com or for no realm param auth scheme the scheme for which this authorization information applies for example basic or for no authorization scheme param info a code map code containing authorization information such as user names and passwords key type code string code value type code string code exception core exception if there are problems setting the authorization information reasons include ul li the keyring could not be saved li ul public static void add authorization info url server url string realm string auth scheme map info throws core exception internal platform get default add authorization info server url realm auth scheme info serverurl authscheme coreexception addauthorizationinfo serverurl authscheme coreexception internalplatform getdefault addauthorizationinfo serverurl authscheme adds the given log listener to the notification list of the platform p once registered a listener starts receiving notification as entries are added to plug in logs via code i log log code the listener continues to receive notifications until it is replaced or removed p param listener the listener to register see i log add log listener i log listener see remove log listener i log listener public static void add log listener i log listener listener internal platform get default add log listener listener ilog ilog addloglistener iloglistener removeloglistener iloglistener addloglistener iloglistener internalplatform getdefault addloglistener adds the specified resource to the protection space specified by the given realm all targets at or deeper than the depth of the last symbolic element in the path of the given resource url are assumed to be in the same protection space param resource url the url identifying the resources to be added to the specified protection space for example http www example com folder param realm the name of the protection space for example realm1 example com exception core exception if there are problems setting the authorization information reasons include ul li the key ring could not be saved li ul public static void add protection space url resource url string realm throws core exception internal platform get default add protection space resource url realm resourceurl coreexception addprotectionspace resourceurl coreexception internalplatform getdefault addprotectionspace resourceurl returns a url that is the local equivalent of the supplied url this method is expected to be used with the plug in relative ur ls returned by i plugin descriptor bundle get entry and platform find if the specified url is not a plug in relative url it is returned as is if the specified url is a plug in relative url of a file including jar archive it is returned as a locally accessible url using file protocol extracting caching the file locally if required if the specified url is a plug in relative url of a directory the directory and any files and directories under it are made locally accessible likewise if param url original plug in relative url return the resolved url exception io exception if unable to resolve url see resolve url see find bundle i path see bundle get entry string public static url as localurl url url throws io exception return internal platform get default as localurl url urls iplugindescriptor getentry ioexception ipath getentry aslocalurl ioexception internalplatform getdefault aslocalurl takes down the splash screen if one was put up public static void end splash internal platform get default end splash endsplash internalplatform getdefault endsplash removes the authorization information for the specified protection space and given authorization scheme the protection space is defined by the given server url and realm param server url the url identifying the server to remove the authorization information for for example http www example com param realm the subsection of the given server to remove the authorization information for for example realm1 example com or for no realm param auth scheme the scheme for which the authorization information to remove applies for example basic or for no authorization scheme exception core exception if there are problems removing the authorization information reasons include ul li the keyring could not be saved li ul public static void flush authorization info url server url string realm string auth scheme throws core exception internal platform get default flush authorization info server url realm auth scheme serverurl authscheme coreexception flushauthorizationinfo serverurl authscheme coreexception internalplatform getdefault flushauthorizationinfo serverurl authscheme returns the adapter manager used for extending code i adaptable code objects return the adapter manager for this platform see i adapter manager public static i adapter manager get adapter manager return internal platform get default get adapter manager iadaptable iadaptermanager iadaptermanager getadaptermanager internalplatform getdefault getadaptermanager returns the authorization information for the specified protection space and given authorization scheme the protection space is defined by the given server url and realm returns code null code if no such information exists param server url the url identifying the server for the authorization information for example http www example com param realm the subsection of the given server to which the authorization information applies for example realm1 example com or for no realm param auth scheme the scheme for which the authorization information applies for example basic or for no authorization scheme return the authorization information for the specified protection space and given authorization scheme or code null code if no such information exists public static map get authorization info url server url string realm string auth scheme return internal platform get default get authorization info server url realm auth scheme serverurl authscheme getauthorizationinfo serverurl authscheme internalplatform getdefault getauthorizationinfo serverurl authscheme returns the command line args provided to the eclipse runtime layer when it was first run the returned value does not include arguments consumed by the lower levels of eclipse e g os gi or the launcher note that individual platform runnables may be provided with different arguments if they are being run individually rather than with code platform run code return the command line used to start the platform public static string get command line args return internal platform get default get command line args osgi getcommandlineargs internalplatform getdefault getcommandlineargs returns the content type manager return the content type manager since 3 0 public static i content type manager get content type manager return internal platform get default get content type manager icontenttypemanager getcontenttypemanager internalplatform getdefault getcontenttypemanager returns the identified option code null code is returned if no such option is found options are specified in the general form i lt plug in id gt lt option path gt i for example code org eclipse core runtime debug code param option the name of the option to lookup return the value of the requested debug option or code null code public static string get debug option string option return internal platform get default get option option getdebugoption internalplatform getdefault getoption returns the location of the platform working directory p callers of this method should consider using code get instance location code instead in various typically non ide related configurations of eclipse the platform working directory may not be on the local file system as such the more general form of this location is as a url p return the location of the platform see get instance location public static i path get location throws illegal state exception return internal platform get default get location getinstancelocation getinstancelocation ipath getlocation illegalstateexception internalplatform getdefault getlocation returns the location of the platform log file this file may contain information about errors that have previously occurred during this invocation of the platform p it is recommended not to keep this value as the log location may vary when an instance location is being set p p note it is very important that users of this method do not leave the log file open for extended periods of time doing so may prevent others from writing to the log file which could result in important error messages being lost it is strongly recommended that clients wanting to read the log file for extended periods should copy the log file contents elsewhere and immediately close the original file p return the path of the log file on disk public static i path get log file location return internal platform get default get meta area get log location ipath getlogfilelocation internalplatform getdefault getmetaarea getloglocation returns the plug in runtime object for the identified plug in or code null code if no such plug in can be found if the plug in is defined but not yet activated the plug in will be activated before being returned p b note b this method is only able to find and return plug in objects for plug ins described using plugin xml according to the traditional eclipse conventions eclipse 3 0 permits plug ins to be described in manifest mf files and to define their own bundle activators such plug ins cannot be discovered by this method p param id the unique identifier of the desired plug in e g code com example acme code return the plug in runtime object or code null code deprecated this method only works if the compatibility layer is installed and must not be used otherwise see the comments on link i plugin descriptor get plugin for details public static plugin get plugin string id try i plugin registry registry get plugin registry if registry null throw new illegal state exception i plugin descriptor pd registry get plugin descriptor id if pd null return null return pd get plugin catch core exception e todo log the exception return null iplugindescriptor getplugin getplugin ipluginregistry getpluginregistry illegalstateexception iplugindescriptor getplugindescriptor getplugin coreexception returns the plug in registry for this platform return the plug in registry see i plugin registry deprecated code i plugin registry code was refactored in eclipse 3 0 this method only works if the compatibility layer is installed and must not be used otherwise see the comments on link i plugin registry and its methods for details public static i plugin registry get plugin registry bundle compatibility internal platform get default get bundle compatibility helper pi runtime compatibility if compatibility null throw new illegal state exception class old internal platform null try old internal platform compatibility load class org eclipse core internal plugins internal platform non nls 1 method get plugin registry old internal platform get method get plugin registry null non nls 1 return i plugin registry get plugin registry invoke old internal platform null catch exception e ignore the exceptions return null return null ipluginregistry ipluginregistry ipluginregistry ipluginregistry getpluginregistry internalplatform getdefault getbundle compatibilityhelper pi_runtime_compatibility illegalstateexception oldinternalplatform oldinternalplatform loadclass internalplatform getpluginregistry oldinternalplatform getmethod getpluginregistry ipluginregistry getpluginregistry oldinternalplatform returns the location in the local file system of the plug in state area for the given plug in the platform must be running p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings p param plugin the plug in whose state location is returned return a local file system path public static i path get plugin state location plugin plugin return plugin get state location ipath getpluginstatelocation getstatelocation returns the protection space realm for the specified resource or code null code if the realm is unknown param resource url the url of the resource whose protection space is returned for example http www example com folder return the protection space realm for the specified resource or code null code if the realm is unknown public static string get protection space url resource url return internal platform get default get protection space resource url resourceurl getprotectionspace resourceurl internalplatform getdefault getprotectionspace resourceurl removes the indicated identical log listener from the notification list of the platform if no such listener exists no action is taken param listener the listener to de register see i log remove log listener i log listener see add log listener i log listener public static void remove log listener i log listener listener internal platform get default remove log listener listener ilog removeloglistener iloglistener addloglistener iloglistener removeloglistener iloglistener internalplatform getdefault removeloglistener returns a url which is the resolved equivalent of the supplied url this method is expected to be used with the plug in relative ur ls returned by i plugin descriptor bundle get entry and platform find p if the specified url is not a plug in relative url it is returned as is if the specified url is a plug in relative url this method attempts to reduce the given url to one which is native to the java class library eg file http etc p p note however that users of this api should not assume too much about the results of this method while it may consistently return a file url in certain installation configurations others may result in jar or http ur ls p param url original plug in relative url return the resolved url exception io exception if unable to resolve url see as localurl url see find bundle i path see bundle get entry string public static url resolve url url throws io exception return internal platform get default resolve url urls iplugindescriptor getentry urls ioexception aslocalurl ipath getentry ioexception internalplatform getdefault runs the given runnable in a protected mode exceptions thrown in the runnable are logged and passed to the runnable s exception handler such exceptions are not rethrown by this method param runnable the runnable to run public static void run i safe runnable runnable internal platform get default run runnable isaferunnable internalplatform getdefault returns the platform job manager return the platform s job manager since 3 0 public static i job manager get job manager return internal platform get default get job manager ijobmanager getjobmanager internalplatform getdefault getjobmanager returns the extension registry for this platform return the extension registry see i extension registry since 3 0 public static i extension registry get extension registry return internal platform get default get registry iextensionregistry iextensionregistry getextensionregistry internalplatform getdefault getregistry returns a url for the given path in the given bundle returns code null code if the url could not be computed or created param bundle the bundle in which to search param path path relative to plug in installation location return a url for the given path or code null code the actual form of the returned url is not specified see find bundle i path map see resolve url see as localurl url since 3 0 public static url find bundle bundle i path path return find support find bundle path null ipath aslocalurl ipath findsupport returns a url for the given path in the given bundle returns code null code if the url could not be computed or created p find looks for this path in given bundle and any attached fragments code null code is returned if no such entry is found note that there is no specific order to the fragments p p the following arguments may also be used pre nl for language specific information os for operating system specific information ws for windowing system specific information pre p p a path of nl about properties in an environment with a default locale of en ca will return a url corresponding to the first place about properties is found according to the following order pre plugin root nl en ca about properties fragment1 root nl en ca about properties fragment2 root nl en ca about properties plugin root nl en about properties fragment1 root nl en about properties fragment2 root nl en about properties plugin root about properties fragment1 root about properties fragment2 root about properties pre p p the current environment variable values can be overridden using the override map argument p param bundle the bundle in which to search param path file path relative to plug in installation location param override map of override substitution arguments to be used for any arg path elements the map keys correspond to the substitution arguments eg nl or os the resulting values must be of type java lang string if the map is code null code or does not contain the required substitution argument the default is used return a url for the given path or code null code the actual form of the returned url is not specified see resolve url see as localurl url since 3 0 public static url find bundle bundle i path path map override return find support find bundle path override en_ca aslocalurl ipath findsupport returns the location in the local file system of the plug in state area for the given bundle if the plug in state area did not exist prior to this call it is created p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings and other configuration parameters p param bundle the bundle whose state location if returned return a local file system path since 3 0 public static i path get state location bundle bundle return internal platform get default get state location bundle ipath getstatelocation internalplatform getdefault getstatelocation returns a number that changes whenever the set of installed plug ins changes this can be used for invalidating caches that are based on the set of currently installed plug ins e g extensions return a number related to the set of installed plug ins since 3 1 public static long get state stamp return internal platform get default get state time stamp getstatestamp internalplatform getdefault getstatetimestamp returns the log for the given bundle if no such log exists one is created param bundle the bundle whose log is returned return the log for the given bundle since 3 0 public static i log get log bundle bundle return internal platform get default get log bundle ilog getlog internalplatform getdefault getlog returns the given bundle s resource bundle for the current locale p this resource bundle is typically stored as the plugin properties file in the plug in itself and contains any translatable strings used in the plug in manifest file plugin xml p p this mechanism is intended only for externalizing strings found in the plug in manifest file using this method for externalizing strings in your code may result in degraded memory performance p param bundle the bundle whose resource bundle is being queried return the resource bundle exception missing resource exception if the resource bundle was not found since 3 0 public static resource bundle get resource bundle bundle bundle throws missing resource exception return internal platform get default get resource bundle bundle missingresourceexception resourcebundle getresourcebundle missingresourceexception internalplatform getdefault getresourcebundle returns a resource string corresponding to the given argument value if the argument value specifies a resource key the string is looked up in the default resource bundle for the given runtime bundle if the argument does not specify a valid key the argument itself is returned as the resource string the key lookup is performed in the file referenced in the bundle localization header of the bundle manifest if a resource string corresponding to the key is not found in the resource bundle the key value or any default text following the key in the argument value is returned as the resource string a key is identified as a string beginning with the character note that the character is stripped off prior to lookup in the resource bundle p equivalent to code get resource string bundle value get resource bundle code p param bundle the bundle whose resource bundle is being queried param value the value to look for return the resource string see get resource bundle bundle since 3 0 public static string get resource string bundle bundle string value return internal platform get default get resource string bundle value getresourcestring getresourcebundle getresourcebundle getresourcestring internalplatform getdefault getresourcestring returns a resource string corresponding to the given argument value and resource bundle in the given runtime bundle if the argument value specifies a resource key the string is looked up in the given resource bundle if the argument does not specify a valid key the argument itself is returned as the resource string the key lookup is performed against the specified resource bundle if a resource string corresponding to the key is not found in the resource bundle the key value or any default text following the key in the argument value is returned as the resource string a key is identified as a string beginning with the character note that the character is stripped off prior to lookup in the resource bundle p for example assume resource bundle plugin properties contains name project name pre get resource string hello world returns hello world li get resource string name returns project name li get resource string name hello world returns project name li get resource string abcd hello world returns hello world li get resource string abcd returns abcd li get resource string name returns name li pre p param bundle the bundle whose resource bundle is being queried param value the value param resource bundle the resource bundle to query return the resource string see get resource bundle bundle since 3 0 public static string get resource string bundle bundle string value resource bundle resource bundle return internal platform get default get resource string bundle value resource bundle getresourcestring getresourcestring getresourcestring getresourcestring getresourcestring getresourcestring resourcebundle getresourcebundle getresourcestring resourcebundle resourcebundle internalplatform getdefault getresourcestring resourcebundle returns the string name of the current system architecture the value is a user defined string if the architecture is specified on the command line otherwise it is the value returned by code java lang system get property os arch code return the string name of the current system architecture since 3 0 public static string getos arch return internal platform get default getos arch getproperty getosarch internalplatform getdefault getosarch returns the string name of the current locale for use in finding files whose path starts with code nl code return the string name of the current locale since 3 0 public static string getnl return internal platform get default getnl internalplatform getdefault returns the string name of the current operating system for use in finding files whose path starts with code os code code os unknown code is returned if the operating system cannot be determined the value may indicate one of the operating systems known to the platform as specified in code knownos values code or a user defined string if the operating system name is specified on the command line return the string name of the current operating system since 3 0 public static string getos return internal platform get default getos os_unknown knownosvalues internalplatform getdefault returns the string name of the current window system for use in finding files whose path starts with code ws code code null code is returned if the window system cannot be determined return the string name of the current window system or code null code since 3 0 public static string getws return internal platform get default getws internalplatform getdefault returns the arguments not consumed by the framework implementation itself which arguments are consumed is implementation specific these arguments are available for use by the application return the array of command line arguments not consumed by the framework since 3 0 public static string get application args return internal platform get default get application args getapplicationargs internalplatform getdefault getapplicationargs returns the platform administrator for this running eclipse p note this is an internal method and em must not em be used by clients which are not part of the eclipse platform this method allows access to classes which are not eclipse platform api but are part of the os gi runtime that the eclipse platform is built on even as the eclipse platform evolves in compatible ways from release to release the details of the os gi implementation might not p return the platform admin for this instance of eclipse since 3 0 public static platform admin get platform admin return internal platform get default get platform admin osgi osgi platformadmin getplatformadmin internalplatform getdefault getplatformadmin returns the location of the platform s working directory also known as the instance data area code null code is returned if the platform is running without an instance location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi instance area p return the location of the platform s instance data area or code null code if none since 3 0 public static location get instance location return internal platform get default get instance location getinstancelocation internalplatform getdefault getinstancelocation returns the currently registered bundle group providers return the currently registered bundle group providers since 3 0 public static i bundle group provider get bundle group providers return internal platform get default get bundle group providers ibundlegroupprovider getbundlegroupproviders internalplatform getdefault getbundlegroupproviders return the interface into the preference mechanism the returned object can be used for such operations as searching for preference values across multiple scopes and preference import export return an object to interface into the preference mechanism since 3 0 public static i preferences service get preferences service return internal platform get default get preferences service ipreferencesservice getpreferencesservice internalplatform getdefault getpreferencesservice returns the product which was selected when running this eclipse instance or code null code if none return the current product or code null code if none since 3 0 public static i product get product return internal platform get default get product iproduct getproduct internalplatform getdefault getproduct registers the given bundle group provider with the platform param provider a provider to register since 3 0 public static void register bundle group provider i bundle group provider provider internal platform get default register bundle group provider provider registerbundlegroupprovider ibundlegroupprovider internalplatform getdefault registerbundlegroupprovider de registers the given bundle group provider with the platform param provider a provider to de register since 3 0 public static void unregister bundle group provider i bundle group provider provider internal platform get default unregister bundle group provider provider unregisterbundlegroupprovider ibundlegroupprovider internalplatform getdefault unregisterbundlegroupprovider returns the location of the configuration information used to run this instance of eclipse the configuration area typically contains the list of plug ins available for use various settings those shared across different instances of the same configuration and any other such data needed by plug ins code null code is returned if the platform is running without a configuration location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi configuration area p return the location of the platform s configuration data area or code null code if none since 3 0 public static location get configuration location return internal platform get default get configuration location getconfigurationlocation internalplatform getdefault getconfigurationlocation returns the location of the platform s user data area the user data area is a location on the system which is specific to the system s current user by default it is located relative to the location given by the system property user home code null code is returned if the platform is running without an user location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi user area p return the location of the platform s user data area or code null code if none since 3 0 public static location get user location return internal platform get default get user location getuserlocation internalplatform getdefault getuserlocation returns the location of the base installation for the running platform code null code is returned if the platform is running without a configuration location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi install area p return the location of the platform s installation area or code null code if none since 3 0 public static location get install location return internal platform get default get install location getinstalllocation internalplatform getdefault getinstalllocation checks if the specified bundle is a fragment bundle param bundle the bundle to query return true if the specified bundle is a fragment bundle otherwise false is returned since 3 0 public static boolean is fragment bundle bundle return internal platform get default is fragment bundle isfragment internalplatform getdefault isfragment returns an array of attached fragment bundles for the specified bundle if the specified bundle is a fragment then tt null tt is returned if no fragments are attached to the specified bundle then tt null tt is returned param bundle the bundle to get the attached fragment bundles for return an array of fragment bundles or tt null tt if the bundle does not have any attached fragment bundles since 3 0 public static bundle get fragments bundle bundle return internal platform get default get fragments bundle getfragments internalplatform getdefault getfragments returns the resolved bundle with the specified symbolic name that has the highest version if no resolved bundles are installed that have the specified symbolic name then null is returned param symbolic name the symbolic name of the bundle to be returned return the bundle that has the specified symbolic name with the highest version or tt null tt if no bundle is found since 3 0 public static bundle get bundle string symbolic name return internal platform get default get bundle symbolic name symbolicname getbundle symbolicname internalplatform getdefault getbundle symbolicname returns all bundles with the specified symbolic name if no resolved bundles with the specified symbolic name can be found tt null tt is returned if the version argument is not null then only the bundles that have the specified symbolic name and a version greater than or equal to the specified version are returned the returned bundles are ordered in descending bundle version order param symbolic name the symbolic name of the bundles that are to be returned param version the version that the return bundle versions must match or tt null tt if no version matching is to be done return the array of bundles with the specified name that match the specified version and match rule or tt null tt if no bundles are found public static bundle get bundles string symbolic name string version return internal platform get default get bundles symbolic name version symbolicname getbundles symbolicname internalplatform getdefault getbundles symbolicname returns an array of host bundles that the specified fragment bundle is attached to or tt null tt if the specified bundle is not attached to a host if the bundle is not a fragment bundle then tt null tt is returned param bundle the bundle to get the host bundles for return an array of host bundles or null if the bundle does not have any host bundles since 3 0 public static bundle get hosts bundle bundle return internal platform get default get hosts bundle gethosts internalplatform getdefault gethosts returns whether the platform is running return code true code if the platform is running and code false code otherwise since 3 0 public static boolean is running return internal platform get default is running isrunning internalplatform getdefault isrunning returns a list of known system architectures p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getos arch code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of system architectures known to the system see getos arch since 3 0 public static string knownos arch values return internal platform get default knownos arch values getosarch getosarch knownosarchvalues internalplatform getdefault knownosarchvalues returns a list of known operating system names p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getos code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of operating systems known to the system see getos since 3 0 public static string knownos values return internal platform get default knownos values knownosvalues internalplatform getdefault knownosvalues returns a map of known platform line separators the keys are translated names of platforms and the values are their associated line separator strings return a map of platform to their line separator string since 3 1 public static map known platform line separators map result new hash map result put line separator key mac os 9 line separator value cr result put line separator key unix line separator value lf result put line separator key windows line separator value crlf return result knownplatformlineseparators hashmap line_separator_key_mac_os_9 line_separator_value_cr line_separator_key_unix line_separator_value_lf line_separator_key_windows line_separator_value_crlf returns a list of known windowing system names p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getws code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of window systems known to the system see getws since 3 0 public static string knownws values return internal platform get default knownws values knownwsvalues internalplatform getdefault knownwsvalues returns code true code if the platform is currently running in debug mode the platform is typically put in debug mode using the debug command line argument return whether or not the platform is running in debug mode since 3 0 public static boolean in debug mode return system get property osgi debug null non nls 1 indebugmode getproperty returns code true code if the platform is currently running in development mode that is if special procedures are to be taken when defining plug in class paths the platform is typically put in development mode using the dev command line argument return whether or not the platform is running in development mode since 3 0 public static boolean in development mode return system get property osgi dev null non nls 1 indevelopmentmode getproperty private constructor to block instance creation private platform super adds the given authorization information to the key ring the information is relevant for the specified protection space and the given authorization scheme the protection space is defined by the combination of the given server url and realm the authorization scheme determines what the authorization information contains and how it should be used the authorization information is a code map code of code string code to code string code and typically contains information such as user names and passwords param server url the url identifying the server for this authorization information for example http www example com param realm the subsection of the given server to which this authorization information applies for example realm1 example com or for no realm param auth scheme the scheme for which this authorization information applies for example basic or for no authorization scheme param info a code map code containing authorization information such as user names and passwords key type code string code value type code string code exception core exception if there are problems setting the authorization information reasons include ul li the keyring could not be saved li ul public static void add authorization info url server url string realm string auth scheme map info throws core exception internal platform get default add authorization info server url realm auth scheme info serverurl authscheme coreexception addauthorizationinfo serverurl authscheme coreexception internalplatform getdefault addauthorizationinfo serverurl authscheme adds the given log listener to the notification list of the platform p once registered a listener starts receiving notification as entries are added to plug in logs via code i log log code the listener continues to receive notifications until it is replaced or removed p param listener the listener to register see i log add log listener i log listener see remove log listener i log listener public static void add log listener i log listener listener internal platform get default add log listener listener ilog ilog addloglistener iloglistener removeloglistener iloglistener addloglistener iloglistener internalplatform getdefault addloglistener adds the specified resource to the protection space specified by the given realm all targets at or deeper than the depth of the last symbolic element in the path of the given resource url are assumed to be in the same protection space param resource url the url identifying the resources to be added to the specified protection space for example http www example com folder param realm the name of the protection space for example realm1 example com exception core exception if there are problems setting the authorization information reasons include ul li the key ring could not be saved li ul public static void add protection space url resource url string realm throws core exception internal platform get default add protection space resource url realm resourceurl coreexception addprotectionspace resourceurl coreexception internalplatform getdefault addprotectionspace resourceurl returns a url that is the local equivalent of the supplied url this method is expected to be used with the plug in relative ur ls returned by i plugin descriptor bundle get entry and platform find if the specified url is not a plug in relative url it is returned as is if the specified url is a plug in relative url of a file including jar archive it is returned as a locally accessible url using file protocol extracting caching the file locally if required if the specified url is a plug in relative url of a directory the directory and any files and directories under it are made locally accessible likewise if param url original plug in relative url return the resolved url exception io exception if unable to resolve url see resolve url see find bundle i path see bundle get entry string public static url as localurl url url throws io exception return internal platform get default as localurl url urls iplugindescriptor getentry ioexception ipath getentry aslocalurl ioexception internalplatform getdefault aslocalurl takes down the splash screen if one was put up public static void end splash internal platform get default end splash endsplash internalplatform getdefault endsplash removes the authorization information for the specified protection space and given authorization scheme the protection space is defined by the given server url and realm param server url the url identifying the server to remove the authorization information for for example http www example com param realm the subsection of the given server to remove the authorization information for for example realm1 example com or for no realm param auth scheme the scheme for which the authorization information to remove applies for example basic or for no authorization scheme exception core exception if there are problems removing the authorization information reasons include ul li the keyring could not be saved li ul public static void flush authorization info url server url string realm string auth scheme throws core exception internal platform get default flush authorization info server url realm auth scheme serverurl authscheme coreexception flushauthorizationinfo serverurl authscheme coreexception internalplatform getdefault flushauthorizationinfo serverurl authscheme returns the adapter manager used for extending code i adaptable code objects return the adapter manager for this platform see i adapter manager public static i adapter manager get adapter manager return internal platform get default get adapter manager iadaptable iadaptermanager iadaptermanager getadaptermanager internalplatform getdefault getadaptermanager returns the authorization information for the specified protection space and given authorization scheme the protection space is defined by the given server url and realm returns code null code if no such information exists param server url the url identifying the server for the authorization information for example http www example com param realm the subsection of the given server to which the authorization information applies for example realm1 example com or for no realm param auth scheme the scheme for which the authorization information applies for example basic or for no authorization scheme return the authorization information for the specified protection space and given authorization scheme or code null code if no such information exists public static map get authorization info url server url string realm string auth scheme return internal platform get default get authorization info server url realm auth scheme serverurl authscheme getauthorizationinfo serverurl authscheme internalplatform getdefault getauthorizationinfo serverurl authscheme returns the command line args provided to the eclipse runtime layer when it was first run the returned value does not include arguments consumed by the lower levels of eclipse e g os gi or the launcher note that individual platform runnables may be provided with different arguments if they are being run individually rather than with code platform run code return the command line used to start the platform public static string get command line args return internal platform get default get command line args osgi getcommandlineargs internalplatform getdefault getcommandlineargs returns the content type manager return the content type manager since 3 0 public static i content type manager get content type manager return internal platform get default get content type manager icontenttypemanager getcontenttypemanager internalplatform getdefault getcontenttypemanager returns the identified option code null code is returned if no such option is found options are specified in the general form i lt plug in id gt lt option path gt i for example code org eclipse core runtime debug code param option the name of the option to lookup return the value of the requested debug option or code null code public static string get debug option string option return internal platform get default get option option getdebugoption internalplatform getdefault getoption returns the location of the platform working directory p callers of this method should consider using code get instance location code instead in various typically non ide related configurations of eclipse the platform working directory may not be on the local file system as such the more general form of this location is as a url p return the location of the platform see get instance location public static i path get location throws illegal state exception return internal platform get default get location getinstancelocation getinstancelocation ipath getlocation illegalstateexception internalplatform getdefault getlocation returns the location of the platform log file this file may contain information about errors that have previously occurred during this invocation of the platform p it is recommended not to keep this value as the log location may vary when an instance location is being set p p note it is very important that users of this method do not leave the log file open for extended periods of time doing so may prevent others from writing to the log file which could result in important error messages being lost it is strongly recommended that clients wanting to read the log file for extended periods should copy the log file contents elsewhere and immediately close the original file p return the path of the log file on disk public static i path get log file location return internal platform get default get meta area get log location ipath getlogfilelocation internalplatform getdefault getmetaarea getloglocation returns the plug in runtime object for the identified plug in or code null code if no such plug in can be found if the plug in is defined but not yet activated the plug in will be activated before being returned p b note b this method is only able to find and return plug in objects for plug ins described using plugin xml according to the traditional eclipse conventions eclipse 3 0 permits plug ins to be described in manifest mf files and to define their own bundle activators such plug ins cannot be discovered by this method p param id the unique identifier of the desired plug in e g code com example acme code return the plug in runtime object or code null code deprecated this method only works if the compatibility layer is installed and must not be used otherwise see the comments on link i plugin descriptor get plugin for details public static plugin get plugin string id try i plugin registry registry get plugin registry if registry null throw new illegal state exception i plugin descriptor pd registry get plugin descriptor id if pd null return null return pd get plugin catch core exception e todo log the exception return null iplugindescriptor getplugin getplugin ipluginregistry getpluginregistry illegalstateexception iplugindescriptor getplugindescriptor getplugin coreexception returns the plug in registry for this platform return the plug in registry see i plugin registry deprecated code i plugin registry code was refactored in eclipse 3 0 this method only works if the compatibility layer is installed and must not be used otherwise see the comments on link i plugin registry and its methods for details public static i plugin registry get plugin registry bundle compatibility internal platform get default get bundle compatibility helper pi runtime compatibility if compatibility null throw new illegal state exception class old internal platform null try old internal platform compatibility load class org eclipse core internal plugins internal platform non nls 1 method get plugin registry old internal platform get method get plugin registry null non nls 1 return i plugin registry get plugin registry invoke old internal platform null catch exception e ignore the exceptions return null return null ipluginregistry ipluginregistry ipluginregistry ipluginregistry getpluginregistry internalplatform getdefault getbundle compatibilityhelper pi_runtime_compatibility illegalstateexception oldinternalplatform oldinternalplatform loadclass internalplatform getpluginregistry oldinternalplatform getmethod getpluginregistry ipluginregistry getpluginregistry oldinternalplatform returns the location in the local file system of the plug in state area for the given plug in the platform must be running p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings p param plugin the plug in whose state location is returned return a local file system path public static i path get plugin state location plugin plugin return plugin get state location ipath getpluginstatelocation getstatelocation returns the protection space realm for the specified resource or code null code if the realm is unknown param resource url the url of the resource whose protection space is returned for example http www example com folder return the protection space realm for the specified resource or code null code if the realm is unknown public static string get protection space url resource url return internal platform get default get protection space resource url resourceurl getprotectionspace resourceurl internalplatform getdefault getprotectionspace resourceurl removes the indicated identical log listener from the notification list of the platform if no such listener exists no action is taken param listener the listener to de register see i log remove log listener i log listener see add log listener i log listener public static void remove log listener i log listener listener internal platform get default remove log listener listener ilog removeloglistener iloglistener addloglistener iloglistener removeloglistener iloglistener internalplatform getdefault removeloglistener returns a url which is the resolved equivalent of the supplied url this method is expected to be used with the plug in relative ur ls returned by i plugin descriptor bundle get entry and platform find p if the specified url is not a plug in relative url it is returned as is if the specified url is a plug in relative url this method attempts to reduce the given url to one which is native to the java class library eg file http etc p p note however that users of this api should not assume too much about the results of this method while it may consistently return a file url in certain installation configurations others may result in jar or http ur ls p param url original plug in relative url return the resolved url exception io exception if unable to resolve url see as localurl url see find bundle i path see bundle get entry string public static url resolve url url throws io exception return internal platform get default resolve url urls iplugindescriptor getentry urls ioexception aslocalurl ipath getentry ioexception internalplatform getdefault runs the given runnable in a protected mode exceptions thrown in the runnable are logged and passed to the runnable s exception handler such exceptions are not rethrown by this method param runnable the runnable to run public static void run i safe runnable runnable internal platform get default run runnable isaferunnable internalplatform getdefault returns the platform job manager return the platform s job manager since 3 0 public static i job manager get job manager return internal platform get default get job manager ijobmanager getjobmanager internalplatform getdefault getjobmanager returns the extension registry for this platform return the extension registry see i extension registry since 3 0 public static i extension registry get extension registry return internal platform get default get registry iextensionregistry iextensionregistry getextensionregistry internalplatform getdefault getregistry returns a url for the given path in the given bundle returns code null code if the url could not be computed or created param bundle the bundle in which to search param path path relative to plug in installation location return a url for the given path or code null code the actual form of the returned url is not specified see find bundle i path map see resolve url see as localurl url since 3 0 public static url find bundle bundle i path path return find support find bundle path null ipath aslocalurl ipath findsupport returns a url for the given path in the given bundle returns code null code if the url could not be computed or created p find looks for this path in given bundle and any attached fragments code null code is returned if no such entry is found note that there is no specific order to the fragments p p the following arguments may also be used pre nl for language specific information os for operating system specific information ws for windowing system specific information pre p p a path of nl about properties in an environment with a default locale of en ca will return a url corresponding to the first place about properties is found according to the following order pre plugin root nl en ca about properties fragment1 root nl en ca about properties fragment2 root nl en ca about properties plugin root nl en about properties fragment1 root nl en about properties fragment2 root nl en about properties plugin root about properties fragment1 root about properties fragment2 root about properties pre p p the current environment variable values can be overridden using the override map argument p param bundle the bundle in which to search param path file path relative to plug in installation location param override map of override substitution arguments to be used for any arg path elements the map keys correspond to the substitution arguments eg nl or os the resulting values must be of type java lang string if the map is code null code or does not contain the required substitution argument the default is used return a url for the given path or code null code the actual form of the returned url is not specified see resolve url see as localurl url since 3 0 public static url find bundle bundle i path path map override return find support find bundle path override en_ca aslocalurl ipath findsupport returns the location in the local file system of the plug in state area for the given bundle if the plug in state area did not exist prior to this call it is created p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings and other configuration parameters p param bundle the bundle whose state location if returned return a local file system path since 3 0 public static i path get state location bundle bundle return internal platform get default get state location bundle ipath getstatelocation internalplatform getdefault getstatelocation returns a number that changes whenever the set of installed plug ins changes this can be used for invalidating caches that are based on the set of currently installed plug ins e g extensions return a number related to the set of installed plug ins since 3 1 public static long get state stamp return internal platform get default get state time stamp getstatestamp internalplatform getdefault getstatetimestamp returns the log for the given bundle if no such log exists one is created param bundle the bundle whose log is returned return the log for the given bundle since 3 0 public static i log get log bundle bundle return internal platform get default get log bundle ilog getlog internalplatform getdefault getlog returns the given bundle s resource bundle for the current locale p this resource bundle is typically stored as the plugin properties file in the plug in itself and contains any translatable strings used in the plug in manifest file plugin xml p p this mechanism is intended only for externalizing strings found in the plug in manifest file using this method for externalizing strings in your code may result in degraded memory performance p param bundle the bundle whose resource bundle is being queried return the resource bundle exception missing resource exception if the resource bundle was not found since 3 0 public static resource bundle get resource bundle bundle bundle throws missing resource exception return internal platform get default get resource bundle bundle missingresourceexception resourcebundle getresourcebundle missingresourceexception internalplatform getdefault getresourcebundle returns a resource string corresponding to the given argument value if the argument value specifies a resource key the string is looked up in the default resource bundle for the given runtime bundle if the argument does not specify a valid key the argument itself is returned as the resource string the key lookup is performed in the file referenced in the bundle localization header of the bundle manifest if a resource string corresponding to the key is not found in the resource bundle the key value or any default text following the key in the argument value is returned as the resource string a key is identified as a string beginning with the character note that the character is stripped off prior to lookup in the resource bundle p equivalent to code get resource string bundle value get resource bundle code p param bundle the bundle whose resource bundle is being queried param value the value to look for return the resource string see get resource bundle bundle since 3 0 public static string get resource string bundle bundle string value return internal platform get default get resource string bundle value getresourcestring getresourcebundle getresourcebundle getresourcestring internalplatform getdefault getresourcestring returns a resource string corresponding to the given argument value and resource bundle in the given runtime bundle if the argument value specifies a resource key the string is looked up in the given resource bundle if the argument does not specify a valid key the argument itself is returned as the resource string the key lookup is performed against the specified resource bundle if a resource string corresponding to the key is not found in the resource bundle the key value or any default text following the key in the argument value is returned as the resource string a key is identified as a string beginning with the character note that the character is stripped off prior to lookup in the resource bundle p for example assume resource bundle plugin properties contains name project name pre get resource string hello world returns hello world li get resource string name returns project name li get resource string name hello world returns project name li get resource string abcd hello world returns hello world li get resource string abcd returns abcd li get resource string name returns name li pre p param bundle the bundle whose resource bundle is being queried param value the value param resource bundle the resource bundle to query return the resource string see get resource bundle bundle since 3 0 public static string get resource string bundle bundle string value resource bundle resource bundle return internal platform get default get resource string bundle value resource bundle getresourcestring getresourcestring getresourcestring getresourcestring getresourcestring getresourcestring resourcebundle getresourcebundle getresourcestring resourcebundle resourcebundle internalplatform getdefault getresourcestring resourcebundle returns the string name of the current system architecture the value is a user defined string if the architecture is specified on the command line otherwise it is the value returned by code java lang system get property os arch code return the string name of the current system architecture since 3 0 public static string getos arch return internal platform get default getos arch getproperty getosarch internalplatform getdefault getosarch returns the string name of the current locale for use in finding files whose path starts with code nl code return the string name of the current locale since 3 0 public static string getnl return internal platform get default getnl internalplatform getdefault returns the string name of the current operating system for use in finding files whose path starts with code os code code os unknown code is returned if the operating system cannot be determined the value may indicate one of the operating systems known to the platform as specified in code knownos values code or a user defined string if the operating system name is specified on the command line return the string name of the current operating system since 3 0 public static string getos return internal platform get default getos os_unknown knownosvalues internalplatform getdefault returns the string name of the current window system for use in finding files whose path starts with code ws code code null code is returned if the window system cannot be determined return the string name of the current window system or code null code since 3 0 public static string getws return internal platform get default getws internalplatform getdefault returns the arguments not consumed by the framework implementation itself which arguments are consumed is implementation specific these arguments are available for use by the application return the array of command line arguments not consumed by the framework since 3 0 public static string get application args return internal platform get default get application args getapplicationargs internalplatform getdefault getapplicationargs returns the platform administrator for this running eclipse p note this is an internal method and em must not em be used by clients which are not part of the eclipse platform this method allows access to classes which are not eclipse platform api but are part of the os gi runtime that the eclipse platform is built on even as the eclipse platform evolves in compatible ways from release to release the details of the os gi implementation might not p return the platform admin for this instance of eclipse since 3 0 public static platform admin get platform admin return internal platform get default get platform admin osgi osgi platformadmin getplatformadmin internalplatform getdefault getplatformadmin returns the location of the platform s working directory also known as the instance data area code null code is returned if the platform is running without an instance location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi instance area p return the location of the platform s instance data area or code null code if none since 3 0 public static location get instance location return internal platform get default get instance location getinstancelocation internalplatform getdefault getinstancelocation returns the currently registered bundle group providers return the currently registered bundle group providers since 3 0 public static i bundle group provider get bundle group providers return internal platform get default get bundle group providers ibundlegroupprovider getbundlegroupproviders internalplatform getdefault getbundlegroupproviders return the interface into the preference mechanism the returned object can be used for such operations as searching for preference values across multiple scopes and preference import export return an object to interface into the preference mechanism since 3 0 public static i preferences service get preferences service return internal platform get default get preferences service ipreferencesservice getpreferencesservice internalplatform getdefault getpreferencesservice returns the product which was selected when running this eclipse instance or code null code if none return the current product or code null code if none since 3 0 public static i product get product return internal platform get default get product iproduct getproduct internalplatform getdefault getproduct registers the given bundle group provider with the platform param provider a provider to register since 3 0 public static void register bundle group provider i bundle group provider provider internal platform get default register bundle group provider provider registerbundlegroupprovider ibundlegroupprovider internalplatform getdefault registerbundlegroupprovider de registers the given bundle group provider with the platform param provider a provider to de register since 3 0 public static void unregister bundle group provider i bundle group provider provider internal platform get default unregister bundle group provider provider unregisterbundlegroupprovider ibundlegroupprovider internalplatform getdefault unregisterbundlegroupprovider returns the location of the configuration information used to run this instance of eclipse the configuration area typically contains the list of plug ins available for use various settings those shared across different instances of the same configuration and any other such data needed by plug ins code null code is returned if the platform is running without a configuration location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi configuration area p return the location of the platform s configuration data area or code null code if none since 3 0 public static location get configuration location return internal platform get default get configuration location getconfigurationlocation internalplatform getdefault getconfigurationlocation returns the location of the platform s user data area the user data area is a location on the system which is specific to the system s current user by default it is located relative to the location given by the system property user home code null code is returned if the platform is running without an user location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi user area p return the location of the platform s user data area or code null code if none since 3 0 public static location get user location return internal platform get default get user location getuserlocation internalplatform getdefault getuserlocation returns the location of the base installation for the running platform code null code is returned if the platform is running without a configuration location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi install area p return the location of the platform s installation area or code null code if none since 3 0 public static location get install location return internal platform get default get install location getinstalllocation internalplatform getdefault getinstalllocation checks if the specified bundle is a fragment bundle param bundle the bundle to query return true if the specified bundle is a fragment bundle otherwise false is returned since 3 0 public static boolean is fragment bundle bundle return internal platform get default is fragment bundle isfragment internalplatform getdefault isfragment returns an array of attached fragment bundles for the specified bundle if the specified bundle is a fragment then tt null tt is returned if no fragments are attached to the specified bundle then tt null tt is returned param bundle the bundle to get the attached fragment bundles for return an array of fragment bundles or tt null tt if the bundle does not have any attached fragment bundles since 3 0 public static bundle get fragments bundle bundle return internal platform get default get fragments bundle getfragments internalplatform getdefault getfragments returns the resolved bundle with the specified symbolic name that has the highest version if no resolved bundles are installed that have the specified symbolic name then null is returned param symbolic name the symbolic name of the bundle to be returned return the bundle that has the specified symbolic name with the highest version or tt null tt if no bundle is found since 3 0 public static bundle get bundle string symbolic name return internal platform get default get bundle symbolic name symbolicname getbundle symbolicname internalplatform getdefault getbundle symbolicname returns all bundles with the specified symbolic name if no resolved bundles with the specified symbolic name can be found tt null tt is returned if the version argument is not null then only the bundles that have the specified symbolic name and a version greater than or equal to the specified version are returned the returned bundles are ordered in descending bundle version order param symbolic name the symbolic name of the bundles that are to be returned param version the version that the return bundle versions must match or tt null tt if no version matching is to be done return the array of bundles with the specified name that match the specified version and match rule or tt null tt if no bundles are found public static bundle get bundles string symbolic name string version return internal platform get default get bundles symbolic name version symbolicname getbundles symbolicname internalplatform getdefault getbundles symbolicname returns an array of host bundles that the specified fragment bundle is attached to or tt null tt if the specified bundle is not attached to a host if the bundle is not a fragment bundle then tt null tt is returned param bundle the bundle to get the host bundles for return an array of host bundles or null if the bundle does not have any host bundles since 3 0 public static bundle get hosts bundle bundle return internal platform get default get hosts bundle gethosts internalplatform getdefault gethosts returns whether the platform is running return code true code if the platform is running and code false code otherwise since 3 0 public static boolean is running return internal platform get default is running isrunning internalplatform getdefault isrunning returns a list of known system architectures p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getos arch code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of system architectures known to the system see getos arch since 3 0 public static string knownos arch values return internal platform get default knownos arch values getosarch getosarch knownosarchvalues internalplatform getdefault knownosarchvalues returns a list of known operating system names p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getos code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of operating systems known to the system see getos since 3 0 public static string knownos values return internal platform get default knownos values knownosvalues internalplatform getdefault knownosvalues returns a map of known platform line separators the keys are translated names of platforms and the values are their associated line separator strings return a map of platform to their line separator string since 3 1 public static map known platform line separators map result new hash map result put line separator key mac os 9 line separator value cr result put line separator key unix line separator value lf result put line separator key windows line separator value crlf return result knownplatformlineseparators hashmap line_separator_key_mac_os_9 line_separator_value_cr line_separator_key_unix line_separator_value_lf line_separator_key_windows line_separator_value_crlf returns a list of known windowing system names p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getws code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of window systems known to the system see getws since 3 0 public static string knownws values return internal platform get default knownws values knownwsvalues internalplatform getdefault knownwsvalues returns code true code if the platform is currently running in debug mode the platform is typically put in debug mode using the debug command line argument return whether or not the platform is running in debug mode since 3 0 public static boolean in debug mode return system get property osgi debug null non nls 1 indebugmode getproperty returns code true code if the platform is currently running in development mode that is if special procedures are to be taken when defining plug in class paths the platform is typically put in development mode using the dev command line argument return whether or not the platform is running in development mode since 3 0 public static boolean in development mode return system get property osgi dev null non nls 1 indevelopmentmode getproperty private constructor to block instance creation private platform super adds the given authorization information to the key ring the information is relevant for the specified protection space and the given authorization scheme the protection space is defined by the combination of the given server url and realm the authorization scheme determines what the authorization information contains and how it should be used the authorization information is a code map code of code string code to code string code and typically contains information such as user names and passwords param server url the url identifying the server for this authorization information for example http www example com param realm the subsection of the given server to which this authorization information applies for example realm1 example com or for no realm param auth scheme the scheme for which this authorization information applies for example basic or for no authorization scheme param info a code map code containing authorization information such as user names and passwords key type code string code value type code string code exception core exception if there are problems setting the authorization information reasons include ul li the keyring could not be saved li ul public static void add authorization info url server url string realm string auth scheme map info throws core exception internal platform get default add authorization info server url realm auth scheme info serverurl authscheme coreexception addauthorizationinfo serverurl authscheme coreexception internalplatform getdefault addauthorizationinfo serverurl authscheme adds the given log listener to the notification list of the platform p once registered a listener starts receiving notification as entries are added to plug in logs via code i log log code the listener continues to receive notifications until it is replaced or removed p param listener the listener to register see i log add log listener i log listener see remove log listener i log listener public static void add log listener i log listener listener internal platform get default add log listener listener ilog ilog addloglistener iloglistener removeloglistener iloglistener addloglistener iloglistener internalplatform getdefault addloglistener adds the specified resource to the protection space specified by the given realm all targets at or deeper than the depth of the last symbolic element in the path of the given resource url are assumed to be in the same protection space param resource url the url identifying the resources to be added to the specified protection space for example http www example com folder param realm the name of the protection space for example realm1 example com exception core exception if there are problems setting the authorization information reasons include ul li the key ring could not be saved li ul public static void add protection space url resource url string realm throws core exception internal platform get default add protection space resource url realm resourceurl coreexception addprotectionspace resourceurl coreexception internalplatform getdefault addprotectionspace resourceurl returns a url that is the local equivalent of the supplied url this method is expected to be used with the plug in relative ur ls returned by i plugin descriptor bundle get entry and platform find if the specified url is not a plug in relative url it is returned as is if the specified url is a plug in relative url of a file including jar archive it is returned as a locally accessible url using file protocol extracting caching the file locally if required if the specified url is a plug in relative url of a directory the directory and any files and directories under it are made locally accessible likewise if param url original plug in relative url return the resolved url exception io exception if unable to resolve url see resolve url see find bundle i path see bundle get entry string public static url as localurl url url throws io exception return internal platform get default as localurl url urls iplugindescriptor getentry ioexception ipath getentry aslocalurl ioexception internalplatform getdefault aslocalurl takes down the splash screen if one was put up public static void end splash internal platform get default end splash endsplash internalplatform getdefault endsplash removes the authorization information for the specified protection space and given authorization scheme the protection space is defined by the given server url and realm param server url the url identifying the server to remove the authorization information for for example http www example com param realm the subsection of the given server to remove the authorization information for for example realm1 example com or for no realm param auth scheme the scheme for which the authorization information to remove applies for example basic or for no authorization scheme exception core exception if there are problems removing the authorization information reasons include ul li the keyring could not be saved li ul public static void flush authorization info url server url string realm string auth scheme throws core exception internal platform get default flush authorization info server url realm auth scheme serverurl authscheme coreexception flushauthorizationinfo serverurl authscheme coreexception internalplatform getdefault flushauthorizationinfo serverurl authscheme returns the adapter manager used for extending code i adaptable code objects return the adapter manager for this platform see i adapter manager public static i adapter manager get adapter manager return internal platform get default get adapter manager iadaptable iadaptermanager iadaptermanager getadaptermanager internalplatform getdefault getadaptermanager returns the authorization information for the specified protection space and given authorization scheme the protection space is defined by the given server url and realm returns code null code if no such information exists param server url the url identifying the server for the authorization information for example http www example com param realm the subsection of the given server to which the authorization information applies for example realm1 example com or for no realm param auth scheme the scheme for which the authorization information applies for example basic or for no authorization scheme return the authorization information for the specified protection space and given authorization scheme or code null code if no such information exists public static map get authorization info url server url string realm string auth scheme return internal platform get default get authorization info server url realm auth scheme serverurl authscheme getauthorizationinfo serverurl authscheme internalplatform getdefault getauthorizationinfo serverurl authscheme returns the command line args provided to the eclipse runtime layer when it was first run the returned value does not include arguments consumed by the lower levels of eclipse e g os gi or the launcher note that individual platform runnables may be provided with different arguments if they are being run individually rather than with code platform run code return the command line used to start the platform public static string get command line args return internal platform get default get command line args osgi getcommandlineargs internalplatform getdefault getcommandlineargs returns the content type manager return the content type manager since 3 0 public static i content type manager get content type manager return internal platform get default get content type manager icontenttypemanager getcontenttypemanager internalplatform getdefault getcontenttypemanager returns the identified option code null code is returned if no such option is found options are specified in the general form i lt plug in id gt lt option path gt i for example code org eclipse core runtime debug code param option the name of the option to lookup return the value of the requested debug option or code null code public static string get debug option string option return internal platform get default get option option getdebugoption internalplatform getdefault getoption returns the location of the platform working directory p callers of this method should consider using code get instance location code instead in various typically non ide related configurations of eclipse the platform working directory may not be on the local file system as such the more general form of this location is as a url p return the location of the platform see get instance location public static i path get location throws illegal state exception return internal platform get default get location getinstancelocation getinstancelocation ipath getlocation illegalstateexception internalplatform getdefault getlocation returns the location of the platform log file this file may contain information about errors that have previously occurred during this invocation of the platform p it is recommended not to keep this value as the log location may vary when an instance location is being set p p note it is very important that users of this method do not leave the log file open for extended periods of time doing so may prevent others from writing to the log file which could result in important error messages being lost it is strongly recommended that clients wanting to read the log file for extended periods should copy the log file contents elsewhere and immediately close the original file p return the path of the log file on disk public static i path get log file location return internal platform get default get meta area get log location ipath getlogfilelocation internalplatform getdefault getmetaarea getloglocation returns the plug in runtime object for the identified plug in or code null code if no such plug in can be found if the plug in is defined but not yet activated the plug in will be activated before being returned p b note b this method is only able to find and return plug in objects for plug ins described using plugin xml according to the traditional eclipse conventions eclipse 3 0 permits plug ins to be described in manifest mf files and to define their own bundle activators such plug ins cannot be discovered by this method p param id the unique identifier of the desired plug in e g code com example acme code return the plug in runtime object or code null code deprecated this method only works if the compatibility layer is installed and must not be used otherwise see the comments on link i plugin descriptor get plugin for details public static plugin get plugin string id try i plugin registry registry get plugin registry if registry null throw new illegal state exception i plugin descriptor pd registry get plugin descriptor id if pd null return null return pd get plugin catch core exception e todo log the exception return null iplugindescriptor getplugin getplugin ipluginregistry getpluginregistry illegalstateexception iplugindescriptor getplugindescriptor getplugin coreexception returns the plug in registry for this platform return the plug in registry see i plugin registry deprecated code i plugin registry code was refactored in eclipse 3 0 this method only works if the compatibility layer is installed and must not be used otherwise see the comments on link i plugin registry and its methods for details public static i plugin registry get plugin registry bundle compatibility internal platform get default get bundle compatibility helper pi runtime compatibility if compatibility null throw new illegal state exception class old internal platform null try old internal platform compatibility load class org eclipse core internal plugins internal platform non nls 1 method get plugin registry old internal platform get method get plugin registry null non nls 1 return i plugin registry get plugin registry invoke old internal platform null catch exception e ignore the exceptions return null return null ipluginregistry ipluginregistry ipluginregistry ipluginregistry getpluginregistry internalplatform getdefault getbundle compatibilityhelper pi_runtime_compatibility illegalstateexception oldinternalplatform oldinternalplatform loadclass internalplatform getpluginregistry oldinternalplatform getmethod getpluginregistry ipluginregistry getpluginregistry oldinternalplatform returns the location in the local file system of the plug in state area for the given plug in the platform must be running p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings p param plugin the plug in whose state location is returned return a local file system path public static i path get plugin state location plugin plugin return plugin get state location ipath getpluginstatelocation getstatelocation returns the protection space realm for the specified resource or code null code if the realm is unknown param resource url the url of the resource whose protection space is returned for example http www example com folder return the protection space realm for the specified resource or code null code if the realm is unknown public static string get protection space url resource url return internal platform get default get protection space resource url resourceurl getprotectionspace resourceurl internalplatform getdefault getprotectionspace resourceurl removes the indicated identical log listener from the notification list of the platform if no such listener exists no action is taken param listener the listener to de register see i log remove log listener i log listener see add log listener i log listener public static void remove log listener i log listener listener internal platform get default remove log listener listener ilog removeloglistener iloglistener addloglistener iloglistener removeloglistener iloglistener internalplatform getdefault removeloglistener returns a url which is the resolved equivalent of the supplied url this method is expected to be used with the plug in relative ur ls returned by i plugin descriptor bundle get entry and platform find p if the specified url is not a plug in relative url it is returned as is if the specified url is a plug in relative url this method attempts to reduce the given url to one which is native to the java class library eg file http etc p p note however that users of this api should not assume too much about the results of this method while it may consistently return a file url in certain installation configurations others may result in jar or http ur ls p param url original plug in relative url return the resolved url exception io exception if unable to resolve url see as localurl url see find bundle i path see bundle get entry string public static url resolve url url throws io exception return internal platform get default resolve url urls iplugindescriptor getentry urls ioexception aslocalurl ipath getentry ioexception internalplatform getdefault runs the given runnable in a protected mode exceptions thrown in the runnable are logged and passed to the runnable s exception handler such exceptions are not rethrown by this method param runnable the runnable to run public static void run i safe runnable runnable internal platform get default run runnable isaferunnable internalplatform getdefault returns the platform job manager return the platform s job manager since 3 0 public static i job manager get job manager return internal platform get default get job manager ijobmanager getjobmanager internalplatform getdefault getjobmanager returns the extension registry for this platform return the extension registry see i extension registry since 3 0 public static i extension registry get extension registry return internal platform get default get registry iextensionregistry iextensionregistry getextensionregistry internalplatform getdefault getregistry returns a url for the given path in the given bundle returns code null code if the url could not be computed or created param bundle the bundle in which to search param path path relative to plug in installation location return a url for the given path or code null code the actual form of the returned url is not specified see find bundle i path map see resolve url see as localurl url since 3 0 public static url find bundle bundle i path path return find support find bundle path null ipath aslocalurl ipath findsupport returns a url for the given path in the given bundle returns code null code if the url could not be computed or created p find looks for this path in given bundle and any attached fragments code null code is returned if no such entry is found note that there is no specific order to the fragments p p the following arguments may also be used pre nl for language specific information os for operating system specific information ws for windowing system specific information pre p p a path of nl about properties in an environment with a default locale of en ca will return a url corresponding to the first place about properties is found according to the following order pre plugin root nl en ca about properties fragment1 root nl en ca about properties fragment2 root nl en ca about properties plugin root nl en about properties fragment1 root nl en about properties fragment2 root nl en about properties plugin root about properties fragment1 root about properties fragment2 root about properties pre p p the current environment variable values can be overridden using the override map argument p param bundle the bundle in which to search param path file path relative to plug in installation location param override map of override substitution arguments to be used for any arg path elements the map keys correspond to the substitution arguments eg nl or os the resulting values must be of type java lang string if the map is code null code or does not contain the required substitution argument the default is used return a url for the given path or code null code the actual form of the returned url is not specified see resolve url see as localurl url since 3 0 public static url find bundle bundle i path path map override return find support find bundle path override en_ca aslocalurl ipath findsupport returns the location in the local file system of the plug in state area for the given bundle if the plug in state area did not exist prior to this call it is created p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings and other configuration parameters p param bundle the bundle whose state location if returned return a local file system path since 3 0 public static i path get state location bundle bundle return internal platform get default get state location bundle ipath getstatelocation internalplatform getdefault getstatelocation returns a number that changes whenever the set of installed plug ins changes this can be used for invalidating caches that are based on the set of currently installed plug ins e g extensions return a number related to the set of installed plug ins since 3 1 public static long get state stamp return internal platform get default get state time stamp getstatestamp internalplatform getdefault getstatetimestamp returns the log for the given bundle if no such log exists one is created param bundle the bundle whose log is returned return the log for the given bundle since 3 0 public static i log get log bundle bundle return internal platform get default get log bundle ilog getlog internalplatform getdefault getlog returns the given bundle s resource bundle for the current locale p this resource bundle is typically stored as the plugin properties file in the plug in itself and contains any translatable strings used in the plug in manifest file plugin xml p p this mechanism is intended only for externalizing strings found in the plug in manifest file using this method for externalizing strings in your code may result in degraded memory performance p param bundle the bundle whose resource bundle is being queried return the resource bundle exception missing resource exception if the resource bundle was not found since 3 0 public static resource bundle get resource bundle bundle bundle throws missing resource exception return internal platform get default get resource bundle bundle missingresourceexception resourcebundle getresourcebundle missingresourceexception internalplatform getdefault getresourcebundle returns a resource string corresponding to the given argument value if the argument value specifies a resource key the string is looked up in the default resource bundle for the given runtime bundle if the argument does not specify a valid key the argument itself is returned as the resource string the key lookup is performed in the file referenced in the bundle localization header of the bundle manifest if a resource string corresponding to the key is not found in the resource bundle the key value or any default text following the key in the argument value is returned as the resource string a key is identified as a string beginning with the character note that the character is stripped off prior to lookup in the resource bundle p equivalent to code get resource string bundle value get resource bundle code p param bundle the bundle whose resource bundle is being queried param value the value to look for return the resource string see get resource bundle bundle since 3 0 public static string get resource string bundle bundle string value return internal platform get default get resource string bundle value getresourcestring getresourcebundle getresourcebundle getresourcestring internalplatform getdefault getresourcestring returns a resource string corresponding to the given argument value and resource bundle in the given runtime bundle if the argument value specifies a resource key the string is looked up in the given resource bundle if the argument does not specify a valid key the argument itself is returned as the resource string the key lookup is performed against the specified resource bundle if a resource string corresponding to the key is not found in the resource bundle the key value or any default text following the key in the argument value is returned as the resource string a key is identified as a string beginning with the character note that the character is stripped off prior to lookup in the resource bundle p for example assume resource bundle plugin properties contains name project name pre get resource string hello world returns hello world li get resource string name returns project name li get resource string name hello world returns project name li get resource string abcd hello world returns hello world li get resource string abcd returns abcd li get resource string name returns name li pre p param bundle the bundle whose resource bundle is being queried param value the value param resource bundle the resource bundle to query return the resource string see get resource bundle bundle since 3 0 public static string get resource string bundle bundle string value resource bundle resource bundle return internal platform get default get resource string bundle value resource bundle getresourcestring getresourcestring getresourcestring getresourcestring getresourcestring getresourcestring resourcebundle getresourcebundle getresourcestring resourcebundle resourcebundle internalplatform getdefault getresourcestring resourcebundle returns the string name of the current system architecture the value is a user defined string if the architecture is specified on the command line otherwise it is the value returned by code java lang system get property os arch code return the string name of the current system architecture since 3 0 public static string getos arch return internal platform get default getos arch getproperty getosarch internalplatform getdefault getosarch returns the string name of the current locale for use in finding files whose path starts with code nl code return the string name of the current locale since 3 0 public static string getnl return internal platform get default getnl internalplatform getdefault returns the string name of the current operating system for use in finding files whose path starts with code os code code os unknown code is returned if the operating system cannot be determined the value may indicate one of the operating systems known to the platform as specified in code knownos values code or a user defined string if the operating system name is specified on the command line return the string name of the current operating system since 3 0 public static string getos return internal platform get default getos os_unknown knownosvalues internalplatform getdefault returns the string name of the current window system for use in finding files whose path starts with code ws code code null code is returned if the window system cannot be determined return the string name of the current window system or code null code since 3 0 public static string getws return internal platform get default getws internalplatform getdefault returns the arguments not consumed by the framework implementation itself which arguments are consumed is implementation specific these arguments are available for use by the application return the array of command line arguments not consumed by the framework since 3 0 public static string get application args return internal platform get default get application args getapplicationargs internalplatform getdefault getapplicationargs returns the platform administrator for this running eclipse p note this is an internal method and em must not em be used by clients which are not part of the eclipse platform this method allows access to classes which are not eclipse platform api but are part of the os gi runtime that the eclipse platform is built on even as the eclipse platform evolves in compatible ways from release to release the details of the os gi implementation might not p return the platform admin for this instance of eclipse since 3 0 public static platform admin get platform admin return internal platform get default get platform admin osgi osgi platformadmin getplatformadmin internalplatform getdefault getplatformadmin returns the location of the platform s working directory also known as the instance data area code null code is returned if the platform is running without an instance location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi instance area p return the location of the platform s instance data area or code null code if none since 3 0 public static location get instance location return internal platform get default get instance location getinstancelocation internalplatform getdefault getinstancelocation returns the currently registered bundle group providers return the currently registered bundle group providers since 3 0 public static i bundle group provider get bundle group providers return internal platform get default get bundle group providers ibundlegroupprovider getbundlegroupproviders internalplatform getdefault getbundlegroupproviders return the interface into the preference mechanism the returned object can be used for such operations as searching for preference values across multiple scopes and preference import export return an object to interface into the preference mechanism since 3 0 public static i preferences service get preferences service return internal platform get default get preferences service ipreferencesservice getpreferencesservice internalplatform getdefault getpreferencesservice returns the product which was selected when running this eclipse instance or code null code if none return the current product or code null code if none since 3 0 public static i product get product return internal platform get default get product iproduct getproduct internalplatform getdefault getproduct registers the given bundle group provider with the platform param provider a provider to register since 3 0 public static void register bundle group provider i bundle group provider provider internal platform get default register bundle group provider provider registerbundlegroupprovider ibundlegroupprovider internalplatform getdefault registerbundlegroupprovider de registers the given bundle group provider with the platform param provider a provider to de register since 3 0 public static void unregister bundle group provider i bundle group provider provider internal platform get default unregister bundle group provider provider unregisterbundlegroupprovider ibundlegroupprovider internalplatform getdefault unregisterbundlegroupprovider returns the location of the configuration information used to run this instance of eclipse the configuration area typically contains the list of plug ins available for use various settings those shared across different instances of the same configuration and any other such data needed by plug ins code null code is returned if the platform is running without a configuration location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi configuration area p return the location of the platform s configuration data area or code null code if none since 3 0 public static location get configuration location return internal platform get default get configuration location getconfigurationlocation internalplatform getdefault getconfigurationlocation returns the location of the platform s user data area the user data area is a location on the system which is specific to the system s current user by default it is located relative to the location given by the system property user home code null code is returned if the platform is running without an user location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi user area p return the location of the platform s user data area or code null code if none since 3 0 public static location get user location return internal platform get default get user location getuserlocation internalplatform getdefault getuserlocation returns the location of the base installation for the running platform code null code is returned if the platform is running without a configuration location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi install area p return the location of the platform s installation area or code null code if none since 3 0 public static location get install location return internal platform get default get install location getinstalllocation internalplatform getdefault getinstalllocation checks if the specified bundle is a fragment bundle param bundle the bundle to query return true if the specified bundle is a fragment bundle otherwise false is returned since 3 0 public static boolean is fragment bundle bundle return internal platform get default is fragment bundle isfragment internalplatform getdefault isfragment returns an array of attached fragment bundles for the specified bundle if the specified bundle is a fragment then tt null tt is returned if no fragments are attached to the specified bundle then tt null tt is returned param bundle the bundle to get the attached fragment bundles for return an array of fragment bundles or tt null tt if the bundle does not have any attached fragment bundles since 3 0 public static bundle get fragments bundle bundle return internal platform get default get fragments bundle getfragments internalplatform getdefault getfragments returns the resolved bundle with the specified symbolic name that has the highest version if no resolved bundles are installed that have the specified symbolic name then null is returned param symbolic name the symbolic name of the bundle to be returned return the bundle that has the specified symbolic name with the highest version or tt null tt if no bundle is found since 3 0 public static bundle get bundle string symbolic name return internal platform get default get bundle symbolic name symbolicname getbundle symbolicname internalplatform getdefault getbundle symbolicname returns all bundles with the specified symbolic name if no resolved bundles with the specified symbolic name can be found tt null tt is returned if the version argument is not null then only the bundles that have the specified symbolic name and a version greater than or equal to the specified version are returned the returned bundles are ordered in descending bundle version order param symbolic name the symbolic name of the bundles that are to be returned param version the version that the return bundle versions must match or tt null tt if no version matching is to be done return the array of bundles with the specified name that match the specified version and match rule or tt null tt if no bundles are found public static bundle get bundles string symbolic name string version return internal platform get default get bundles symbolic name version symbolicname getbundles symbolicname internalplatform getdefault getbundles symbolicname returns an array of host bundles that the specified fragment bundle is attached to or tt null tt if the specified bundle is not attached to a host if the bundle is not a fragment bundle then tt null tt is returned param bundle the bundle to get the host bundles for return an array of host bundles or null if the bundle does not have any host bundles since 3 0 public static bundle get hosts bundle bundle return internal platform get default get hosts bundle gethosts internalplatform getdefault gethosts returns whether the platform is running return code true code if the platform is running and code false code otherwise since 3 0 public static boolean is running return internal platform get default is running isrunning internalplatform getdefault isrunning returns a list of known system architectures p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getos arch code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of system architectures known to the system see getos arch since 3 0 public static string knownos arch values return internal platform get default knownos arch values getosarch getosarch knownosarchvalues internalplatform getdefault knownosarchvalues returns a list of known operating system names p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getos code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of operating systems known to the system see getos since 3 0 public static string knownos values return internal platform get default knownos values knownosvalues internalplatform getdefault knownosvalues returns a map of known platform line separators the keys are translated names of platforms and the values are their associated line separator strings return a map of platform to their line separator string since 3 1 public static map known platform line separators map result new hash map result put line separator key mac os 9 line separator value cr result put line separator key unix line separator value lf result put line separator key windows line separator value crlf return result knownplatformlineseparators hashmap line_separator_key_mac_os_9 line_separator_value_cr line_separator_key_unix line_separator_value_lf line_separator_key_windows line_separator_value_crlf returns a list of known windowing system names p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getws code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of window systems known to the system see getws since 3 0 public static string knownws values return internal platform get default knownws values knownwsvalues internalplatform getdefault knownwsvalues returns code true code if the platform is currently running in debug mode the platform is typically put in debug mode using the debug command line argument return whether or not the platform is running in debug mode since 3 0 public static boolean in debug mode return system get property osgi debug null non nls 1 indebugmode getproperty returns code true code if the platform is currently running in development mode that is if special procedures are to be taken when defining plug in class paths the platform is typically put in development mode using the dev command line argument return whether or not the platform is running in development mode since 3 0 public static boolean in development mode return system get property osgi dev null non nls 1 indevelopmentmode getproperty private constructor to block instance creation private platform super adds the given authorization information to the key ring the information is relevant for the specified protection space and the given authorization scheme the protection space is defined by the combination of the given server url and realm the authorization scheme determines what the authorization information contains and how it should be used the authorization information is a code map code of code string code to code string code and typically contains information such as user names and passwords param server url the url identifying the server for this authorization information for example http www example com param realm the subsection of the given server to which this authorization information applies for example realm1 example com or for no realm param auth scheme the scheme for which this authorization information applies for example basic or for no authorization scheme param info a code map code containing authorization information such as user names and passwords key type code string code value type code string code exception core exception if there are problems setting the authorization information reasons include ul li the keyring could not be saved li ul public static void add authorization info url server url string realm string auth scheme map info throws core exception internal platform get default add authorization info server url realm auth scheme info serverurl authscheme coreexception addauthorizationinfo serverurl authscheme coreexception internalplatform getdefault addauthorizationinfo serverurl authscheme adds the given log listener to the notification list of the platform p once registered a listener starts receiving notification as entries are added to plug in logs via code i log log code the listener continues to receive notifications until it is replaced or removed p param listener the listener to register see i log add log listener i log listener see remove log listener i log listener public static void add log listener i log listener listener internal platform get default add log listener listener ilog ilog addloglistener iloglistener removeloglistener iloglistener addloglistener iloglistener internalplatform getdefault addloglistener adds the specified resource to the protection space specified by the given realm all targets at or deeper than the depth of the last symbolic element in the path of the given resource url are assumed to be in the same protection space param resource url the url identifying the resources to be added to the specified protection space for example http www example com folder param realm the name of the protection space for example realm1 example com exception core exception if there are problems setting the authorization information reasons include ul li the key ring could not be saved li ul public static void add protection space url resource url string realm throws core exception internal platform get default add protection space resource url realm resourceurl coreexception addprotectionspace resourceurl coreexception internalplatform getdefault addprotectionspace resourceurl returns a url that is the local equivalent of the supplied url this method is expected to be used with the plug in relative ur ls returned by i plugin descriptor bundle get entry and platform find if the specified url is not a plug in relative url it is returned as is if the specified url is a plug in relative url of a file including jar archive it is returned as a locally accessible url using file protocol extracting caching the file locally if required if the specified url is a plug in relative url of a directory the directory and any files and directories under it are made locally accessible likewise if param url original plug in relative url return the resolved url exception io exception if unable to resolve url see resolve url see find bundle i path see bundle get entry string public static url as localurl url url throws io exception return internal platform get default as localurl url urls iplugindescriptor getentry ioexception ipath getentry aslocalurl ioexception internalplatform getdefault aslocalurl takes down the splash screen if one was put up public static void end splash internal platform get default end splash endsplash internalplatform getdefault endsplash removes the authorization information for the specified protection space and given authorization scheme the protection space is defined by the given server url and realm param server url the url identifying the server to remove the authorization information for for example http www example com param realm the subsection of the given server to remove the authorization information for for example realm1 example com or for no realm param auth scheme the scheme for which the authorization information to remove applies for example basic or for no authorization scheme exception core exception if there are problems removing the authorization information reasons include ul li the keyring could not be saved li ul public static void flush authorization info url server url string realm string auth scheme throws core exception internal platform get default flush authorization info server url realm auth scheme serverurl authscheme coreexception flushauthorizationinfo serverurl authscheme coreexception internalplatform getdefault flushauthorizationinfo serverurl authscheme returns the adapter manager used for extending code i adaptable code objects return the adapter manager for this platform see i adapter manager public static i adapter manager get adapter manager return internal platform get default get adapter manager iadaptable iadaptermanager iadaptermanager getadaptermanager internalplatform getdefault getadaptermanager returns the authorization information for the specified protection space and given authorization scheme the protection space is defined by the given server url and realm returns code null code if no such information exists param server url the url identifying the server for the authorization information for example http www example com param realm the subsection of the given server to which the authorization information applies for example realm1 example com or for no realm param auth scheme the scheme for which the authorization information applies for example basic or for no authorization scheme return the authorization information for the specified protection space and given authorization scheme or code null code if no such information exists public static map get authorization info url server url string realm string auth scheme return internal platform get default get authorization info server url realm auth scheme serverurl authscheme getauthorizationinfo serverurl authscheme internalplatform getdefault getauthorizationinfo serverurl authscheme returns the command line args provided to the eclipse runtime layer when it was first run the returned value does not include arguments consumed by the lower levels of eclipse e g os gi or the launcher note that individual platform runnables may be provided with different arguments if they are being run individually rather than with code platform run code return the command line used to start the platform public static string get command line args return internal platform get default get command line args osgi getcommandlineargs internalplatform getdefault getcommandlineargs returns the content type manager return the content type manager since 3 0 public static i content type manager get content type manager return internal platform get default get content type manager icontenttypemanager getcontenttypemanager internalplatform getdefault getcontenttypemanager returns the identified option code null code is returned if no such option is found options are specified in the general form i lt plug in id gt lt option path gt i for example code org eclipse core runtime debug code param option the name of the option to lookup return the value of the requested debug option or code null code public static string get debug option string option return internal platform get default get option option getdebugoption internalplatform getdefault getoption returns the location of the platform working directory p callers of this method should consider using code get instance location code instead in various typically non ide related configurations of eclipse the platform working directory may not be on the local file system as such the more general form of this location is as a url p return the location of the platform see get instance location public static i path get location throws illegal state exception return internal platform get default get location getinstancelocation getinstancelocation ipath getlocation illegalstateexception internalplatform getdefault getlocation returns the location of the platform log file this file may contain information about errors that have previously occurred during this invocation of the platform p it is recommended not to keep this value as the log location may vary when an instance location is being set p p note it is very important that users of this method do not leave the log file open for extended periods of time doing so may prevent others from writing to the log file which could result in important error messages being lost it is strongly recommended that clients wanting to read the log file for extended periods should copy the log file contents elsewhere and immediately close the original file p return the path of the log file on disk public static i path get log file location return internal platform get default get meta area get log location ipath getlogfilelocation internalplatform getdefault getmetaarea getloglocation returns the plug in runtime object for the identified plug in or code null code if no such plug in can be found if the plug in is defined but not yet activated the plug in will be activated before being returned p b note b this method is only able to find and return plug in objects for plug ins described using plugin xml according to the traditional eclipse conventions eclipse 3 0 permits plug ins to be described in manifest mf files and to define their own bundle activators such plug ins cannot be discovered by this method p param id the unique identifier of the desired plug in e g code com example acme code return the plug in runtime object or code null code deprecated this method only works if the compatibility layer is installed and must not be used otherwise see the comments on link i plugin descriptor get plugin for details public static plugin get plugin string id try i plugin registry registry get plugin registry if registry null throw new illegal state exception i plugin descriptor pd registry get plugin descriptor id if pd null return null return pd get plugin catch core exception e todo log the exception return null iplugindescriptor getplugin getplugin ipluginregistry getpluginregistry illegalstateexception iplugindescriptor getplugindescriptor getplugin coreexception returns the plug in registry for this platform return the plug in registry see i plugin registry deprecated code i plugin registry code was refactored in eclipse 3 0 this method only works if the compatibility layer is installed and must not be used otherwise see the comments on link i plugin registry and its methods for details public static i plugin registry get plugin registry bundle compatibility internal platform get default get bundle compatibility helper pi runtime compatibility if compatibility null throw new illegal state exception class old internal platform null try old internal platform compatibility load class org eclipse core internal plugins internal platform non nls 1 method get plugin registry old internal platform get method get plugin registry null non nls 1 return i plugin registry get plugin registry invoke old internal platform null catch exception e ignore the exceptions return null return null ipluginregistry ipluginregistry ipluginregistry ipluginregistry getpluginregistry internalplatform getdefault getbundle compatibilityhelper pi_runtime_compatibility illegalstateexception oldinternalplatform oldinternalplatform loadclass internalplatform getpluginregistry oldinternalplatform getmethod getpluginregistry ipluginregistry getpluginregistry oldinternalplatform returns the location in the local file system of the plug in state area for the given plug in the platform must be running p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings p param plugin the plug in whose state location is returned return a local file system path public static i path get plugin state location plugin plugin return plugin get state location ipath getpluginstatelocation getstatelocation returns the protection space realm for the specified resource or code null code if the realm is unknown param resource url the url of the resource whose protection space is returned for example http www example com folder return the protection space realm for the specified resource or code null code if the realm is unknown public static string get protection space url resource url return internal platform get default get protection space resource url resourceurl getprotectionspace resourceurl internalplatform getdefault getprotectionspace resourceurl removes the indicated identical log listener from the notification list of the platform if no such listener exists no action is taken param listener the listener to de register see i log remove log listener i log listener see add log listener i log listener public static void remove log listener i log listener listener internal platform get default remove log listener listener ilog removeloglistener iloglistener addloglistener iloglistener removeloglistener iloglistener internalplatform getdefault removeloglistener returns a url which is the resolved equivalent of the supplied url this method is expected to be used with the plug in relative ur ls returned by i plugin descriptor bundle get entry and platform find p if the specified url is not a plug in relative url it is returned as is if the specified url is a plug in relative url this method attempts to reduce the given url to one which is native to the java class library eg file http etc p p note however that users of this api should not assume too much about the results of this method while it may consistently return a file url in certain installation configurations others may result in jar or http ur ls p param url original plug in relative url return the resolved url exception io exception if unable to resolve url see as localurl url see find bundle i path see bundle get entry string public static url resolve url url throws io exception return internal platform get default resolve url urls iplugindescriptor getentry urls ioexception aslocalurl ipath getentry ioexception internalplatform getdefault runs the given runnable in a protected mode exceptions thrown in the runnable are logged and passed to the runnable s exception handler such exceptions are not rethrown by this method param runnable the runnable to run public static void run i safe runnable runnable internal platform get default run runnable isaferunnable internalplatform getdefault returns the platform job manager return the platform s job manager since 3 0 public static i job manager get job manager return internal platform get default get job manager ijobmanager getjobmanager internalplatform getdefault getjobmanager returns the extension registry for this platform return the extension registry see i extension registry since 3 0 public static i extension registry get extension registry return internal platform get default get registry iextensionregistry iextensionregistry getextensionregistry internalplatform getdefault getregistry returns a url for the given path in the given bundle returns code null code if the url could not be computed or created param bundle the bundle in which to search param path path relative to plug in installation location return a url for the given path or code null code the actual form of the returned url is not specified see find bundle i path map see resolve url see as localurl url since 3 0 public static url find bundle bundle i path path return find support find bundle path null ipath aslocalurl ipath findsupport returns a url for the given path in the given bundle returns code null code if the url could not be computed or created p find looks for this path in given bundle and any attached fragments code null code is returned if no such entry is found note that there is no specific order to the fragments p p the following arguments may also be used pre nl for language specific information os for operating system specific information ws for windowing system specific information pre p p a path of nl about properties in an environment with a default locale of en ca will return a url corresponding to the first place about properties is found according to the following order pre plugin root nl en ca about properties fragment1 root nl en ca about properties fragment2 root nl en ca about properties plugin root nl en about properties fragment1 root nl en about properties fragment2 root nl en about properties plugin root about properties fragment1 root about properties fragment2 root about properties pre p p the current environment variable values can be overridden using the override map argument p param bundle the bundle in which to search param path file path relative to plug in installation location param override map of override substitution arguments to be used for any arg path elements the map keys correspond to the substitution arguments eg nl or os the resulting values must be of type java lang string if the map is code null code or does not contain the required substitution argument the default is used return a url for the given path or code null code the actual form of the returned url is not specified see resolve url see as localurl url since 3 0 public static url find bundle bundle i path path map override return find support find bundle path override en_ca aslocalurl ipath findsupport returns the location in the local file system of the plug in state area for the given bundle if the plug in state area did not exist prior to this call it is created p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings and other configuration parameters p param bundle the bundle whose state location if returned return a local file system path since 3 0 public static i path get state location bundle bundle return internal platform get default get state location bundle ipath getstatelocation internalplatform getdefault getstatelocation returns a number that changes whenever the set of installed plug ins changes this can be used for invalidating caches that are based on the set of currently installed plug ins e g extensions return a number related to the set of installed plug ins since 3 1 public static long get state stamp return internal platform get default get state time stamp getstatestamp internalplatform getdefault getstatetimestamp returns the log for the given bundle if no such log exists one is created param bundle the bundle whose log is returned return the log for the given bundle since 3 0 public static i log get log bundle bundle return internal platform get default get log bundle ilog getlog internalplatform getdefault getlog returns the given bundle s resource bundle for the current locale p this resource bundle is typically stored as the plugin properties file in the plug in itself and contains any translatable strings used in the plug in manifest file plugin xml p p this mechanism is intended only for externalizing strings found in the plug in manifest file using this method for externalizing strings in your code may result in degraded memory performance p param bundle the bundle whose resource bundle is being queried return the resource bundle exception missing resource exception if the resource bundle was not found since 3 0 public static resource bundle get resource bundle bundle bundle throws missing resource exception return internal platform get default get resource bundle bundle missingresourceexception resourcebundle getresourcebundle missingresourceexception internalplatform getdefault getresourcebundle returns a resource string corresponding to the given argument value if the argument value specifies a resource key the string is looked up in the default resource bundle for the given runtime bundle if the argument does not specify a valid key the argument itself is returned as the resource string the key lookup is performed in the file referenced in the bundle localization header of the bundle manifest if a resource string corresponding to the key is not found in the resource bundle the key value or any default text following the key in the argument value is returned as the resource string a key is identified as a string beginning with the character note that the character is stripped off prior to lookup in the resource bundle p equivalent to code get resource string bundle value get resource bundle code p param bundle the bundle whose resource bundle is being queried param value the value to look for return the resource string see get resource bundle bundle since 3 0 public static string get resource string bundle bundle string value return internal platform get default get resource string bundle value getresourcestring getresourcebundle getresourcebundle getresourcestring internalplatform getdefault getresourcestring returns a resource string corresponding to the given argument value and resource bundle in the given runtime bundle if the argument value specifies a resource key the string is looked up in the given resource bundle if the argument does not specify a valid key the argument itself is returned as the resource string the key lookup is performed against the specified resource bundle if a resource string corresponding to the key is not found in the resource bundle the key value or any default text following the key in the argument value is returned as the resource string a key is identified as a string beginning with the character note that the character is stripped off prior to lookup in the resource bundle p for example assume resource bundle plugin properties contains name project name pre get resource string hello world returns hello world li get resource string name returns project name li get resource string name hello world returns project name li get resource string abcd hello world returns hello world li get resource string abcd returns abcd li get resource string name returns name li pre p param bundle the bundle whose resource bundle is being queried param value the value param resource bundle the resource bundle to query return the resource string see get resource bundle bundle since 3 0 public static string get resource string bundle bundle string value resource bundle resource bundle return internal platform get default get resource string bundle value resource bundle getresourcestring getresourcestring getresourcestring getresourcestring getresourcestring getresourcestring resourcebundle getresourcebundle getresourcestring resourcebundle resourcebundle internalplatform getdefault getresourcestring resourcebundle returns the string name of the current system architecture the value is a user defined string if the architecture is specified on the command line otherwise it is the value returned by code java lang system get property os arch code return the string name of the current system architecture since 3 0 public static string getos arch return internal platform get default getos arch getproperty getosarch internalplatform getdefault getosarch returns the string name of the current locale for use in finding files whose path starts with code nl code return the string name of the current locale since 3 0 public static string getnl return internal platform get default getnl internalplatform getdefault returns the string name of the current operating system for use in finding files whose path starts with code os code code os unknown code is returned if the operating system cannot be determined the value may indicate one of the operating systems known to the platform as specified in code knownos values code or a user defined string if the operating system name is specified on the command line return the string name of the current operating system since 3 0 public static string getos return internal platform get default getos os_unknown knownosvalues internalplatform getdefault returns the string name of the current window system for use in finding files whose path starts with code ws code code null code is returned if the window system cannot be determined return the string name of the current window system or code null code since 3 0 public static string getws return internal platform get default getws internalplatform getdefault returns the arguments not consumed by the framework implementation itself which arguments are consumed is implementation specific these arguments are available for use by the application return the array of command line arguments not consumed by the framework since 3 0 public static string get application args return internal platform get default get application args getapplicationargs internalplatform getdefault getapplicationargs returns the platform administrator for this running eclipse p note this is an internal method and em must not em be used by clients which are not part of the eclipse platform this method allows access to classes which are not eclipse platform api but are part of the os gi runtime that the eclipse platform is built on even as the eclipse platform evolves in compatible ways from release to release the details of the os gi implementation might not p return the platform admin for this instance of eclipse since 3 0 public static platform admin get platform admin return internal platform get default get platform admin osgi osgi platformadmin getplatformadmin internalplatform getdefault getplatformadmin returns the location of the platform s working directory also known as the instance data area code null code is returned if the platform is running without an instance location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi instance area p return the location of the platform s instance data area or code null code if none since 3 0 public static location get instance location return internal platform get default get instance location getinstancelocation internalplatform getdefault getinstancelocation returns the currently registered bundle group providers return the currently registered bundle group providers since 3 0 public static i bundle group provider get bundle group providers return internal platform get default get bundle group providers ibundlegroupprovider getbundlegroupproviders internalplatform getdefault getbundlegroupproviders return the interface into the preference mechanism the returned object can be used for such operations as searching for preference values across multiple scopes and preference import export return an object to interface into the preference mechanism since 3 0 public static i preferences service get preferences service return internal platform get default get preferences service ipreferencesservice getpreferencesservice internalplatform getdefault getpreferencesservice returns the product which was selected when running this eclipse instance or code null code if none return the current product or code null code if none since 3 0 public static i product get product return internal platform get default get product iproduct getproduct internalplatform getdefault getproduct registers the given bundle group provider with the platform param provider a provider to register since 3 0 public static void register bundle group provider i bundle group provider provider internal platform get default register bundle group provider provider registerbundlegroupprovider ibundlegroupprovider internalplatform getdefault registerbundlegroupprovider de registers the given bundle group provider with the platform param provider a provider to de register since 3 0 public static void unregister bundle group provider i bundle group provider provider internal platform get default unregister bundle group provider provider unregisterbundlegroupprovider ibundlegroupprovider internalplatform getdefault unregisterbundlegroupprovider returns the location of the configuration information used to run this instance of eclipse the configuration area typically contains the list of plug ins available for use various settings those shared across different instances of the same configuration and any other such data needed by plug ins code null code is returned if the platform is running without a configuration location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi configuration area p return the location of the platform s configuration data area or code null code if none since 3 0 public static location get configuration location return internal platform get default get configuration location getconfigurationlocation internalplatform getdefault getconfigurationlocation returns the location of the platform s user data area the user data area is a location on the system which is specific to the system s current user by default it is located relative to the location given by the system property user home code null code is returned if the platform is running without an user location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi user area p return the location of the platform s user data area or code null code if none since 3 0 public static location get user location return internal platform get default get user location getuserlocation internalplatform getdefault getuserlocation returns the location of the base installation for the running platform code null code is returned if the platform is running without a configuration location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi install area p return the location of the platform s installation area or code null code if none since 3 0 public static location get install location return internal platform get default get install location getinstalllocation internalplatform getdefault getinstalllocation checks if the specified bundle is a fragment bundle param bundle the bundle to query return true if the specified bundle is a fragment bundle otherwise false is returned since 3 0 public static boolean is fragment bundle bundle return internal platform get default is fragment bundle isfragment internalplatform getdefault isfragment returns an array of attached fragment bundles for the specified bundle if the specified bundle is a fragment then tt null tt is returned if no fragments are attached to the specified bundle then tt null tt is returned param bundle the bundle to get the attached fragment bundles for return an array of fragment bundles or tt null tt if the bundle does not have any attached fragment bundles since 3 0 public static bundle get fragments bundle bundle return internal platform get default get fragments bundle getfragments internalplatform getdefault getfragments returns the resolved bundle with the specified symbolic name that has the highest version if no resolved bundles are installed that have the specified symbolic name then null is returned param symbolic name the symbolic name of the bundle to be returned return the bundle that has the specified symbolic name with the highest version or tt null tt if no bundle is found since 3 0 public static bundle get bundle string symbolic name return internal platform get default get bundle symbolic name symbolicname getbundle symbolicname internalplatform getdefault getbundle symbolicname returns all bundles with the specified symbolic name if no resolved bundles with the specified symbolic name can be found tt null tt is returned if the version argument is not null then only the bundles that have the specified symbolic name and a version greater than or equal to the specified version are returned the returned bundles are ordered in descending bundle version order param symbolic name the symbolic name of the bundles that are to be returned param version the version that the return bundle versions must match or tt null tt if no version matching is to be done return the array of bundles with the specified name that match the specified version and match rule or tt null tt if no bundles are found public static bundle get bundles string symbolic name string version return internal platform get default get bundles symbolic name version symbolicname getbundles symbolicname internalplatform getdefault getbundles symbolicname returns an array of host bundles that the specified fragment bundle is attached to or tt null tt if the specified bundle is not attached to a host if the bundle is not a fragment bundle then tt null tt is returned param bundle the bundle to get the host bundles for return an array of host bundles or null if the bundle does not have any host bundles since 3 0 public static bundle get hosts bundle bundle return internal platform get default get hosts bundle gethosts internalplatform getdefault gethosts returns whether the platform is running return code true code if the platform is running and code false code otherwise since 3 0 public static boolean is running return internal platform get default is running isrunning internalplatform getdefault isrunning returns a list of known system architectures p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getos arch code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of system architectures known to the system see getos arch since 3 0 public static string knownos arch values return internal platform get default knownos arch values getosarch getosarch knownosarchvalues internalplatform getdefault knownosarchvalues returns a list of known operating system names p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getos code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of operating systems known to the system see getos since 3 0 public static string knownos values return internal platform get default knownos values knownosvalues internalplatform getdefault knownosvalues returns a map of known platform line separators the keys are translated names of platforms and the values are their associated line separator strings return a map of platform to their line separator string since 3 1 public static map known platform line separators map result new hash map result put line separator key mac os 9 line separator value cr result put line separator key unix line separator value lf result put line separator key windows line separator value crlf return result knownplatformlineseparators hashmap line_separator_key_mac_os_9 line_separator_value_cr line_separator_key_unix line_separator_value_lf line_separator_key_windows line_separator_value_crlf returns a list of known windowing system names p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getws code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of window systems known to the system see getws since 3 0 public static string knownws values return internal platform get default knownws values knownwsvalues internalplatform getdefault knownwsvalues returns code true code if the platform is currently running in debug mode the platform is typically put in debug mode using the debug command line argument return whether or not the platform is running in debug mode since 3 0 public static boolean in debug mode return system get property osgi debug null non nls 1 indebugmode getproperty returns code true code if the platform is currently running in development mode that is if special procedures are to be taken when defining plug in class paths the platform is typically put in development mode using the dev command line argument return whether or not the platform is running in development mode since 3 0 public static boolean in development mode return system get property osgi dev null non nls 1 indevelopmentmode getproperty private constructor to block instance creation private platform super adds the given authorization information to the key ring the information is relevant for the specified protection space and the given authorization scheme the protection space is defined by the combination of the given server url and realm the authorization scheme determines what the authorization information contains and how it should be used the authorization information is a code map code of code string code to code string code and typically contains information such as user names and passwords param server url the url identifying the server for this authorization information for example http www example com param realm the subsection of the given server to which this authorization information applies for example realm1 example com or for no realm param auth scheme the scheme for which this authorization information applies for example basic or for no authorization scheme param info a code map code containing authorization information such as user names and passwords key type code string code value type code string code exception core exception if there are problems setting the authorization information reasons include ul li the keyring could not be saved li ul public static void add authorization info url server url string realm string auth scheme map info throws core exception internal platform get default add authorization info server url realm auth scheme info serverurl authscheme coreexception addauthorizationinfo serverurl authscheme coreexception internalplatform getdefault addauthorizationinfo serverurl authscheme adds the given log listener to the notification list of the platform p once registered a listener starts receiving notification as entries are added to plug in logs via code i log log code the listener continues to receive notifications until it is replaced or removed p param listener the listener to register see i log add log listener i log listener see remove log listener i log listener public static void add log listener i log listener listener internal platform get default add log listener listener ilog ilog addloglistener iloglistener removeloglistener iloglistener addloglistener iloglistener internalplatform getdefault addloglistener adds the specified resource to the protection space specified by the given realm all targets at or deeper than the depth of the last symbolic element in the path of the given resource url are assumed to be in the same protection space param resource url the url identifying the resources to be added to the specified protection space for example http www example com folder param realm the name of the protection space for example realm1 example com exception core exception if there are problems setting the authorization information reasons include ul li the key ring could not be saved li ul public static void add protection space url resource url string realm throws core exception internal platform get default add protection space resource url realm resourceurl coreexception addprotectionspace resourceurl coreexception internalplatform getdefault addprotectionspace resourceurl returns a url that is the local equivalent of the supplied url this method is expected to be used with the plug in relative ur ls returned by i plugin descriptor bundle get entry and platform find if the specified url is not a plug in relative url it is returned as is if the specified url is a plug in relative url of a file including jar archive it is returned as a locally accessible url using file protocol extracting caching the file locally if required if the specified url is a plug in relative url of a directory the directory and any files and directories under it are made locally accessible likewise if param url original plug in relative url return the resolved url exception io exception if unable to resolve url see resolve url see find bundle i path see bundle get entry string public static url as localurl url url throws io exception return internal platform get default as localurl url urls iplugindescriptor getentry ioexception ipath getentry aslocalurl ioexception internalplatform getdefault aslocalurl takes down the splash screen if one was put up public static void end splash internal platform get default end splash endsplash internalplatform getdefault endsplash removes the authorization information for the specified protection space and given authorization scheme the protection space is defined by the given server url and realm param server url the url identifying the server to remove the authorization information for for example http www example com param realm the subsection of the given server to remove the authorization information for for example realm1 example com or for no realm param auth scheme the scheme for which the authorization information to remove applies for example basic or for no authorization scheme exception core exception if there are problems removing the authorization information reasons include ul li the keyring could not be saved li ul public static void flush authorization info url server url string realm string auth scheme throws core exception internal platform get default flush authorization info server url realm auth scheme serverurl authscheme coreexception flushauthorizationinfo serverurl authscheme coreexception internalplatform getdefault flushauthorizationinfo serverurl authscheme returns the adapter manager used for extending code i adaptable code objects return the adapter manager for this platform see i adapter manager public static i adapter manager get adapter manager return internal platform get default get adapter manager iadaptable iadaptermanager iadaptermanager getadaptermanager internalplatform getdefault getadaptermanager returns the authorization information for the specified protection space and given authorization scheme the protection space is defined by the given server url and realm returns code null code if no such information exists param server url the url identifying the server for the authorization information for example http www example com param realm the subsection of the given server to which the authorization information applies for example realm1 example com or for no realm param auth scheme the scheme for which the authorization information applies for example basic or for no authorization scheme return the authorization information for the specified protection space and given authorization scheme or code null code if no such information exists public static map get authorization info url server url string realm string auth scheme return internal platform get default get authorization info server url realm auth scheme serverurl authscheme getauthorizationinfo serverurl authscheme internalplatform getdefault getauthorizationinfo serverurl authscheme returns the command line args provided to the eclipse runtime layer when it was first run the returned value does not include arguments consumed by the lower levels of eclipse e g os gi or the launcher note that individual platform runnables may be provided with different arguments if they are being run individually rather than with code platform run code return the command line used to start the platform public static string get command line args return internal platform get default get command line args osgi getcommandlineargs internalplatform getdefault getcommandlineargs returns the content type manager return the content type manager since 3 0 public static i content type manager get content type manager return internal platform get default get content type manager icontenttypemanager getcontenttypemanager internalplatform getdefault getcontenttypemanager returns the identified option code null code is returned if no such option is found options are specified in the general form i lt plug in id gt lt option path gt i for example code org eclipse core runtime debug code param option the name of the option to lookup return the value of the requested debug option or code null code public static string get debug option string option return internal platform get default get option option getdebugoption internalplatform getdefault getoption returns the location of the platform working directory p callers of this method should consider using code get instance location code instead in various typically non ide related configurations of eclipse the platform working directory may not be on the local file system as such the more general form of this location is as a url p return the location of the platform see get instance location public static i path get location throws illegal state exception return internal platform get default get location getinstancelocation getinstancelocation ipath getlocation illegalstateexception internalplatform getdefault getlocation returns the location of the platform log file this file may contain information about errors that have previously occurred during this invocation of the platform p it is recommended not to keep this value as the log location may vary when an instance location is being set p p note it is very important that users of this method do not leave the log file open for extended periods of time doing so may prevent others from writing to the log file which could result in important error messages being lost it is strongly recommended that clients wanting to read the log file for extended periods should copy the log file contents elsewhere and immediately close the original file p return the path of the log file on disk public static i path get log file location return internal platform get default get meta area get log location ipath getlogfilelocation internalplatform getdefault getmetaarea getloglocation returns the plug in runtime object for the identified plug in or code null code if no such plug in can be found if the plug in is defined but not yet activated the plug in will be activated before being returned p b note b this method is only able to find and return plug in objects for plug ins described using plugin xml according to the traditional eclipse conventions eclipse 3 0 permits plug ins to be described in manifest mf files and to define their own bundle activators such plug ins cannot be discovered by this method p param id the unique identifier of the desired plug in e g code com example acme code return the plug in runtime object or code null code deprecated this method only works if the compatibility layer is installed and must not be used otherwise see the comments on link i plugin descriptor get plugin for details public static plugin get plugin string id try i plugin registry registry get plugin registry if registry null throw new illegal state exception i plugin descriptor pd registry get plugin descriptor id if pd null return null return pd get plugin catch core exception e todo log the exception return null iplugindescriptor getplugin getplugin ipluginregistry getpluginregistry illegalstateexception iplugindescriptor getplugindescriptor getplugin coreexception returns the plug in registry for this platform return the plug in registry see i plugin registry deprecated code i plugin registry code was refactored in eclipse 3 0 this method only works if the compatibility layer is installed and must not be used otherwise see the comments on link i plugin registry and its methods for details public static i plugin registry get plugin registry bundle compatibility internal platform get default get bundle compatibility helper pi runtime compatibility if compatibility null throw new illegal state exception class old internal platform null try old internal platform compatibility load class org eclipse core internal plugins internal platform non nls 1 method get plugin registry old internal platform get method get plugin registry null non nls 1 return i plugin registry get plugin registry invoke old internal platform null catch exception e ignore the exceptions return null return null ipluginregistry ipluginregistry ipluginregistry ipluginregistry getpluginregistry internalplatform getdefault getbundle compatibilityhelper pi_runtime_compatibility illegalstateexception oldinternalplatform oldinternalplatform loadclass internalplatform getpluginregistry oldinternalplatform getmethod getpluginregistry ipluginregistry getpluginregistry oldinternalplatform returns the location in the local file system of the plug in state area for the given plug in the platform must be running p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings p param plugin the plug in whose state location is returned return a local file system path public static i path get plugin state location plugin plugin return plugin get state location ipath getpluginstatelocation getstatelocation returns the protection space realm for the specified resource or code null code if the realm is unknown param resource url the url of the resource whose protection space is returned for example http www example com folder return the protection space realm for the specified resource or code null code if the realm is unknown public static string get protection space url resource url return internal platform get default get protection space resource url resourceurl getprotectionspace resourceurl internalplatform getdefault getprotectionspace resourceurl removes the indicated identical log listener from the notification list of the platform if no such listener exists no action is taken param listener the listener to de register see i log remove log listener i log listener see add log listener i log listener public static void remove log listener i log listener listener internal platform get default remove log listener listener ilog removeloglistener iloglistener addloglistener iloglistener removeloglistener iloglistener internalplatform getdefault removeloglistener returns a url which is the resolved equivalent of the supplied url this method is expected to be used with the plug in relative ur ls returned by i plugin descriptor bundle get entry and platform find p if the specified url is not a plug in relative url it is returned as is if the specified url is a plug in relative url this method attempts to reduce the given url to one which is native to the java class library eg file http etc p p note however that users of this api should not assume too much about the results of this method while it may consistently return a file url in certain installation configurations others may result in jar or http ur ls p param url original plug in relative url return the resolved url exception io exception if unable to resolve url see as localurl url see find bundle i path see bundle get entry string public static url resolve url url throws io exception return internal platform get default resolve url urls iplugindescriptor getentry urls ioexception aslocalurl ipath getentry ioexception internalplatform getdefault runs the given runnable in a protected mode exceptions thrown in the runnable are logged and passed to the runnable s exception handler such exceptions are not rethrown by this method param runnable the runnable to run public static void run i safe runnable runnable internal platform get default run runnable isaferunnable internalplatform getdefault returns the platform job manager return the platform s job manager since 3 0 public static i job manager get job manager return internal platform get default get job manager ijobmanager getjobmanager internalplatform getdefault getjobmanager returns the extension registry for this platform return the extension registry see i extension registry since 3 0 public static i extension registry get extension registry return internal platform get default get registry iextensionregistry iextensionregistry getextensionregistry internalplatform getdefault getregistry returns a url for the given path in the given bundle returns code null code if the url could not be computed or created param bundle the bundle in which to search param path path relative to plug in installation location return a url for the given path or code null code the actual form of the returned url is not specified see find bundle i path map see resolve url see as localurl url since 3 0 public static url find bundle bundle i path path return find support find bundle path null ipath aslocalurl ipath findsupport returns a url for the given path in the given bundle returns code null code if the url could not be computed or created p find looks for this path in given bundle and any attached fragments code null code is returned if no such entry is found note that there is no specific order to the fragments p p the following arguments may also be used pre nl for language specific information os for operating system specific information ws for windowing system specific information pre p p a path of nl about properties in an environment with a default locale of en ca will return a url corresponding to the first place about properties is found according to the following order pre plugin root nl en ca about properties fragment1 root nl en ca about properties fragment2 root nl en ca about properties plugin root nl en about properties fragment1 root nl en about properties fragment2 root nl en about properties plugin root about properties fragment1 root about properties fragment2 root about properties pre p p the current environment variable values can be overridden using the override map argument p param bundle the bundle in which to search param path file path relative to plug in installation location param override map of override substitution arguments to be used for any arg path elements the map keys correspond to the substitution arguments eg nl or os the resulting values must be of type java lang string if the map is code null code or does not contain the required substitution argument the default is used return a url for the given path or code null code the actual form of the returned url is not specified see resolve url see as localurl url since 3 0 public static url find bundle bundle i path path map override return find support find bundle path override en_ca aslocalurl ipath findsupport returns the location in the local file system of the plug in state area for the given bundle if the plug in state area did not exist prior to this call it is created p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings and other configuration parameters p param bundle the bundle whose state location if returned return a local file system path since 3 0 public static i path get state location bundle bundle return internal platform get default get state location bundle ipath getstatelocation internalplatform getdefault getstatelocation returns a number that changes whenever the set of installed plug ins changes this can be used for invalidating caches that are based on the set of currently installed plug ins e g extensions return a number related to the set of installed plug ins since 3 1 public static long get state stamp return internal platform get default get state time stamp getstatestamp internalplatform getdefault getstatetimestamp returns the log for the given bundle if no such log exists one is created param bundle the bundle whose log is returned return the log for the given bundle since 3 0 public static i log get log bundle bundle return internal platform get default get log bundle ilog getlog internalplatform getdefault getlog returns the given bundle s resource bundle for the current locale p this resource bundle is typically stored as the plugin properties file in the plug in itself and contains any translatable strings used in the plug in manifest file plugin xml p p this mechanism is intended only for externalizing strings found in the plug in manifest file using this method for externalizing strings in your code may result in degraded memory performance p param bundle the bundle whose resource bundle is being queried return the resource bundle exception missing resource exception if the resource bundle was not found since 3 0 public static resource bundle get resource bundle bundle bundle throws missing resource exception return internal platform get default get resource bundle bundle missingresourceexception resourcebundle getresourcebundle missingresourceexception internalplatform getdefault getresourcebundle returns a resource string corresponding to the given argument value if the argument value specifies a resource key the string is looked up in the default resource bundle for the given runtime bundle if the argument does not specify a valid key the argument itself is returned as the resource string the key lookup is performed in the file referenced in the bundle localization header of the bundle manifest if a resource string corresponding to the key is not found in the resource bundle the key value or any default text following the key in the argument value is returned as the resource string a key is identified as a string beginning with the character note that the character is stripped off prior to lookup in the resource bundle p equivalent to code get resource string bundle value get resource bundle code p param bundle the bundle whose resource bundle is being queried param value the value to look for return the resource string see get resource bundle bundle since 3 0 public static string get resource string bundle bundle string value return internal platform get default get resource string bundle value getresourcestring getresourcebundle getresourcebundle getresourcestring internalplatform getdefault getresourcestring returns a resource string corresponding to the given argument value and resource bundle in the given runtime bundle if the argument value specifies a resource key the string is looked up in the given resource bundle if the argument does not specify a valid key the argument itself is returned as the resource string the key lookup is performed against the specified resource bundle if a resource string corresponding to the key is not found in the resource bundle the key value or any default text following the key in the argument value is returned as the resource string a key is identified as a string beginning with the character note that the character is stripped off prior to lookup in the resource bundle p for example assume resource bundle plugin properties contains name project name pre get resource string hello world returns hello world li get resource string name returns project name li get resource string name hello world returns project name li get resource string abcd hello world returns hello world li get resource string abcd returns abcd li get resource string name returns name li pre p param bundle the bundle whose resource bundle is being queried param value the value param resource bundle the resource bundle to query return the resource string see get resource bundle bundle since 3 0 public static string get resource string bundle bundle string value resource bundle resource bundle return internal platform get default get resource string bundle value resource bundle getresourcestring getresourcestring getresourcestring getresourcestring getresourcestring getresourcestring resourcebundle getresourcebundle getresourcestring resourcebundle resourcebundle internalplatform getdefault getresourcestring resourcebundle returns the string name of the current system architecture the value is a user defined string if the architecture is specified on the command line otherwise it is the value returned by code java lang system get property os arch code return the string name of the current system architecture since 3 0 public static string getos arch return internal platform get default getos arch getproperty getosarch internalplatform getdefault getosarch returns the string name of the current locale for use in finding files whose path starts with code nl code return the string name of the current locale since 3 0 public static string getnl return internal platform get default getnl internalplatform getdefault returns the string name of the current operating system for use in finding files whose path starts with code os code code os unknown code is returned if the operating system cannot be determined the value may indicate one of the operating systems known to the platform as specified in code knownos values code or a user defined string if the operating system name is specified on the command line return the string name of the current operating system since 3 0 public static string getos return internal platform get default getos os_unknown knownosvalues internalplatform getdefault returns the string name of the current window system for use in finding files whose path starts with code ws code code null code is returned if the window system cannot be determined return the string name of the current window system or code null code since 3 0 public static string getws return internal platform get default getws internalplatform getdefault returns the arguments not consumed by the framework implementation itself which arguments are consumed is implementation specific these arguments are available for use by the application return the array of command line arguments not consumed by the framework since 3 0 public static string get application args return internal platform get default get application args getapplicationargs internalplatform getdefault getapplicationargs returns the platform administrator for this running eclipse p note this is an internal method and em must not em be used by clients which are not part of the eclipse platform this method allows access to classes which are not eclipse platform api but are part of the os gi runtime that the eclipse platform is built on even as the eclipse platform evolves in compatible ways from release to release the details of the os gi implementation might not p return the platform admin for this instance of eclipse since 3 0 public static platform admin get platform admin return internal platform get default get platform admin osgi osgi platformadmin getplatformadmin internalplatform getdefault getplatformadmin returns the location of the platform s working directory also known as the instance data area code null code is returned if the platform is running without an instance location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi instance area p return the location of the platform s instance data area or code null code if none since 3 0 public static location get instance location return internal platform get default get instance location getinstancelocation internalplatform getdefault getinstancelocation returns the currently registered bundle group providers return the currently registered bundle group providers since 3 0 public static i bundle group provider get bundle group providers return internal platform get default get bundle group providers ibundlegroupprovider getbundlegroupproviders internalplatform getdefault getbundlegroupproviders return the interface into the preference mechanism the returned object can be used for such operations as searching for preference values across multiple scopes and preference import export return an object to interface into the preference mechanism since 3 0 public static i preferences service get preferences service return internal platform get default get preferences service ipreferencesservice getpreferencesservice internalplatform getdefault getpreferencesservice returns the product which was selected when running this eclipse instance or code null code if none return the current product or code null code if none since 3 0 public static i product get product return internal platform get default get product iproduct getproduct internalplatform getdefault getproduct registers the given bundle group provider with the platform param provider a provider to register since 3 0 public static void register bundle group provider i bundle group provider provider internal platform get default register bundle group provider provider registerbundlegroupprovider ibundlegroupprovider internalplatform getdefault registerbundlegroupprovider de registers the given bundle group provider with the platform param provider a provider to de register since 3 0 public static void unregister bundle group provider i bundle group provider provider internal platform get default unregister bundle group provider provider unregisterbundlegroupprovider ibundlegroupprovider internalplatform getdefault unregisterbundlegroupprovider returns the location of the configuration information used to run this instance of eclipse the configuration area typically contains the list of plug ins available for use various settings those shared across different instances of the same configuration and any other such data needed by plug ins code null code is returned if the platform is running without a configuration location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi configuration area p return the location of the platform s configuration data area or code null code if none since 3 0 public static location get configuration location return internal platform get default get configuration location getconfigurationlocation internalplatform getdefault getconfigurationlocation returns the location of the platform s user data area the user data area is a location on the system which is specific to the system s current user by default it is located relative to the location given by the system property user home code null code is returned if the platform is running without an user location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi user area p return the location of the platform s user data area or code null code if none since 3 0 public static location get user location return internal platform get default get user location getuserlocation internalplatform getdefault getuserlocation returns the location of the base installation for the running platform code null code is returned if the platform is running without a configuration location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi install area p return the location of the platform s installation area or code null code if none since 3 0 public static location get install location return internal platform get default get install location getinstalllocation internalplatform getdefault getinstalllocation checks if the specified bundle is a fragment bundle param bundle the bundle to query return true if the specified bundle is a fragment bundle otherwise false is returned since 3 0 public static boolean is fragment bundle bundle return internal platform get default is fragment bundle isfragment internalplatform getdefault isfragment returns an array of attached fragment bundles for the specified bundle if the specified bundle is a fragment then tt null tt is returned if no fragments are attached to the specified bundle then tt null tt is returned param bundle the bundle to get the attached fragment bundles for return an array of fragment bundles or tt null tt if the bundle does not have any attached fragment bundles since 3 0 public static bundle get fragments bundle bundle return internal platform get default get fragments bundle getfragments internalplatform getdefault getfragments returns the resolved bundle with the specified symbolic name that has the highest version if no resolved bundles are installed that have the specified symbolic name then null is returned param symbolic name the symbolic name of the bundle to be returned return the bundle that has the specified symbolic name with the highest version or tt null tt if no bundle is found since 3 0 public static bundle get bundle string symbolic name return internal platform get default get bundle symbolic name symbolicname getbundle symbolicname internalplatform getdefault getbundle symbolicname returns all bundles with the specified symbolic name if no resolved bundles with the specified symbolic name can be found tt null tt is returned if the version argument is not null then only the bundles that have the specified symbolic name and a version greater than or equal to the specified version are returned the returned bundles are ordered in descending bundle version order param symbolic name the symbolic name of the bundles that are to be returned param version the version that the return bundle versions must match or tt null tt if no version matching is to be done return the array of bundles with the specified name that match the specified version and match rule or tt null tt if no bundles are found public static bundle get bundles string symbolic name string version return internal platform get default get bundles symbolic name version symbolicname getbundles symbolicname internalplatform getdefault getbundles symbolicname returns an array of host bundles that the specified fragment bundle is attached to or tt null tt if the specified bundle is not attached to a host if the bundle is not a fragment bundle then tt null tt is returned param bundle the bundle to get the host bundles for return an array of host bundles or null if the bundle does not have any host bundles since 3 0 public static bundle get hosts bundle bundle return internal platform get default get hosts bundle gethosts internalplatform getdefault gethosts returns whether the platform is running return code true code if the platform is running and code false code otherwise since 3 0 public static boolean is running return internal platform get default is running isrunning internalplatform getdefault isrunning returns a list of known system architectures p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getos arch code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of system architectures known to the system see getos arch since 3 0 public static string knownos arch values return internal platform get default knownos arch values getosarch getosarch knownosarchvalues internalplatform getdefault knownosarchvalues returns a list of known operating system names p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getos code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of operating systems known to the system see getos since 3 0 public static string knownos values return internal platform get default knownos values knownosvalues internalplatform getdefault knownosvalues returns a map of known platform line separators the keys are translated names of platforms and the values are their associated line separator strings return a map of platform to their line separator string since 3 1 public static map known platform line separators map result new hash map result put line separator key mac os 9 line separator value cr result put line separator key unix line separator value lf result put line separator key windows line separator value crlf return result knownplatformlineseparators hashmap line_separator_key_mac_os_9 line_separator_value_cr line_separator_key_unix line_separator_value_lf line_separator_key_windows line_separator_value_crlf returns a list of known windowing system names p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getws code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of window systems known to the system see getws since 3 0 public static string knownws values return internal platform get default knownws values knownwsvalues internalplatform getdefault knownwsvalues returns code true code if the platform is currently running in debug mode the platform is typically put in debug mode using the debug command line argument return whether or not the platform is running in debug mode since 3 0 public static boolean in debug mode return system get property osgi debug null non nls 1 indebugmode getproperty returns code true code if the platform is currently running in development mode that is if special procedures are to be taken when defining plug in class paths the platform is typically put in development mode using the dev command line argument return whether or not the platform is running in development mode since 3 0 public static boolean in development mode return system get property osgi dev null non nls 1 indevelopmentmode getproperty private constructor to block instance creation private platform super adds the given authorization information to the key ring the information is relevant for the specified protection space and the given authorization scheme the protection space is defined by the combination of the given server url and realm the authorization scheme determines what the authorization information contains and how it should be used the authorization information is a code map code of code string code to code string code and typically contains information such as user names and passwords param server url the url identifying the server for this authorization information for example http www example com param realm the subsection of the given server to which this authorization information applies for example realm1 example com or for no realm param auth scheme the scheme for which this authorization information applies for example basic or for no authorization scheme param info a code map code containing authorization information such as user names and passwords key type code string code value type code string code exception core exception if there are problems setting the authorization information reasons include ul li the keyring could not be saved li ul public static void add authorization info url server url string realm string auth scheme map info throws core exception internal platform get default add authorization info server url realm auth scheme info serverurl authscheme coreexception addauthorizationinfo serverurl authscheme coreexception internalplatform getdefault addauthorizationinfo serverurl authscheme adds the given log listener to the notification list of the platform p once registered a listener starts receiving notification as entries are added to plug in logs via code i log log code the listener continues to receive notifications until it is replaced or removed p param listener the listener to register see i log add log listener i log listener see remove log listener i log listener public static void add log listener i log listener listener internal platform get default add log listener listener ilog ilog addloglistener iloglistener removeloglistener iloglistener addloglistener iloglistener internalplatform getdefault addloglistener adds the specified resource to the protection space specified by the given realm all targets at or deeper than the depth of the last symbolic element in the path of the given resource url are assumed to be in the same protection space param resource url the url identifying the resources to be added to the specified protection space for example http www example com folder param realm the name of the protection space for example realm1 example com exception core exception if there are problems setting the authorization information reasons include ul li the key ring could not be saved li ul public static void add protection space url resource url string realm throws core exception internal platform get default add protection space resource url realm resourceurl coreexception addprotectionspace resourceurl coreexception internalplatform getdefault addprotectionspace resourceurl returns a url that is the local equivalent of the supplied url this method is expected to be used with the plug in relative ur ls returned by i plugin descriptor bundle get entry and platform find if the specified url is not a plug in relative url it is returned as is if the specified url is a plug in relative url of a file including jar archive it is returned as a locally accessible url using file protocol extracting caching the file locally if required if the specified url is a plug in relative url of a directory the directory and any files and directories under it are made locally accessible likewise if param url original plug in relative url return the resolved url exception io exception if unable to resolve url see resolve url see find bundle i path see bundle get entry string public static url as localurl url url throws io exception return internal platform get default as localurl url urls iplugindescriptor getentry ioexception ipath getentry aslocalurl ioexception internalplatform getdefault aslocalurl takes down the splash screen if one was put up public static void end splash internal platform get default end splash endsplash internalplatform getdefault endsplash removes the authorization information for the specified protection space and given authorization scheme the protection space is defined by the given server url and realm param server url the url identifying the server to remove the authorization information for for example http www example com param realm the subsection of the given server to remove the authorization information for for example realm1 example com or for no realm param auth scheme the scheme for which the authorization information to remove applies for example basic or for no authorization scheme exception core exception if there are problems removing the authorization information reasons include ul li the keyring could not be saved li ul public static void flush authorization info url server url string realm string auth scheme throws core exception internal platform get default flush authorization info server url realm auth scheme serverurl authscheme coreexception flushauthorizationinfo serverurl authscheme coreexception internalplatform getdefault flushauthorizationinfo serverurl authscheme returns the adapter manager used for extending code i adaptable code objects return the adapter manager for this platform see i adapter manager public static i adapter manager get adapter manager return internal platform get default get adapter manager iadaptable iadaptermanager iadaptermanager getadaptermanager internalplatform getdefault getadaptermanager returns the authorization information for the specified protection space and given authorization scheme the protection space is defined by the given server url and realm returns code null code if no such information exists param server url the url identifying the server for the authorization information for example http www example com param realm the subsection of the given server to which the authorization information applies for example realm1 example com or for no realm param auth scheme the scheme for which the authorization information applies for example basic or for no authorization scheme return the authorization information for the specified protection space and given authorization scheme or code null code if no such information exists public static map get authorization info url server url string realm string auth scheme return internal platform get default get authorization info server url realm auth scheme serverurl authscheme getauthorizationinfo serverurl authscheme internalplatform getdefault getauthorizationinfo serverurl authscheme returns the command line args provided to the eclipse runtime layer when it was first run the returned value does not include arguments consumed by the lower levels of eclipse e g os gi or the launcher note that individual platform runnables may be provided with different arguments if they are being run individually rather than with code platform run code return the command line used to start the platform public static string get command line args return internal platform get default get command line args osgi getcommandlineargs internalplatform getdefault getcommandlineargs returns the content type manager return the content type manager since 3 0 public static i content type manager get content type manager return internal platform get default get content type manager icontenttypemanager getcontenttypemanager internalplatform getdefault getcontenttypemanager returns the identified option code null code is returned if no such option is found options are specified in the general form i lt plug in id gt lt option path gt i for example code org eclipse core runtime debug code param option the name of the option to lookup return the value of the requested debug option or code null code public static string get debug option string option return internal platform get default get option option getdebugoption internalplatform getdefault getoption returns the location of the platform working directory p callers of this method should consider using code get instance location code instead in various typically non ide related configurations of eclipse the platform working directory may not be on the local file system as such the more general form of this location is as a url p return the location of the platform see get instance location public static i path get location throws illegal state exception return internal platform get default get location getinstancelocation getinstancelocation ipath getlocation illegalstateexception internalplatform getdefault getlocation returns the location of the platform log file this file may contain information about errors that have previously occurred during this invocation of the platform p it is recommended not to keep this value as the log location may vary when an instance location is being set p p note it is very important that users of this method do not leave the log file open for extended periods of time doing so may prevent others from writing to the log file which could result in important error messages being lost it is strongly recommended that clients wanting to read the log file for extended periods should copy the log file contents elsewhere and immediately close the original file p return the path of the log file on disk public static i path get log file location return internal platform get default get meta area get log location ipath getlogfilelocation internalplatform getdefault getmetaarea getloglocation returns the plug in runtime object for the identified plug in or code null code if no such plug in can be found if the plug in is defined but not yet activated the plug in will be activated before being returned p b note b this method is only able to find and return plug in objects for plug ins described using plugin xml according to the traditional eclipse conventions eclipse 3 0 permits plug ins to be described in manifest mf files and to define their own bundle activators such plug ins cannot be discovered by this method p param id the unique identifier of the desired plug in e g code com example acme code return the plug in runtime object or code null code deprecated this method only works if the compatibility layer is installed and must not be used otherwise see the comments on link i plugin descriptor get plugin for details public static plugin get plugin string id try i plugin registry registry get plugin registry if registry null throw new illegal state exception i plugin descriptor pd registry get plugin descriptor id if pd null return null return pd get plugin catch core exception e todo log the exception return null iplugindescriptor getplugin getplugin ipluginregistry getpluginregistry illegalstateexception iplugindescriptor getplugindescriptor getplugin coreexception returns the plug in registry for this platform return the plug in registry see i plugin registry deprecated code i plugin registry code was refactored in eclipse 3 0 this method only works if the compatibility layer is installed and must not be used otherwise see the comments on link i plugin registry and its methods for details public static i plugin registry get plugin registry bundle compatibility internal platform get default get bundle compatibility helper pi runtime compatibility if compatibility null throw new illegal state exception class old internal platform null try old internal platform compatibility load class org eclipse core internal plugins internal platform non nls 1 method get plugin registry old internal platform get method get plugin registry null non nls 1 return i plugin registry get plugin registry invoke old internal platform null catch exception e ignore the exceptions return null return null ipluginregistry ipluginregistry ipluginregistry ipluginregistry getpluginregistry internalplatform getdefault getbundle compatibilityhelper pi_runtime_compatibility illegalstateexception oldinternalplatform oldinternalplatform loadclass internalplatform getpluginregistry oldinternalplatform getmethod getpluginregistry ipluginregistry getpluginregistry oldinternalplatform returns the location in the local file system of the plug in state area for the given plug in the platform must be running p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings p param plugin the plug in whose state location is returned return a local file system path public static i path get plugin state location plugin plugin return plugin get state location ipath getpluginstatelocation getstatelocation returns the protection space realm for the specified resource or code null code if the realm is unknown param resource url the url of the resource whose protection space is returned for example http www example com folder return the protection space realm for the specified resource or code null code if the realm is unknown public static string get protection space url resource url return internal platform get default get protection space resource url resourceurl getprotectionspace resourceurl internalplatform getdefault getprotectionspace resourceurl removes the indicated identical log listener from the notification list of the platform if no such listener exists no action is taken param listener the listener to de register see i log remove log listener i log listener see add log listener i log listener public static void remove log listener i log listener listener internal platform get default remove log listener listener ilog removeloglistener iloglistener addloglistener iloglistener removeloglistener iloglistener internalplatform getdefault removeloglistener returns a url which is the resolved equivalent of the supplied url this method is expected to be used with the plug in relative ur ls returned by i plugin descriptor bundle get entry and platform find p if the specified url is not a plug in relative url it is returned as is if the specified url is a plug in relative url this method attempts to reduce the given url to one which is native to the java class library eg file http etc p p note however that users of this api should not assume too much about the results of this method while it may consistently return a file url in certain installation configurations others may result in jar or http ur ls p param url original plug in relative url return the resolved url exception io exception if unable to resolve url see as localurl url see find bundle i path see bundle get entry string public static url resolve url url throws io exception return internal platform get default resolve url urls iplugindescriptor getentry urls ioexception aslocalurl ipath getentry ioexception internalplatform getdefault runs the given runnable in a protected mode exceptions thrown in the runnable are logged and passed to the runnable s exception handler such exceptions are not rethrown by this method param runnable the runnable to run public static void run i safe runnable runnable internal platform get default run runnable isaferunnable internalplatform getdefault returns the platform job manager return the platform s job manager since 3 0 public static i job manager get job manager return internal platform get default get job manager ijobmanager getjobmanager internalplatform getdefault getjobmanager returns the extension registry for this platform return the extension registry see i extension registry since 3 0 public static i extension registry get extension registry return internal platform get default get registry iextensionregistry iextensionregistry getextensionregistry internalplatform getdefault getregistry returns a url for the given path in the given bundle returns code null code if the url could not be computed or created param bundle the bundle in which to search param path path relative to plug in installation location return a url for the given path or code null code the actual form of the returned url is not specified see find bundle i path map see resolve url see as localurl url since 3 0 public static url find bundle bundle i path path return find support find bundle path null ipath aslocalurl ipath findsupport returns a url for the given path in the given bundle returns code null code if the url could not be computed or created p find looks for this path in given bundle and any attached fragments code null code is returned if no such entry is found note that there is no specific order to the fragments p p the following arguments may also be used pre nl for language specific information os for operating system specific information ws for windowing system specific information pre p p a path of nl about properties in an environment with a default locale of en ca will return a url corresponding to the first place about properties is found according to the following order pre plugin root nl en ca about properties fragment1 root nl en ca about properties fragment2 root nl en ca about properties plugin root nl en about properties fragment1 root nl en about properties fragment2 root nl en about properties plugin root about properties fragment1 root about properties fragment2 root about properties pre p p the current environment variable values can be overridden using the override map argument p param bundle the bundle in which to search param path file path relative to plug in installation location param override map of override substitution arguments to be used for any arg path elements the map keys correspond to the substitution arguments eg nl or os the resulting values must be of type java lang string if the map is code null code or does not contain the required substitution argument the default is used return a url for the given path or code null code the actual form of the returned url is not specified see resolve url see as localurl url since 3 0 public static url find bundle bundle i path path map override return find support find bundle path override en_ca aslocalurl ipath findsupport returns the location in the local file system of the plug in state area for the given bundle if the plug in state area did not exist prior to this call it is created p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings and other configuration parameters p param bundle the bundle whose state location if returned return a local file system path since 3 0 public static i path get state location bundle bundle return internal platform get default get state location bundle ipath getstatelocation internalplatform getdefault getstatelocation returns a number that changes whenever the set of installed plug ins changes this can be used for invalidating caches that are based on the set of currently installed plug ins e g extensions return a number related to the set of installed plug ins since 3 1 public static long get state stamp return internal platform get default get state time stamp getstatestamp internalplatform getdefault getstatetimestamp returns the log for the given bundle if no such log exists one is created param bundle the bundle whose log is returned return the log for the given bundle since 3 0 public static i log get log bundle bundle return internal platform get default get log bundle ilog getlog internalplatform getdefault getlog returns the given bundle s resource bundle for the current locale p this resource bundle is typically stored as the plugin properties file in the plug in itself and contains any translatable strings used in the plug in manifest file plugin xml p p this mechanism is intended only for externalizing strings found in the plug in manifest file using this method for externalizing strings in your code may result in degraded memory performance p param bundle the bundle whose resource bundle is being queried return the resource bundle exception missing resource exception if the resource bundle was not found since 3 0 public static resource bundle get resource bundle bundle bundle throws missing resource exception return internal platform get default get resource bundle bundle missingresourceexception resourcebundle getresourcebundle missingresourceexception internalplatform getdefault getresourcebundle returns a resource string corresponding to the given argument value if the argument value specifies a resource key the string is looked up in the default resource bundle for the given runtime bundle if the argument does not specify a valid key the argument itself is returned as the resource string the key lookup is performed in the file referenced in the bundle localization header of the bundle manifest if a resource string corresponding to the key is not found in the resource bundle the key value or any default text following the key in the argument value is returned as the resource string a key is identified as a string beginning with the character note that the character is stripped off prior to lookup in the resource bundle p equivalent to code get resource string bundle value get resource bundle code p param bundle the bundle whose resource bundle is being queried param value the value to look for return the resource string see get resource bundle bundle since 3 0 public static string get resource string bundle bundle string value return internal platform get default get resource string bundle value getresourcestring getresourcebundle getresourcebundle getresourcestring internalplatform getdefault getresourcestring returns a resource string corresponding to the given argument value and resource bundle in the given runtime bundle if the argument value specifies a resource key the string is looked up in the given resource bundle if the argument does not specify a valid key the argument itself is returned as the resource string the key lookup is performed against the specified resource bundle if a resource string corresponding to the key is not found in the resource bundle the key value or any default text following the key in the argument value is returned as the resource string a key is identified as a string beginning with the character note that the character is stripped off prior to lookup in the resource bundle p for example assume resource bundle plugin properties contains name project name pre get resource string hello world returns hello world li get resource string name returns project name li get resource string name hello world returns project name li get resource string abcd hello world returns hello world li get resource string abcd returns abcd li get resource string name returns name li pre p param bundle the bundle whose resource bundle is being queried param value the value param resource bundle the resource bundle to query return the resource string see get resource bundle bundle since 3 0 public static string get resource string bundle bundle string value resource bundle resource bundle return internal platform get default get resource string bundle value resource bundle getresourcestring getresourcestring getresourcestring getresourcestring getresourcestring getresourcestring resourcebundle getresourcebundle getresourcestring resourcebundle resourcebundle internalplatform getdefault getresourcestring resourcebundle returns the string name of the current system architecture the value is a user defined string if the architecture is specified on the command line otherwise it is the value returned by code java lang system get property os arch code return the string name of the current system architecture since 3 0 public static string getos arch return internal platform get default getos arch getproperty getosarch internalplatform getdefault getosarch returns the string name of the current locale for use in finding files whose path starts with code nl code return the string name of the current locale since 3 0 public static string getnl return internal platform get default getnl internalplatform getdefault returns the string name of the current operating system for use in finding files whose path starts with code os code code os unknown code is returned if the operating system cannot be determined the value may indicate one of the operating systems known to the platform as specified in code knownos values code or a user defined string if the operating system name is specified on the command line return the string name of the current operating system since 3 0 public static string getos return internal platform get default getos os_unknown knownosvalues internalplatform getdefault returns the string name of the current window system for use in finding files whose path starts with code ws code code null code is returned if the window system cannot be determined return the string name of the current window system or code null code since 3 0 public static string getws return internal platform get default getws internalplatform getdefault returns the arguments not consumed by the framework implementation itself which arguments are consumed is implementation specific these arguments are available for use by the application return the array of command line arguments not consumed by the framework since 3 0 public static string get application args return internal platform get default get application args getapplicationargs internalplatform getdefault getapplicationargs returns the platform administrator for this running eclipse p note this is an internal method and em must not em be used by clients which are not part of the eclipse platform this method allows access to classes which are not eclipse platform api but are part of the os gi runtime that the eclipse platform is built on even as the eclipse platform evolves in compatible ways from release to release the details of the os gi implementation might not p return the platform admin for this instance of eclipse since 3 0 public static platform admin get platform admin return internal platform get default get platform admin osgi osgi platformadmin getplatformadmin internalplatform getdefault getplatformadmin returns the location of the platform s working directory also known as the instance data area code null code is returned if the platform is running without an instance location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi instance area p return the location of the platform s instance data area or code null code if none since 3 0 public static location get instance location return internal platform get default get instance location getinstancelocation internalplatform getdefault getinstancelocation returns the currently registered bundle group providers return the currently registered bundle group providers since 3 0 public static i bundle group provider get bundle group providers return internal platform get default get bundle group providers ibundlegroupprovider getbundlegroupproviders internalplatform getdefault getbundlegroupproviders return the interface into the preference mechanism the returned object can be used for such operations as searching for preference values across multiple scopes and preference import export return an object to interface into the preference mechanism since 3 0 public static i preferences service get preferences service return internal platform get default get preferences service ipreferencesservice getpreferencesservice internalplatform getdefault getpreferencesservice returns the product which was selected when running this eclipse instance or code null code if none return the current product or code null code if none since 3 0 public static i product get product return internal platform get default get product iproduct getproduct internalplatform getdefault getproduct registers the given bundle group provider with the platform param provider a provider to register since 3 0 public static void register bundle group provider i bundle group provider provider internal platform get default register bundle group provider provider registerbundlegroupprovider ibundlegroupprovider internalplatform getdefault registerbundlegroupprovider de registers the given bundle group provider with the platform param provider a provider to de register since 3 0 public static void unregister bundle group provider i bundle group provider provider internal platform get default unregister bundle group provider provider unregisterbundlegroupprovider ibundlegroupprovider internalplatform getdefault unregisterbundlegroupprovider returns the location of the configuration information used to run this instance of eclipse the configuration area typically contains the list of plug ins available for use various settings those shared across different instances of the same configuration and any other such data needed by plug ins code null code is returned if the platform is running without a configuration location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi configuration area p return the location of the platform s configuration data area or code null code if none since 3 0 public static location get configuration location return internal platform get default get configuration location getconfigurationlocation internalplatform getdefault getconfigurationlocation returns the location of the platform s user data area the user data area is a location on the system which is specific to the system s current user by default it is located relative to the location given by the system property user home code null code is returned if the platform is running without an user location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi user area p return the location of the platform s user data area or code null code if none since 3 0 public static location get user location return internal platform get default get user location getuserlocation internalplatform getdefault getuserlocation returns the location of the base installation for the running platform code null code is returned if the platform is running without a configuration location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi install area p return the location of the platform s installation area or code null code if none since 3 0 public static location get install location return internal platform get default get install location getinstalllocation internalplatform getdefault getinstalllocation checks if the specified bundle is a fragment bundle param bundle the bundle to query return true if the specified bundle is a fragment bundle otherwise false is returned since 3 0 public static boolean is fragment bundle bundle return internal platform get default is fragment bundle isfragment internalplatform getdefault isfragment returns an array of attached fragment bundles for the specified bundle if the specified bundle is a fragment then tt null tt is returned if no fragments are attached to the specified bundle then tt null tt is returned param bundle the bundle to get the attached fragment bundles for return an array of fragment bundles or tt null tt if the bundle does not have any attached fragment bundles since 3 0 public static bundle get fragments bundle bundle return internal platform get default get fragments bundle getfragments internalplatform getdefault getfragments returns the resolved bundle with the specified symbolic name that has the highest version if no resolved bundles are installed that have the specified symbolic name then null is returned param symbolic name the symbolic name of the bundle to be returned return the bundle that has the specified symbolic name with the highest version or tt null tt if no bundle is found since 3 0 public static bundle get bundle string symbolic name return internal platform get default get bundle symbolic name symbolicname getbundle symbolicname internalplatform getdefault getbundle symbolicname returns all bundles with the specified symbolic name if no resolved bundles with the specified symbolic name can be found tt null tt is returned if the version argument is not null then only the bundles that have the specified symbolic name and a version greater than or equal to the specified version are returned the returned bundles are ordered in descending bundle version order param symbolic name the symbolic name of the bundles that are to be returned param version the version that the return bundle versions must match or tt null tt if no version matching is to be done return the array of bundles with the specified name that match the specified version and match rule or tt null tt if no bundles are found public static bundle get bundles string symbolic name string version return internal platform get default get bundles symbolic name version symbolicname getbundles symbolicname internalplatform getdefault getbundles symbolicname returns an array of host bundles that the specified fragment bundle is attached to or tt null tt if the specified bundle is not attached to a host if the bundle is not a fragment bundle then tt null tt is returned param bundle the bundle to get the host bundles for return an array of host bundles or null if the bundle does not have any host bundles since 3 0 public static bundle get hosts bundle bundle return internal platform get default get hosts bundle gethosts internalplatform getdefault gethosts returns whether the platform is running return code true code if the platform is running and code false code otherwise since 3 0 public static boolean is running return internal platform get default is running isrunning internalplatform getdefault isrunning returns a list of known system architectures p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getos arch code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of system architectures known to the system see getos arch since 3 0 public static string knownos arch values return internal platform get default knownos arch values getosarch getosarch knownosarchvalues internalplatform getdefault knownosarchvalues returns a list of known operating system names p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getos code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of operating systems known to the system see getos since 3 0 public static string knownos values return internal platform get default knownos values knownosvalues internalplatform getdefault knownosvalues returns a map of known platform line separators the keys are translated names of platforms and the values are their associated line separator strings return a map of platform to their line separator string since 3 1 public static map known platform line separators map result new hash map result put line separator key mac os 9 line separator value cr result put line separator key unix line separator value lf result put line separator key windows line separator value crlf return result knownplatformlineseparators hashmap line_separator_key_mac_os_9 line_separator_value_cr line_separator_key_unix line_separator_value_lf line_separator_key_windows line_separator_value_crlf returns a list of known windowing system names p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getws code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of window systems known to the system see getws since 3 0 public static string knownws values return internal platform get default knownws values knownwsvalues internalplatform getdefault knownwsvalues returns code true code if the platform is currently running in debug mode the platform is typically put in debug mode using the debug command line argument return whether or not the platform is running in debug mode since 3 0 public static boolean in debug mode return system get property osgi debug null non nls 1 indebugmode getproperty returns code true code if the platform is currently running in development mode that is if special procedures are to be taken when defining plug in class paths the platform is typically put in development mode using the dev command line argument return whether or not the platform is running in development mode since 3 0 public static boolean in development mode return system get property osgi dev null non nls 1 indevelopmentmode getproperty private constructor to block instance creation private platform super adds the given authorization information to the key ring the information is relevant for the specified protection space and the given authorization scheme the protection space is defined by the combination of the given server url and realm the authorization scheme determines what the authorization information contains and how it should be used the authorization information is a code map code of code string code to code string code and typically contains information such as user names and passwords param server url the url identifying the server for this authorization information for example http www example com param realm the subsection of the given server to which this authorization information applies for example realm1 example com or for no realm param auth scheme the scheme for which this authorization information applies for example basic or for no authorization scheme param info a code map code containing authorization information such as user names and passwords key type code string code value type code string code exception core exception if there are problems setting the authorization information reasons include ul li the keyring could not be saved li ul public static void add authorization info url server url string realm string auth scheme map info throws core exception internal platform get default add authorization info server url realm auth scheme info serverurl authscheme coreexception addauthorizationinfo serverurl authscheme coreexception internalplatform getdefault addauthorizationinfo serverurl authscheme adds the given log listener to the notification list of the platform p once registered a listener starts receiving notification as entries are added to plug in logs via code i log log code the listener continues to receive notifications until it is replaced or removed p param listener the listener to register see i log add log listener i log listener see remove log listener i log listener public static void add log listener i log listener listener internal platform get default add log listener listener ilog ilog addloglistener iloglistener removeloglistener iloglistener addloglistener iloglistener internalplatform getdefault addloglistener adds the specified resource to the protection space specified by the given realm all targets at or deeper than the depth of the last symbolic element in the path of the given resource url are assumed to be in the same protection space param resource url the url identifying the resources to be added to the specified protection space for example http www example com folder param realm the name of the protection space for example realm1 example com exception core exception if there are problems setting the authorization information reasons include ul li the key ring could not be saved li ul public static void add protection space url resource url string realm throws core exception internal platform get default add protection space resource url realm resourceurl coreexception addprotectionspace resourceurl coreexception internalplatform getdefault addprotectionspace resourceurl returns a url that is the local equivalent of the supplied url this method is expected to be used with the plug in relative ur ls returned by i plugin descriptor bundle get entry and platform find if the specified url is not a plug in relative url it is returned as is if the specified url is a plug in relative url of a file including jar archive it is returned as a locally accessible url using file protocol extracting caching the file locally if required if the specified url is a plug in relative url of a directory the directory and any files and directories under it are made locally accessible likewise if param url original plug in relative url return the resolved url exception io exception if unable to resolve url see resolve url see find bundle i path see bundle get entry string public static url as localurl url url throws io exception return internal platform get default as localurl url urls iplugindescriptor getentry ioexception ipath getentry aslocalurl ioexception internalplatform getdefault aslocalurl takes down the splash screen if one was put up public static void end splash internal platform get default end splash endsplash internalplatform getdefault endsplash removes the authorization information for the specified protection space and given authorization scheme the protection space is defined by the given server url and realm param server url the url identifying the server to remove the authorization information for for example http www example com param realm the subsection of the given server to remove the authorization information for for example realm1 example com or for no realm param auth scheme the scheme for which the authorization information to remove applies for example basic or for no authorization scheme exception core exception if there are problems removing the authorization information reasons include ul li the keyring could not be saved li ul public static void flush authorization info url server url string realm string auth scheme throws core exception internal platform get default flush authorization info server url realm auth scheme serverurl authscheme coreexception flushauthorizationinfo serverurl authscheme coreexception internalplatform getdefault flushauthorizationinfo serverurl authscheme returns the adapter manager used for extending code i adaptable code objects return the adapter manager for this platform see i adapter manager public static i adapter manager get adapter manager return internal platform get default get adapter manager iadaptable iadaptermanager iadaptermanager getadaptermanager internalplatform getdefault getadaptermanager returns the authorization information for the specified protection space and given authorization scheme the protection space is defined by the given server url and realm returns code null code if no such information exists param server url the url identifying the server for the authorization information for example http www example com param realm the subsection of the given server to which the authorization information applies for example realm1 example com or for no realm param auth scheme the scheme for which the authorization information applies for example basic or for no authorization scheme return the authorization information for the specified protection space and given authorization scheme or code null code if no such information exists public static map get authorization info url server url string realm string auth scheme return internal platform get default get authorization info server url realm auth scheme serverurl authscheme getauthorizationinfo serverurl authscheme internalplatform getdefault getauthorizationinfo serverurl authscheme returns the command line args provided to the eclipse runtime layer when it was first run the returned value does not include arguments consumed by the lower levels of eclipse e g os gi or the launcher note that individual platform runnables may be provided with different arguments if they are being run individually rather than with code platform run code return the command line used to start the platform public static string get command line args return internal platform get default get command line args osgi getcommandlineargs internalplatform getdefault getcommandlineargs returns the content type manager return the content type manager since 3 0 public static i content type manager get content type manager return internal platform get default get content type manager icontenttypemanager getcontenttypemanager internalplatform getdefault getcontenttypemanager returns the identified option code null code is returned if no such option is found options are specified in the general form i lt plug in id gt lt option path gt i for example code org eclipse core runtime debug code param option the name of the option to lookup return the value of the requested debug option or code null code public static string get debug option string option return internal platform get default get option option getdebugoption internalplatform getdefault getoption returns the location of the platform working directory p callers of this method should consider using code get instance location code instead in various typically non ide related configurations of eclipse the platform working directory may not be on the local file system as such the more general form of this location is as a url p return the location of the platform see get instance location public static i path get location throws illegal state exception return internal platform get default get location getinstancelocation getinstancelocation ipath getlocation illegalstateexception internalplatform getdefault getlocation returns the location of the platform log file this file may contain information about errors that have previously occurred during this invocation of the platform p it is recommended not to keep this value as the log location may vary when an instance location is being set p p note it is very important that users of this method do not leave the log file open for extended periods of time doing so may prevent others from writing to the log file which could result in important error messages being lost it is strongly recommended that clients wanting to read the log file for extended periods should copy the log file contents elsewhere and immediately close the original file p return the path of the log file on disk public static i path get log file location return internal platform get default get meta area get log location ipath getlogfilelocation internalplatform getdefault getmetaarea getloglocation returns the plug in runtime object for the identified plug in or code null code if no such plug in can be found if the plug in is defined but not yet activated the plug in will be activated before being returned p b note b this method is only able to find and return plug in objects for plug ins described using plugin xml according to the traditional eclipse conventions eclipse 3 0 permits plug ins to be described in manifest mf files and to define their own bundle activators such plug ins cannot be discovered by this method p param id the unique identifier of the desired plug in e g code com example acme code return the plug in runtime object or code null code deprecated this method only works if the compatibility layer is installed and must not be used otherwise see the comments on link i plugin descriptor get plugin for details public static plugin get plugin string id try i plugin registry registry get plugin registry if registry null throw new illegal state exception i plugin descriptor pd registry get plugin descriptor id if pd null return null return pd get plugin catch core exception e todo log the exception return null iplugindescriptor getplugin getplugin ipluginregistry getpluginregistry illegalstateexception iplugindescriptor getplugindescriptor getplugin coreexception returns the plug in registry for this platform return the plug in registry see i plugin registry deprecated code i plugin registry code was refactored in eclipse 3 0 this method only works if the compatibility layer is installed and must not be used otherwise see the comments on link i plugin registry and its methods for details public static i plugin registry get plugin registry bundle compatibility internal platform get default get bundle compatibility helper pi runtime compatibility if compatibility null throw new illegal state exception class old internal platform null try old internal platform compatibility load class org eclipse core internal plugins internal platform non nls 1 method get plugin registry old internal platform get method get plugin registry null non nls 1 return i plugin registry get plugin registry invoke old internal platform null catch exception e ignore the exceptions return null return null ipluginregistry ipluginregistry ipluginregistry ipluginregistry getpluginregistry internalplatform getdefault getbundle compatibilityhelper pi_runtime_compatibility illegalstateexception oldinternalplatform oldinternalplatform loadclass internalplatform getpluginregistry oldinternalplatform getmethod getpluginregistry ipluginregistry getpluginregistry oldinternalplatform returns the location in the local file system of the plug in state area for the given plug in the platform must be running p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings p param plugin the plug in whose state location is returned return a local file system path public static i path get plugin state location plugin plugin return plugin get state location ipath getpluginstatelocation getstatelocation returns the protection space realm for the specified resource or code null code if the realm is unknown param resource url the url of the resource whose protection space is returned for example http www example com folder return the protection space realm for the specified resource or code null code if the realm is unknown public static string get protection space url resource url return internal platform get default get protection space resource url resourceurl getprotectionspace resourceurl internalplatform getdefault getprotectionspace resourceurl removes the indicated identical log listener from the notification list of the platform if no such listener exists no action is taken param listener the listener to de register see i log remove log listener i log listener see add log listener i log listener public static void remove log listener i log listener listener internal platform get default remove log listener listener ilog removeloglistener iloglistener addloglistener iloglistener removeloglistener iloglistener internalplatform getdefault removeloglistener returns a url which is the resolved equivalent of the supplied url this method is expected to be used with the plug in relative ur ls returned by i plugin descriptor bundle get entry and platform find p if the specified url is not a plug in relative url it is returned as is if the specified url is a plug in relative url this method attempts to reduce the given url to one which is native to the java class library eg file http etc p p note however that users of this api should not assume too much about the results of this method while it may consistently return a file url in certain installation configurations others may result in jar or http ur ls p param url original plug in relative url return the resolved url exception io exception if unable to resolve url see as localurl url see find bundle i path see bundle get entry string public static url resolve url url throws io exception return internal platform get default resolve url urls iplugindescriptor getentry urls ioexception aslocalurl ipath getentry ioexception internalplatform getdefault runs the given runnable in a protected mode exceptions thrown in the runnable are logged and passed to the runnable s exception handler such exceptions are not rethrown by this method param runnable the runnable to run public static void run i safe runnable runnable internal platform get default run runnable isaferunnable internalplatform getdefault returns the platform job manager return the platform s job manager since 3 0 public static i job manager get job manager return internal platform get default get job manager ijobmanager getjobmanager internalplatform getdefault getjobmanager returns the extension registry for this platform return the extension registry see i extension registry since 3 0 public static i extension registry get extension registry return internal platform get default get registry iextensionregistry iextensionregistry getextensionregistry internalplatform getdefault getregistry returns a url for the given path in the given bundle returns code null code if the url could not be computed or created param bundle the bundle in which to search param path path relative to plug in installation location return a url for the given path or code null code the actual form of the returned url is not specified see find bundle i path map see resolve url see as localurl url since 3 0 public static url find bundle bundle i path path return find support find bundle path null ipath aslocalurl ipath findsupport returns a url for the given path in the given bundle returns code null code if the url could not be computed or created p find looks for this path in given bundle and any attached fragments code null code is returned if no such entry is found note that there is no specific order to the fragments p p the following arguments may also be used pre nl for language specific information os for operating system specific information ws for windowing system specific information pre p p a path of nl about properties in an environment with a default locale of en ca will return a url corresponding to the first place about properties is found according to the following order pre plugin root nl en ca about properties fragment1 root nl en ca about properties fragment2 root nl en ca about properties plugin root nl en about properties fragment1 root nl en about properties fragment2 root nl en about properties plugin root about properties fragment1 root about properties fragment2 root about properties pre p p the current environment variable values can be overridden using the override map argument p param bundle the bundle in which to search param path file path relative to plug in installation location param override map of override substitution arguments to be used for any arg path elements the map keys correspond to the substitution arguments eg nl or os the resulting values must be of type java lang string if the map is code null code or does not contain the required substitution argument the default is used return a url for the given path or code null code the actual form of the returned url is not specified see resolve url see as localurl url since 3 0 public static url find bundle bundle i path path map override return find support find bundle path override en_ca aslocalurl ipath findsupport returns the location in the local file system of the plug in state area for the given bundle if the plug in state area did not exist prior to this call it is created p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings and other configuration parameters p param bundle the bundle whose state location if returned return a local file system path since 3 0 public static i path get state location bundle bundle return internal platform get default get state location bundle ipath getstatelocation internalplatform getdefault getstatelocation returns a number that changes whenever the set of installed plug ins changes this can be used for invalidating caches that are based on the set of currently installed plug ins e g extensions return a number related to the set of installed plug ins since 3 1 public static long get state stamp return internal platform get default get state time stamp getstatestamp internalplatform getdefault getstatetimestamp returns the log for the given bundle if no such log exists one is created param bundle the bundle whose log is returned return the log for the given bundle since 3 0 public static i log get log bundle bundle return internal platform get default get log bundle ilog getlog internalplatform getdefault getlog returns the given bundle s resource bundle for the current locale p this resource bundle is typically stored as the plugin properties file in the plug in itself and contains any translatable strings used in the plug in manifest file plugin xml p p this mechanism is intended only for externalizing strings found in the plug in manifest file using this method for externalizing strings in your code may result in degraded memory performance p param bundle the bundle whose resource bundle is being queried return the resource bundle exception missing resource exception if the resource bundle was not found since 3 0 public static resource bundle get resource bundle bundle bundle throws missing resource exception return internal platform get default get resource bundle bundle missingresourceexception resourcebundle getresourcebundle missingresourceexception internalplatform getdefault getresourcebundle returns a resource string corresponding to the given argument value if the argument value specifies a resource key the string is looked up in the default resource bundle for the given runtime bundle if the argument does not specify a valid key the argument itself is returned as the resource string the key lookup is performed in the file referenced in the bundle localization header of the bundle manifest if a resource string corresponding to the key is not found in the resource bundle the key value or any default text following the key in the argument value is returned as the resource string a key is identified as a string beginning with the character note that the character is stripped off prior to lookup in the resource bundle p equivalent to code get resource string bundle value get resource bundle code p param bundle the bundle whose resource bundle is being queried param value the value to look for return the resource string see get resource bundle bundle since 3 0 public static string get resource string bundle bundle string value return internal platform get default get resource string bundle value getresourcestring getresourcebundle getresourcebundle getresourcestring internalplatform getdefault getresourcestring returns a resource string corresponding to the given argument value and resource bundle in the given runtime bundle if the argument value specifies a resource key the string is looked up in the given resource bundle if the argument does not specify a valid key the argument itself is returned as the resource string the key lookup is performed against the specified resource bundle if a resource string corresponding to the key is not found in the resource bundle the key value or any default text following the key in the argument value is returned as the resource string a key is identified as a string beginning with the character note that the character is stripped off prior to lookup in the resource bundle p for example assume resource bundle plugin properties contains name project name pre get resource string hello world returns hello world li get resource string name returns project name li get resource string name hello world returns project name li get resource string abcd hello world returns hello world li get resource string abcd returns abcd li get resource string name returns name li pre p param bundle the bundle whose resource bundle is being queried param value the value param resource bundle the resource bundle to query return the resource string see get resource bundle bundle since 3 0 public static string get resource string bundle bundle string value resource bundle resource bundle return internal platform get default get resource string bundle value resource bundle getresourcestring getresourcestring getresourcestring getresourcestring getresourcestring getresourcestring resourcebundle getresourcebundle getresourcestring resourcebundle resourcebundle internalplatform getdefault getresourcestring resourcebundle returns the string name of the current system architecture the value is a user defined string if the architecture is specified on the command line otherwise it is the value returned by code java lang system get property os arch code return the string name of the current system architecture since 3 0 public static string getos arch return internal platform get default getos arch getproperty getosarch internalplatform getdefault getosarch returns the string name of the current locale for use in finding files whose path starts with code nl code return the string name of the current locale since 3 0 public static string getnl return internal platform get default getnl internalplatform getdefault returns the string name of the current operating system for use in finding files whose path starts with code os code code os unknown code is returned if the operating system cannot be determined the value may indicate one of the operating systems known to the platform as specified in code knownos values code or a user defined string if the operating system name is specified on the command line return the string name of the current operating system since 3 0 public static string getos return internal platform get default getos os_unknown knownosvalues internalplatform getdefault returns the string name of the current window system for use in finding files whose path starts with code ws code code null code is returned if the window system cannot be determined return the string name of the current window system or code null code since 3 0 public static string getws return internal platform get default getws internalplatform getdefault returns the arguments not consumed by the framework implementation itself which arguments are consumed is implementation specific these arguments are available for use by the application return the array of command line arguments not consumed by the framework since 3 0 public static string get application args return internal platform get default get application args getapplicationargs internalplatform getdefault getapplicationargs returns the platform administrator for this running eclipse p note this is an internal method and em must not em be used by clients which are not part of the eclipse platform this method allows access to classes which are not eclipse platform api but are part of the os gi runtime that the eclipse platform is built on even as the eclipse platform evolves in compatible ways from release to release the details of the os gi implementation might not p return the platform admin for this instance of eclipse since 3 0 public static platform admin get platform admin return internal platform get default get platform admin osgi osgi platformadmin getplatformadmin internalplatform getdefault getplatformadmin returns the location of the platform s working directory also known as the instance data area code null code is returned if the platform is running without an instance location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi instance area p return the location of the platform s instance data area or code null code if none since 3 0 public static location get instance location return internal platform get default get instance location getinstancelocation internalplatform getdefault getinstancelocation returns the currently registered bundle group providers return the currently registered bundle group providers since 3 0 public static i bundle group provider get bundle group providers return internal platform get default get bundle group providers ibundlegroupprovider getbundlegroupproviders internalplatform getdefault getbundlegroupproviders return the interface into the preference mechanism the returned object can be used for such operations as searching for preference values across multiple scopes and preference import export return an object to interface into the preference mechanism since 3 0 public static i preferences service get preferences service return internal platform get default get preferences service ipreferencesservice getpreferencesservice internalplatform getdefault getpreferencesservice returns the product which was selected when running this eclipse instance or code null code if none return the current product or code null code if none since 3 0 public static i product get product return internal platform get default get product iproduct getproduct internalplatform getdefault getproduct registers the given bundle group provider with the platform param provider a provider to register since 3 0 public static void register bundle group provider i bundle group provider provider internal platform get default register bundle group provider provider registerbundlegroupprovider ibundlegroupprovider internalplatform getdefault registerbundlegroupprovider de registers the given bundle group provider with the platform param provider a provider to de register since 3 0 public static void unregister bundle group provider i bundle group provider provider internal platform get default unregister bundle group provider provider unregisterbundlegroupprovider ibundlegroupprovider internalplatform getdefault unregisterbundlegroupprovider returns the location of the configuration information used to run this instance of eclipse the configuration area typically contains the list of plug ins available for use various settings those shared across different instances of the same configuration and any other such data needed by plug ins code null code is returned if the platform is running without a configuration location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi configuration area p return the location of the platform s configuration data area or code null code if none since 3 0 public static location get configuration location return internal platform get default get configuration location getconfigurationlocation internalplatform getdefault getconfigurationlocation returns the location of the platform s user data area the user data area is a location on the system which is specific to the system s current user by default it is located relative to the location given by the system property user home code null code is returned if the platform is running without an user location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi user area p return the location of the platform s user data area or code null code if none since 3 0 public static location get user location return internal platform get default get user location getuserlocation internalplatform getdefault getuserlocation returns the location of the base installation for the running platform code null code is returned if the platform is running without a configuration location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi install area p return the location of the platform s installation area or code null code if none since 3 0 public static location get install location return internal platform get default get install location getinstalllocation internalplatform getdefault getinstalllocation checks if the specified bundle is a fragment bundle param bundle the bundle to query return true if the specified bundle is a fragment bundle otherwise false is returned since 3 0 public static boolean is fragment bundle bundle return internal platform get default is fragment bundle isfragment internalplatform getdefault isfragment returns an array of attached fragment bundles for the specified bundle if the specified bundle is a fragment then tt null tt is returned if no fragments are attached to the specified bundle then tt null tt is returned param bundle the bundle to get the attached fragment bundles for return an array of fragment bundles or tt null tt if the bundle does not have any attached fragment bundles since 3 0 public static bundle get fragments bundle bundle return internal platform get default get fragments bundle getfragments internalplatform getdefault getfragments returns the resolved bundle with the specified symbolic name that has the highest version if no resolved bundles are installed that have the specified symbolic name then null is returned param symbolic name the symbolic name of the bundle to be returned return the bundle that has the specified symbolic name with the highest version or tt null tt if no bundle is found since 3 0 public static bundle get bundle string symbolic name return internal platform get default get bundle symbolic name symbolicname getbundle symbolicname internalplatform getdefault getbundle symbolicname returns all bundles with the specified symbolic name if no resolved bundles with the specified symbolic name can be found tt null tt is returned if the version argument is not null then only the bundles that have the specified symbolic name and a version greater than or equal to the specified version are returned the returned bundles are ordered in descending bundle version order param symbolic name the symbolic name of the bundles that are to be returned param version the version that the return bundle versions must match or tt null tt if no version matching is to be done return the array of bundles with the specified name that match the specified version and match rule or tt null tt if no bundles are found public static bundle get bundles string symbolic name string version return internal platform get default get bundles symbolic name version symbolicname getbundles symbolicname internalplatform getdefault getbundles symbolicname returns an array of host bundles that the specified fragment bundle is attached to or tt null tt if the specified bundle is not attached to a host if the bundle is not a fragment bundle then tt null tt is returned param bundle the bundle to get the host bundles for return an array of host bundles or null if the bundle does not have any host bundles since 3 0 public static bundle get hosts bundle bundle return internal platform get default get hosts bundle gethosts internalplatform getdefault gethosts returns whether the platform is running return code true code if the platform is running and code false code otherwise since 3 0 public static boolean is running return internal platform get default is running isrunning internalplatform getdefault isrunning returns a list of known system architectures p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getos arch code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of system architectures known to the system see getos arch since 3 0 public static string knownos arch values return internal platform get default knownos arch values getosarch getosarch knownosarchvalues internalplatform getdefault knownosarchvalues returns a list of known operating system names p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getos code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of operating systems known to the system see getos since 3 0 public static string knownos values return internal platform get default knownos values knownosvalues internalplatform getdefault knownosvalues returns a map of known platform line separators the keys are translated names of platforms and the values are their associated line separator strings return a map of platform to their line separator string since 3 1 public static map known platform line separators map result new hash map result put line separator key mac os 9 line separator value cr result put line separator key unix line separator value lf result put line separator key windows line separator value crlf return result knownplatformlineseparators hashmap line_separator_key_mac_os_9 line_separator_value_cr line_separator_key_unix line_separator_value_lf line_separator_key_windows line_separator_value_crlf returns a list of known windowing system names p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getws code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of window systems known to the system see getws since 3 0 public static string knownws values return internal platform get default knownws values knownwsvalues internalplatform getdefault knownwsvalues returns code true code if the platform is currently running in debug mode the platform is typically put in debug mode using the debug command line argument return whether or not the platform is running in debug mode since 3 0 public static boolean in debug mode return system get property osgi debug null non nls 1 indebugmode getproperty returns code true code if the platform is currently running in development mode that is if special procedures are to be taken when defining plug in class paths the platform is typically put in development mode using the dev command line argument return whether or not the platform is running in development mode since 3 0 public static boolean in development mode return system get property osgi dev null non nls 1 indevelopmentmode getproperty private constructor to block instance creation private platform super adds the given authorization information to the key ring the information is relevant for the specified protection space and the given authorization scheme the protection space is defined by the combination of the given server url and realm the authorization scheme determines what the authorization information contains and how it should be used the authorization information is a code map code of code string code to code string code and typically contains information such as user names and passwords param server url the url identifying the server for this authorization information for example http www example com param realm the subsection of the given server to which this authorization information applies for example realm1 example com or for no realm param auth scheme the scheme for which this authorization information applies for example basic or for no authorization scheme param info a code map code containing authorization information such as user names and passwords key type code string code value type code string code exception core exception if there are problems setting the authorization information reasons include ul li the keyring could not be saved li ul public static void add authorization info url server url string realm string auth scheme map info throws core exception internal platform get default add authorization info server url realm auth scheme info serverurl authscheme coreexception addauthorizationinfo serverurl authscheme coreexception internalplatform getdefault addauthorizationinfo serverurl authscheme adds the given log listener to the notification list of the platform p once registered a listener starts receiving notification as entries are added to plug in logs via code i log log code the listener continues to receive notifications until it is replaced or removed p param listener the listener to register see i log add log listener i log listener see remove log listener i log listener public static void add log listener i log listener listener internal platform get default add log listener listener ilog ilog addloglistener iloglistener removeloglistener iloglistener addloglistener iloglistener internalplatform getdefault addloglistener adds the specified resource to the protection space specified by the given realm all targets at or deeper than the depth of the last symbolic element in the path of the given resource url are assumed to be in the same protection space param resource url the url identifying the resources to be added to the specified protection space for example http www example com folder param realm the name of the protection space for example realm1 example com exception core exception if there are problems setting the authorization information reasons include ul li the key ring could not be saved li ul public static void add protection space url resource url string realm throws core exception internal platform get default add protection space resource url realm resourceurl coreexception addprotectionspace resourceurl coreexception internalplatform getdefault addprotectionspace resourceurl returns a url that is the local equivalent of the supplied url this method is expected to be used with the plug in relative ur ls returned by i plugin descriptor bundle get entry and platform find if the specified url is not a plug in relative url it is returned as is if the specified url is a plug in relative url of a file including jar archive it is returned as a locally accessible url using file protocol extracting caching the file locally if required if the specified url is a plug in relative url of a directory the directory and any files and directories under it are made locally accessible likewise if param url original plug in relative url return the resolved url exception io exception if unable to resolve url see resolve url see find bundle i path see bundle get entry string public static url as localurl url url throws io exception return internal platform get default as localurl url urls iplugindescriptor getentry ioexception ipath getentry aslocalurl ioexception internalplatform getdefault aslocalurl takes down the splash screen if one was put up public static void end splash internal platform get default end splash endsplash internalplatform getdefault endsplash removes the authorization information for the specified protection space and given authorization scheme the protection space is defined by the given server url and realm param server url the url identifying the server to remove the authorization information for for example http www example com param realm the subsection of the given server to remove the authorization information for for example realm1 example com or for no realm param auth scheme the scheme for which the authorization information to remove applies for example basic or for no authorization scheme exception core exception if there are problems removing the authorization information reasons include ul li the keyring could not be saved li ul public static void flush authorization info url server url string realm string auth scheme throws core exception internal platform get default flush authorization info server url realm auth scheme serverurl authscheme coreexception flushauthorizationinfo serverurl authscheme coreexception internalplatform getdefault flushauthorizationinfo serverurl authscheme returns the adapter manager used for extending code i adaptable code objects return the adapter manager for this platform see i adapter manager public static i adapter manager get adapter manager return internal platform get default get adapter manager iadaptable iadaptermanager iadaptermanager getadaptermanager internalplatform getdefault getadaptermanager returns the authorization information for the specified protection space and given authorization scheme the protection space is defined by the given server url and realm returns code null code if no such information exists param server url the url identifying the server for the authorization information for example http www example com param realm the subsection of the given server to which the authorization information applies for example realm1 example com or for no realm param auth scheme the scheme for which the authorization information applies for example basic or for no authorization scheme return the authorization information for the specified protection space and given authorization scheme or code null code if no such information exists public static map get authorization info url server url string realm string auth scheme return internal platform get default get authorization info server url realm auth scheme serverurl authscheme getauthorizationinfo serverurl authscheme internalplatform getdefault getauthorizationinfo serverurl authscheme returns the command line args provided to the eclipse runtime layer when it was first run the returned value does not include arguments consumed by the lower levels of eclipse e g os gi or the launcher note that individual platform runnables may be provided with different arguments if they are being run individually rather than with code platform run code return the command line used to start the platform public static string get command line args return internal platform get default get command line args osgi getcommandlineargs internalplatform getdefault getcommandlineargs returns the content type manager return the content type manager since 3 0 public static i content type manager get content type manager return internal platform get default get content type manager icontenttypemanager getcontenttypemanager internalplatform getdefault getcontenttypemanager returns the identified option code null code is returned if no such option is found options are specified in the general form i lt plug in id gt lt option path gt i for example code org eclipse core runtime debug code param option the name of the option to lookup return the value of the requested debug option or code null code public static string get debug option string option return internal platform get default get option option getdebugoption internalplatform getdefault getoption returns the location of the platform working directory p callers of this method should consider using code get instance location code instead in various typically non ide related configurations of eclipse the platform working directory may not be on the local file system as such the more general form of this location is as a url p return the location of the platform see get instance location public static i path get location throws illegal state exception return internal platform get default get location getinstancelocation getinstancelocation ipath getlocation illegalstateexception internalplatform getdefault getlocation returns the location of the platform log file this file may contain information about errors that have previously occurred during this invocation of the platform p it is recommended not to keep this value as the log location may vary when an instance location is being set p p note it is very important that users of this method do not leave the log file open for extended periods of time doing so may prevent others from writing to the log file which could result in important error messages being lost it is strongly recommended that clients wanting to read the log file for extended periods should copy the log file contents elsewhere and immediately close the original file p return the path of the log file on disk public static i path get log file location return internal platform get default get meta area get log location ipath getlogfilelocation internalplatform getdefault getmetaarea getloglocation returns the plug in runtime object for the identified plug in or code null code if no such plug in can be found if the plug in is defined but not yet activated the plug in will be activated before being returned p b note b this method is only able to find and return plug in objects for plug ins described using plugin xml according to the traditional eclipse conventions eclipse 3 0 permits plug ins to be described in manifest mf files and to define their own bundle activators such plug ins cannot be discovered by this method p param id the unique identifier of the desired plug in e g code com example acme code return the plug in runtime object or code null code deprecated this method only works if the compatibility layer is installed and must not be used otherwise see the comments on link i plugin descriptor get plugin for details public static plugin get plugin string id try i plugin registry registry get plugin registry if registry null throw new illegal state exception i plugin descriptor pd registry get plugin descriptor id if pd null return null return pd get plugin catch core exception e todo log the exception return null iplugindescriptor getplugin getplugin ipluginregistry getpluginregistry illegalstateexception iplugindescriptor getplugindescriptor getplugin coreexception returns the plug in registry for this platform return the plug in registry see i plugin registry deprecated code i plugin registry code was refactored in eclipse 3 0 this method only works if the compatibility layer is installed and must not be used otherwise see the comments on link i plugin registry and its methods for details public static i plugin registry get plugin registry bundle compatibility internal platform get default get bundle compatibility helper pi runtime compatibility if compatibility null throw new illegal state exception class old internal platform null try old internal platform compatibility load class org eclipse core internal plugins internal platform non nls 1 method get plugin registry old internal platform get method get plugin registry null non nls 1 return i plugin registry get plugin registry invoke old internal platform null catch exception e ignore the exceptions return null return null ipluginregistry ipluginregistry ipluginregistry ipluginregistry getpluginregistry internalplatform getdefault getbundle compatibilityhelper pi_runtime_compatibility illegalstateexception oldinternalplatform oldinternalplatform loadclass internalplatform getpluginregistry oldinternalplatform getmethod getpluginregistry ipluginregistry getpluginregistry oldinternalplatform returns the location in the local file system of the plug in state area for the given plug in the platform must be running p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings p param plugin the plug in whose state location is returned return a local file system path public static i path get plugin state location plugin plugin return plugin get state location ipath getpluginstatelocation getstatelocation returns the protection space realm for the specified resource or code null code if the realm is unknown param resource url the url of the resource whose protection space is returned for example http www example com folder return the protection space realm for the specified resource or code null code if the realm is unknown public static string get protection space url resource url return internal platform get default get protection space resource url resourceurl getprotectionspace resourceurl internalplatform getdefault getprotectionspace resourceurl removes the indicated identical log listener from the notification list of the platform if no such listener exists no action is taken param listener the listener to de register see i log remove log listener i log listener see add log listener i log listener public static void remove log listener i log listener listener internal platform get default remove log listener listener ilog removeloglistener iloglistener addloglistener iloglistener removeloglistener iloglistener internalplatform getdefault removeloglistener returns a url which is the resolved equivalent of the supplied url this method is expected to be used with the plug in relative ur ls returned by i plugin descriptor bundle get entry and platform find p if the specified url is not a plug in relative url it is returned as is if the specified url is a plug in relative url this method attempts to reduce the given url to one which is native to the java class library eg file http etc p p note however that users of this api should not assume too much about the results of this method while it may consistently return a file url in certain installation configurations others may result in jar or http ur ls p param url original plug in relative url return the resolved url exception io exception if unable to resolve url see as localurl url see find bundle i path see bundle get entry string public static url resolve url url throws io exception return internal platform get default resolve url urls iplugindescriptor getentry urls ioexception aslocalurl ipath getentry ioexception internalplatform getdefault runs the given runnable in a protected mode exceptions thrown in the runnable are logged and passed to the runnable s exception handler such exceptions are not rethrown by this method param runnable the runnable to run public static void run i safe runnable runnable internal platform get default run runnable isaferunnable internalplatform getdefault returns the platform job manager return the platform s job manager since 3 0 public static i job manager get job manager return internal platform get default get job manager ijobmanager getjobmanager internalplatform getdefault getjobmanager returns the extension registry for this platform return the extension registry see i extension registry since 3 0 public static i extension registry get extension registry return internal platform get default get registry iextensionregistry iextensionregistry getextensionregistry internalplatform getdefault getregistry returns a url for the given path in the given bundle returns code null code if the url could not be computed or created param bundle the bundle in which to search param path path relative to plug in installation location return a url for the given path or code null code the actual form of the returned url is not specified see find bundle i path map see resolve url see as localurl url since 3 0 public static url find bundle bundle i path path return find support find bundle path null ipath aslocalurl ipath findsupport returns a url for the given path in the given bundle returns code null code if the url could not be computed or created p find looks for this path in given bundle and any attached fragments code null code is returned if no such entry is found note that there is no specific order to the fragments p p the following arguments may also be used pre nl for language specific information os for operating system specific information ws for windowing system specific information pre p p a path of nl about properties in an environment with a default locale of en ca will return a url corresponding to the first place about properties is found according to the following order pre plugin root nl en ca about properties fragment1 root nl en ca about properties fragment2 root nl en ca about properties plugin root nl en about properties fragment1 root nl en about properties fragment2 root nl en about properties plugin root about properties fragment1 root about properties fragment2 root about properties pre p p the current environment variable values can be overridden using the override map argument p param bundle the bundle in which to search param path file path relative to plug in installation location param override map of override substitution arguments to be used for any arg path elements the map keys correspond to the substitution arguments eg nl or os the resulting values must be of type java lang string if the map is code null code or does not contain the required substitution argument the default is used return a url for the given path or code null code the actual form of the returned url is not specified see resolve url see as localurl url since 3 0 public static url find bundle bundle i path path map override return find support find bundle path override en_ca aslocalurl ipath findsupport returns the location in the local file system of the plug in state area for the given bundle if the plug in state area did not exist prior to this call it is created p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings and other configuration parameters p param bundle the bundle whose state location if returned return a local file system path since 3 0 public static i path get state location bundle bundle return internal platform get default get state location bundle ipath getstatelocation internalplatform getdefault getstatelocation returns a number that changes whenever the set of installed plug ins changes this can be used for invalidating caches that are based on the set of currently installed plug ins e g extensions return a number related to the set of installed plug ins since 3 1 public static long get state stamp return internal platform get default get state time stamp getstatestamp internalplatform getdefault getstatetimestamp returns the log for the given bundle if no such log exists one is created param bundle the bundle whose log is returned return the log for the given bundle since 3 0 public static i log get log bundle bundle return internal platform get default get log bundle ilog getlog internalplatform getdefault getlog returns the given bundle s resource bundle for the current locale p this resource bundle is typically stored as the plugin properties file in the plug in itself and contains any translatable strings used in the plug in manifest file plugin xml p p this mechanism is intended only for externalizing strings found in the plug in manifest file using this method for externalizing strings in your code may result in degraded memory performance p param bundle the bundle whose resource bundle is being queried return the resource bundle exception missing resource exception if the resource bundle was not found since 3 0 public static resource bundle get resource bundle bundle bundle throws missing resource exception return internal platform get default get resource bundle bundle missingresourceexception resourcebundle getresourcebundle missingresourceexception internalplatform getdefault getresourcebundle returns a resource string corresponding to the given argument value if the argument value specifies a resource key the string is looked up in the default resource bundle for the given runtime bundle if the argument does not specify a valid key the argument itself is returned as the resource string the key lookup is performed in the file referenced in the bundle localization header of the bundle manifest if a resource string corresponding to the key is not found in the resource bundle the key value or any default text following the key in the argument value is returned as the resource string a key is identified as a string beginning with the character note that the character is stripped off prior to lookup in the resource bundle p equivalent to code get resource string bundle value get resource bundle code p param bundle the bundle whose resource bundle is being queried param value the value to look for return the resource string see get resource bundle bundle since 3 0 public static string get resource string bundle bundle string value return internal platform get default get resource string bundle value getresourcestring getresourcebundle getresourcebundle getresourcestring internalplatform getdefault getresourcestring returns a resource string corresponding to the given argument value and resource bundle in the given runtime bundle if the argument value specifies a resource key the string is looked up in the given resource bundle if the argument does not specify a valid key the argument itself is returned as the resource string the key lookup is performed against the specified resource bundle if a resource string corresponding to the key is not found in the resource bundle the key value or any default text following the key in the argument value is returned as the resource string a key is identified as a string beginning with the character note that the character is stripped off prior to lookup in the resource bundle p for example assume resource bundle plugin properties contains name project name pre get resource string hello world returns hello world li get resource string name returns project name li get resource string name hello world returns project name li get resource string abcd hello world returns hello world li get resource string abcd returns abcd li get resource string name returns name li pre p param bundle the bundle whose resource bundle is being queried param value the value param resource bundle the resource bundle to query return the resource string see get resource bundle bundle since 3 0 public static string get resource string bundle bundle string value resource bundle resource bundle return internal platform get default get resource string bundle value resource bundle getresourcestring getresourcestring getresourcestring getresourcestring getresourcestring getresourcestring resourcebundle getresourcebundle getresourcestring resourcebundle resourcebundle internalplatform getdefault getresourcestring resourcebundle returns the string name of the current system architecture the value is a user defined string if the architecture is specified on the command line otherwise it is the value returned by code java lang system get property os arch code return the string name of the current system architecture since 3 0 public static string getos arch return internal platform get default getos arch getproperty getosarch internalplatform getdefault getosarch returns the string name of the current locale for use in finding files whose path starts with code nl code return the string name of the current locale since 3 0 public static string getnl return internal platform get default getnl internalplatform getdefault returns the string name of the current operating system for use in finding files whose path starts with code os code code os unknown code is returned if the operating system cannot be determined the value may indicate one of the operating systems known to the platform as specified in code knownos values code or a user defined string if the operating system name is specified on the command line return the string name of the current operating system since 3 0 public static string getos return internal platform get default getos os_unknown knownosvalues internalplatform getdefault returns the string name of the current window system for use in finding files whose path starts with code ws code code null code is returned if the window system cannot be determined return the string name of the current window system or code null code since 3 0 public static string getws return internal platform get default getws internalplatform getdefault returns the arguments not consumed by the framework implementation itself which arguments are consumed is implementation specific these arguments are available for use by the application return the array of command line arguments not consumed by the framework since 3 0 public static string get application args return internal platform get default get application args getapplicationargs internalplatform getdefault getapplicationargs returns the platform administrator for this running eclipse p note this is an internal method and em must not em be used by clients which are not part of the eclipse platform this method allows access to classes which are not eclipse platform api but are part of the os gi runtime that the eclipse platform is built on even as the eclipse platform evolves in compatible ways from release to release the details of the os gi implementation might not p return the platform admin for this instance of eclipse since 3 0 public static platform admin get platform admin return internal platform get default get platform admin osgi osgi platformadmin getplatformadmin internalplatform getdefault getplatformadmin returns the location of the platform s working directory also known as the instance data area code null code is returned if the platform is running without an instance location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi instance area p return the location of the platform s instance data area or code null code if none since 3 0 public static location get instance location return internal platform get default get instance location getinstancelocation internalplatform getdefault getinstancelocation returns the currently registered bundle group providers return the currently registered bundle group providers since 3 0 public static i bundle group provider get bundle group providers return internal platform get default get bundle group providers ibundlegroupprovider getbundlegroupproviders internalplatform getdefault getbundlegroupproviders return the interface into the preference mechanism the returned object can be used for such operations as searching for preference values across multiple scopes and preference import export return an object to interface into the preference mechanism since 3 0 public static i preferences service get preferences service return internal platform get default get preferences service ipreferencesservice getpreferencesservice internalplatform getdefault getpreferencesservice returns the product which was selected when running this eclipse instance or code null code if none return the current product or code null code if none since 3 0 public static i product get product return internal platform get default get product iproduct getproduct internalplatform getdefault getproduct registers the given bundle group provider with the platform param provider a provider to register since 3 0 public static void register bundle group provider i bundle group provider provider internal platform get default register bundle group provider provider registerbundlegroupprovider ibundlegroupprovider internalplatform getdefault registerbundlegroupprovider de registers the given bundle group provider with the platform param provider a provider to de register since 3 0 public static void unregister bundle group provider i bundle group provider provider internal platform get default unregister bundle group provider provider unregisterbundlegroupprovider ibundlegroupprovider internalplatform getdefault unregisterbundlegroupprovider returns the location of the configuration information used to run this instance of eclipse the configuration area typically contains the list of plug ins available for use various settings those shared across different instances of the same configuration and any other such data needed by plug ins code null code is returned if the platform is running without a configuration location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi configuration area p return the location of the platform s configuration data area or code null code if none since 3 0 public static location get configuration location return internal platform get default get configuration location getconfigurationlocation internalplatform getdefault getconfigurationlocation returns the location of the platform s user data area the user data area is a location on the system which is specific to the system s current user by default it is located relative to the location given by the system property user home code null code is returned if the platform is running without an user location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi user area p return the location of the platform s user data area or code null code if none since 3 0 public static location get user location return internal platform get default get user location getuserlocation internalplatform getdefault getuserlocation returns the location of the base installation for the running platform code null code is returned if the platform is running without a configuration location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi install area p return the location of the platform s installation area or code null code if none since 3 0 public static location get install location return internal platform get default get install location getinstalllocation internalplatform getdefault getinstalllocation checks if the specified bundle is a fragment bundle param bundle the bundle to query return true if the specified bundle is a fragment bundle otherwise false is returned since 3 0 public static boolean is fragment bundle bundle return internal platform get default is fragment bundle isfragment internalplatform getdefault isfragment returns an array of attached fragment bundles for the specified bundle if the specified bundle is a fragment then tt null tt is returned if no fragments are attached to the specified bundle then tt null tt is returned param bundle the bundle to get the attached fragment bundles for return an array of fragment bundles or tt null tt if the bundle does not have any attached fragment bundles since 3 0 public static bundle get fragments bundle bundle return internal platform get default get fragments bundle getfragments internalplatform getdefault getfragments returns the resolved bundle with the specified symbolic name that has the highest version if no resolved bundles are installed that have the specified symbolic name then null is returned param symbolic name the symbolic name of the bundle to be returned return the bundle that has the specified symbolic name with the highest version or tt null tt if no bundle is found since 3 0 public static bundle get bundle string symbolic name return internal platform get default get bundle symbolic name symbolicname getbundle symbolicname internalplatform getdefault getbundle symbolicname returns all bundles with the specified symbolic name if no resolved bundles with the specified symbolic name can be found tt null tt is returned if the version argument is not null then only the bundles that have the specified symbolic name and a version greater than or equal to the specified version are returned the returned bundles are ordered in descending bundle version order param symbolic name the symbolic name of the bundles that are to be returned param version the version that the return bundle versions must match or tt null tt if no version matching is to be done return the array of bundles with the specified name that match the specified version and match rule or tt null tt if no bundles are found public static bundle get bundles string symbolic name string version return internal platform get default get bundles symbolic name version symbolicname getbundles symbolicname internalplatform getdefault getbundles symbolicname returns an array of host bundles that the specified fragment bundle is attached to or tt null tt if the specified bundle is not attached to a host if the bundle is not a fragment bundle then tt null tt is returned param bundle the bundle to get the host bundles for return an array of host bundles or null if the bundle does not have any host bundles since 3 0 public static bundle get hosts bundle bundle return internal platform get default get hosts bundle gethosts internalplatform getdefault gethosts returns whether the platform is running return code true code if the platform is running and code false code otherwise since 3 0 public static boolean is running return internal platform get default is running isrunning internalplatform getdefault isrunning returns a list of known system architectures p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getos arch code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of system architectures known to the system see getos arch since 3 0 public static string knownos arch values return internal platform get default knownos arch values getosarch getosarch knownosarchvalues internalplatform getdefault knownosarchvalues returns a list of known operating system names p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getos code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of operating systems known to the system see getos since 3 0 public static string knownos values return internal platform get default knownos values knownosvalues internalplatform getdefault knownosvalues returns a map of known platform line separators the keys are translated names of platforms and the values are their associated line separator strings return a map of platform to their line separator string since 3 1 public static map known platform line separators map result new hash map result put line separator key mac os 9 line separator value cr result put line separator key unix line separator value lf result put line separator key windows line separator value crlf return result knownplatformlineseparators hashmap line_separator_key_mac_os_9 line_separator_value_cr line_separator_key_unix line_separator_value_lf line_separator_key_windows line_separator_value_crlf returns a list of known windowing system names p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getws code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of window systems known to the system see getws since 3 0 public static string knownws values return internal platform get default knownws values knownwsvalues internalplatform getdefault knownwsvalues returns code true code if the platform is currently running in debug mode the platform is typically put in debug mode using the debug command line argument return whether or not the platform is running in debug mode since 3 0 public static boolean in debug mode return system get property osgi debug null non nls 1 indebugmode getproperty returns code true code if the platform is currently running in development mode that is if special procedures are to be taken when defining plug in class paths the platform is typically put in development mode using the dev command line argument return whether or not the platform is running in development mode since 3 0 public static boolean in development mode return system get property osgi dev null non nls 1 indevelopmentmode getproperty private constructor to block instance creation private platform super adds the given authorization information to the key ring the information is relevant for the specified protection space and the given authorization scheme the protection space is defined by the combination of the given server url and realm the authorization scheme determines what the authorization information contains and how it should be used the authorization information is a code map code of code string code to code string code and typically contains information such as user names and passwords param server url the url identifying the server for this authorization information for example http www example com param realm the subsection of the given server to which this authorization information applies for example realm1 example com or for no realm param auth scheme the scheme for which this authorization information applies for example basic or for no authorization scheme param info a code map code containing authorization information such as user names and passwords key type code string code value type code string code exception core exception if there are problems setting the authorization information reasons include ul li the keyring could not be saved li ul public static void add authorization info url server url string realm string auth scheme map info throws core exception internal platform get default add authorization info server url realm auth scheme info serverurl authscheme coreexception addauthorizationinfo serverurl authscheme coreexception internalplatform getdefault addauthorizationinfo serverurl authscheme adds the given log listener to the notification list of the platform p once registered a listener starts receiving notification as entries are added to plug in logs via code i log log code the listener continues to receive notifications until it is replaced or removed p param listener the listener to register see i log add log listener i log listener see remove log listener i log listener public static void add log listener i log listener listener internal platform get default add log listener listener ilog ilog addloglistener iloglistener removeloglistener iloglistener addloglistener iloglistener internalplatform getdefault addloglistener adds the specified resource to the protection space specified by the given realm all targets at or deeper than the depth of the last symbolic element in the path of the given resource url are assumed to be in the same protection space param resource url the url identifying the resources to be added to the specified protection space for example http www example com folder param realm the name of the protection space for example realm1 example com exception core exception if there are problems setting the authorization information reasons include ul li the key ring could not be saved li ul public static void add protection space url resource url string realm throws core exception internal platform get default add protection space resource url realm resourceurl coreexception addprotectionspace resourceurl coreexception internalplatform getdefault addprotectionspace resourceurl returns a url that is the local equivalent of the supplied url this method is expected to be used with the plug in relative ur ls returned by i plugin descriptor bundle get entry and platform find if the specified url is not a plug in relative url it is returned as is if the specified url is a plug in relative url of a file including jar archive it is returned as a locally accessible url using file protocol extracting caching the file locally if required if the specified url is a plug in relative url of a directory the directory and any files and directories under it are made locally accessible likewise if param url original plug in relative url return the resolved url exception io exception if unable to resolve url see resolve url see find bundle i path see bundle get entry string public static url as localurl url url throws io exception return internal platform get default as localurl url urls iplugindescriptor getentry ioexception ipath getentry aslocalurl ioexception internalplatform getdefault aslocalurl takes down the splash screen if one was put up public static void end splash internal platform get default end splash endsplash internalplatform getdefault endsplash removes the authorization information for the specified protection space and given authorization scheme the protection space is defined by the given server url and realm param server url the url identifying the server to remove the authorization information for for example http www example com param realm the subsection of the given server to remove the authorization information for for example realm1 example com or for no realm param auth scheme the scheme for which the authorization information to remove applies for example basic or for no authorization scheme exception core exception if there are problems removing the authorization information reasons include ul li the keyring could not be saved li ul public static void flush authorization info url server url string realm string auth scheme throws core exception internal platform get default flush authorization info server url realm auth scheme serverurl authscheme coreexception flushauthorizationinfo serverurl authscheme coreexception internalplatform getdefault flushauthorizationinfo serverurl authscheme returns the adapter manager used for extending code i adaptable code objects return the adapter manager for this platform see i adapter manager public static i adapter manager get adapter manager return internal platform get default get adapter manager iadaptable iadaptermanager iadaptermanager getadaptermanager internalplatform getdefault getadaptermanager returns the authorization information for the specified protection space and given authorization scheme the protection space is defined by the given server url and realm returns code null code if no such information exists param server url the url identifying the server for the authorization information for example http www example com param realm the subsection of the given server to which the authorization information applies for example realm1 example com or for no realm param auth scheme the scheme for which the authorization information applies for example basic or for no authorization scheme return the authorization information for the specified protection space and given authorization scheme or code null code if no such information exists public static map get authorization info url server url string realm string auth scheme return internal platform get default get authorization info server url realm auth scheme serverurl authscheme getauthorizationinfo serverurl authscheme internalplatform getdefault getauthorizationinfo serverurl authscheme returns the command line args provided to the eclipse runtime layer when it was first run the returned value does not include arguments consumed by the lower levels of eclipse e g os gi or the launcher note that individual platform runnables may be provided with different arguments if they are being run individually rather than with code platform run code return the command line used to start the platform public static string get command line args return internal platform get default get command line args osgi getcommandlineargs internalplatform getdefault getcommandlineargs returns the content type manager return the content type manager since 3 0 public static i content type manager get content type manager return internal platform get default get content type manager icontenttypemanager getcontenttypemanager internalplatform getdefault getcontenttypemanager returns the identified option code null code is returned if no such option is found options are specified in the general form i lt plug in id gt lt option path gt i for example code org eclipse core runtime debug code param option the name of the option to lookup return the value of the requested debug option or code null code public static string get debug option string option return internal platform get default get option option getdebugoption internalplatform getdefault getoption returns the location of the platform working directory p callers of this method should consider using code get instance location code instead in various typically non ide related configurations of eclipse the platform working directory may not be on the local file system as such the more general form of this location is as a url p return the location of the platform see get instance location public static i path get location throws illegal state exception return internal platform get default get location getinstancelocation getinstancelocation ipath getlocation illegalstateexception internalplatform getdefault getlocation returns the location of the platform log file this file may contain information about errors that have previously occurred during this invocation of the platform p it is recommended not to keep this value as the log location may vary when an instance location is being set p p note it is very important that users of this method do not leave the log file open for extended periods of time doing so may prevent others from writing to the log file which could result in important error messages being lost it is strongly recommended that clients wanting to read the log file for extended periods should copy the log file contents elsewhere and immediately close the original file p return the path of the log file on disk public static i path get log file location return internal platform get default get meta area get log location ipath getlogfilelocation internalplatform getdefault getmetaarea getloglocation returns the plug in runtime object for the identified plug in or code null code if no such plug in can be found if the plug in is defined but not yet activated the plug in will be activated before being returned p b note b this method is only able to find and return plug in objects for plug ins described using plugin xml according to the traditional eclipse conventions eclipse 3 0 permits plug ins to be described in manifest mf files and to define their own bundle activators such plug ins cannot be discovered by this method p param id the unique identifier of the desired plug in e g code com example acme code return the plug in runtime object or code null code deprecated this method only works if the compatibility layer is installed and must not be used otherwise see the comments on link i plugin descriptor get plugin for details public static plugin get plugin string id try i plugin registry registry get plugin registry if registry null throw new illegal state exception i plugin descriptor pd registry get plugin descriptor id if pd null return null return pd get plugin catch core exception e todo log the exception return null iplugindescriptor getplugin getplugin ipluginregistry getpluginregistry illegalstateexception iplugindescriptor getplugindescriptor getplugin coreexception returns the plug in registry for this platform return the plug in registry see i plugin registry deprecated code i plugin registry code was refactored in eclipse 3 0 this method only works if the compatibility layer is installed and must not be used otherwise see the comments on link i plugin registry and its methods for details public static i plugin registry get plugin registry bundle compatibility internal platform get default get bundle compatibility helper pi runtime compatibility if compatibility null throw new illegal state exception class old internal platform null try old internal platform compatibility load class org eclipse core internal plugins internal platform non nls 1 method get plugin registry old internal platform get method get plugin registry null non nls 1 return i plugin registry get plugin registry invoke old internal platform null catch exception e ignore the exceptions return null return null ipluginregistry ipluginregistry ipluginregistry ipluginregistry getpluginregistry internalplatform getdefault getbundle compatibilityhelper pi_runtime_compatibility illegalstateexception oldinternalplatform oldinternalplatform loadclass internalplatform getpluginregistry oldinternalplatform getmethod getpluginregistry ipluginregistry getpluginregistry oldinternalplatform returns the location in the local file system of the plug in state area for the given plug in the platform must be running p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings p param plugin the plug in whose state location is returned return a local file system path public static i path get plugin state location plugin plugin return plugin get state location ipath getpluginstatelocation getstatelocation returns the protection space realm for the specified resource or code null code if the realm is unknown param resource url the url of the resource whose protection space is returned for example http www example com folder return the protection space realm for the specified resource or code null code if the realm is unknown public static string get protection space url resource url return internal platform get default get protection space resource url resourceurl getprotectionspace resourceurl internalplatform getdefault getprotectionspace resourceurl removes the indicated identical log listener from the notification list of the platform if no such listener exists no action is taken param listener the listener to de register see i log remove log listener i log listener see add log listener i log listener public static void remove log listener i log listener listener internal platform get default remove log listener listener ilog removeloglistener iloglistener addloglistener iloglistener removeloglistener iloglistener internalplatform getdefault removeloglistener returns a url which is the resolved equivalent of the supplied url this method is expected to be used with the plug in relative ur ls returned by i plugin descriptor bundle get entry and platform find p if the specified url is not a plug in relative url it is returned as is if the specified url is a plug in relative url this method attempts to reduce the given url to one which is native to the java class library eg file http etc p p note however that users of this api should not assume too much about the results of this method while it may consistently return a file url in certain installation configurations others may result in jar or http ur ls p param url original plug in relative url return the resolved url exception io exception if unable to resolve url see as localurl url see find bundle i path see bundle get entry string public static url resolve url url throws io exception return internal platform get default resolve url urls iplugindescriptor getentry urls ioexception aslocalurl ipath getentry ioexception internalplatform getdefault runs the given runnable in a protected mode exceptions thrown in the runnable are logged and passed to the runnable s exception handler such exceptions are not rethrown by this method param runnable the runnable to run public static void run i safe runnable runnable internal platform get default run runnable isaferunnable internalplatform getdefault returns the platform job manager return the platform s job manager since 3 0 public static i job manager get job manager return internal platform get default get job manager ijobmanager getjobmanager internalplatform getdefault getjobmanager returns the extension registry for this platform return the extension registry see i extension registry since 3 0 public static i extension registry get extension registry return internal platform get default get registry iextensionregistry iextensionregistry getextensionregistry internalplatform getdefault getregistry returns a url for the given path in the given bundle returns code null code if the url could not be computed or created param bundle the bundle in which to search param path path relative to plug in installation location return a url for the given path or code null code the actual form of the returned url is not specified see find bundle i path map see resolve url see as localurl url since 3 0 public static url find bundle bundle i path path return find support find bundle path null ipath aslocalurl ipath findsupport returns a url for the given path in the given bundle returns code null code if the url could not be computed or created p find looks for this path in given bundle and any attached fragments code null code is returned if no such entry is found note that there is no specific order to the fragments p p the following arguments may also be used pre nl for language specific information os for operating system specific information ws for windowing system specific information pre p p a path of nl about properties in an environment with a default locale of en ca will return a url corresponding to the first place about properties is found according to the following order pre plugin root nl en ca about properties fragment1 root nl en ca about properties fragment2 root nl en ca about properties plugin root nl en about properties fragment1 root nl en about properties fragment2 root nl en about properties plugin root about properties fragment1 root about properties fragment2 root about properties pre p p the current environment variable values can be overridden using the override map argument p param bundle the bundle in which to search param path file path relative to plug in installation location param override map of override substitution arguments to be used for any arg path elements the map keys correspond to the substitution arguments eg nl or os the resulting values must be of type java lang string if the map is code null code or does not contain the required substitution argument the default is used return a url for the given path or code null code the actual form of the returned url is not specified see resolve url see as localurl url since 3 0 public static url find bundle bundle i path path map override return find support find bundle path override en_ca aslocalurl ipath findsupport returns the location in the local file system of the plug in state area for the given bundle if the plug in state area did not exist prior to this call it is created p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings and other configuration parameters p param bundle the bundle whose state location if returned return a local file system path since 3 0 public static i path get state location bundle bundle return internal platform get default get state location bundle ipath getstatelocation internalplatform getdefault getstatelocation returns a number that changes whenever the set of installed plug ins changes this can be used for invalidating caches that are based on the set of currently installed plug ins e g extensions return a number related to the set of installed plug ins since 3 1 public static long get state stamp return internal platform get default get state time stamp getstatestamp internalplatform getdefault getstatetimestamp returns the log for the given bundle if no such log exists one is created param bundle the bundle whose log is returned return the log for the given bundle since 3 0 public static i log get log bundle bundle return internal platform get default get log bundle ilog getlog internalplatform getdefault getlog returns the given bundle s resource bundle for the current locale p this resource bundle is typically stored as the plugin properties file in the plug in itself and contains any translatable strings used in the plug in manifest file plugin xml p p this mechanism is intended only for externalizing strings found in the plug in manifest file using this method for externalizing strings in your code may result in degraded memory performance p param bundle the bundle whose resource bundle is being queried return the resource bundle exception missing resource exception if the resource bundle was not found since 3 0 public static resource bundle get resource bundle bundle bundle throws missing resource exception return internal platform get default get resource bundle bundle missingresourceexception resourcebundle getresourcebundle missingresourceexception internalplatform getdefault getresourcebundle returns a resource string corresponding to the given argument value if the argument value specifies a resource key the string is looked up in the default resource bundle for the given runtime bundle if the argument does not specify a valid key the argument itself is returned as the resource string the key lookup is performed in the file referenced in the bundle localization header of the bundle manifest if a resource string corresponding to the key is not found in the resource bundle the key value or any default text following the key in the argument value is returned as the resource string a key is identified as a string beginning with the character note that the character is stripped off prior to lookup in the resource bundle p equivalent to code get resource string bundle value get resource bundle code p param bundle the bundle whose resource bundle is being queried param value the value to look for return the resource string see get resource bundle bundle since 3 0 public static string get resource string bundle bundle string value return internal platform get default get resource string bundle value getresourcestring getresourcebundle getresourcebundle getresourcestring internalplatform getdefault getresourcestring returns a resource string corresponding to the given argument value and resource bundle in the given runtime bundle if the argument value specifies a resource key the string is looked up in the given resource bundle if the argument does not specify a valid key the argument itself is returned as the resource string the key lookup is performed against the specified resource bundle if a resource string corresponding to the key is not found in the resource bundle the key value or any default text following the key in the argument value is returned as the resource string a key is identified as a string beginning with the character note that the character is stripped off prior to lookup in the resource bundle p for example assume resource bundle plugin properties contains name project name pre get resource string hello world returns hello world li get resource string name returns project name li get resource string name hello world returns project name li get resource string abcd hello world returns hello world li get resource string abcd returns abcd li get resource string name returns name li pre p param bundle the bundle whose resource bundle is being queried param value the value param resource bundle the resource bundle to query return the resource string see get resource bundle bundle since 3 0 public static string get resource string bundle bundle string value resource bundle resource bundle return internal platform get default get resource string bundle value resource bundle getresourcestring getresourcestring getresourcestring getresourcestring getresourcestring getresourcestring resourcebundle getresourcebundle getresourcestring resourcebundle resourcebundle internalplatform getdefault getresourcestring resourcebundle returns the string name of the current system architecture the value is a user defined string if the architecture is specified on the command line otherwise it is the value returned by code java lang system get property os arch code return the string name of the current system architecture since 3 0 public static string getos arch return internal platform get default getos arch getproperty getosarch internalplatform getdefault getosarch returns the string name of the current locale for use in finding files whose path starts with code nl code return the string name of the current locale since 3 0 public static string getnl return internal platform get default getnl internalplatform getdefault returns the string name of the current operating system for use in finding files whose path starts with code os code code os unknown code is returned if the operating system cannot be determined the value may indicate one of the operating systems known to the platform as specified in code knownos values code or a user defined string if the operating system name is specified on the command line return the string name of the current operating system since 3 0 public static string getos return internal platform get default getos os_unknown knownosvalues internalplatform getdefault returns the string name of the current window system for use in finding files whose path starts with code ws code code null code is returned if the window system cannot be determined return the string name of the current window system or code null code since 3 0 public static string getws return internal platform get default getws internalplatform getdefault returns the arguments not consumed by the framework implementation itself which arguments are consumed is implementation specific these arguments are available for use by the application return the array of command line arguments not consumed by the framework since 3 0 public static string get application args return internal platform get default get application args getapplicationargs internalplatform getdefault getapplicationargs returns the platform administrator for this running eclipse p note this is an internal method and em must not em be used by clients which are not part of the eclipse platform this method allows access to classes which are not eclipse platform api but are part of the os gi runtime that the eclipse platform is built on even as the eclipse platform evolves in compatible ways from release to release the details of the os gi implementation might not p return the platform admin for this instance of eclipse since 3 0 public static platform admin get platform admin return internal platform get default get platform admin osgi osgi platformadmin getplatformadmin internalplatform getdefault getplatformadmin returns the location of the platform s working directory also known as the instance data area code null code is returned if the platform is running without an instance location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi instance area p return the location of the platform s instance data area or code null code if none since 3 0 public static location get instance location return internal platform get default get instance location getinstancelocation internalplatform getdefault getinstancelocation returns the currently registered bundle group providers return the currently registered bundle group providers since 3 0 public static i bundle group provider get bundle group providers return internal platform get default get bundle group providers ibundlegroupprovider getbundlegroupproviders internalplatform getdefault getbundlegroupproviders return the interface into the preference mechanism the returned object can be used for such operations as searching for preference values across multiple scopes and preference import export return an object to interface into the preference mechanism since 3 0 public static i preferences service get preferences service return internal platform get default get preferences service ipreferencesservice getpreferencesservice internalplatform getdefault getpreferencesservice returns the product which was selected when running this eclipse instance or code null code if none return the current product or code null code if none since 3 0 public static i product get product return internal platform get default get product iproduct getproduct internalplatform getdefault getproduct registers the given bundle group provider with the platform param provider a provider to register since 3 0 public static void register bundle group provider i bundle group provider provider internal platform get default register bundle group provider provider registerbundlegroupprovider ibundlegroupprovider internalplatform getdefault registerbundlegroupprovider de registers the given bundle group provider with the platform param provider a provider to de register since 3 0 public static void unregister bundle group provider i bundle group provider provider internal platform get default unregister bundle group provider provider unregisterbundlegroupprovider ibundlegroupprovider internalplatform getdefault unregisterbundlegroupprovider returns the location of the configuration information used to run this instance of eclipse the configuration area typically contains the list of plug ins available for use various settings those shared across different instances of the same configuration and any other such data needed by plug ins code null code is returned if the platform is running without a configuration location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi configuration area p return the location of the platform s configuration data area or code null code if none since 3 0 public static location get configuration location return internal platform get default get configuration location getconfigurationlocation internalplatform getdefault getconfigurationlocation returns the location of the platform s user data area the user data area is a location on the system which is specific to the system s current user by default it is located relative to the location given by the system property user home code null code is returned if the platform is running without an user location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi user area p return the location of the platform s user data area or code null code if none since 3 0 public static location get user location return internal platform get default get user location getuserlocation internalplatform getdefault getuserlocation returns the location of the base installation for the running platform code null code is returned if the platform is running without a configuration location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi install area p return the location of the platform s installation area or code null code if none since 3 0 public static location get install location return internal platform get default get install location getinstalllocation internalplatform getdefault getinstalllocation checks if the specified bundle is a fragment bundle param bundle the bundle to query return true if the specified bundle is a fragment bundle otherwise false is returned since 3 0 public static boolean is fragment bundle bundle return internal platform get default is fragment bundle isfragment internalplatform getdefault isfragment returns an array of attached fragment bundles for the specified bundle if the specified bundle is a fragment then tt null tt is returned if no fragments are attached to the specified bundle then tt null tt is returned param bundle the bundle to get the attached fragment bundles for return an array of fragment bundles or tt null tt if the bundle does not have any attached fragment bundles since 3 0 public static bundle get fragments bundle bundle return internal platform get default get fragments bundle getfragments internalplatform getdefault getfragments returns the resolved bundle with the specified symbolic name that has the highest version if no resolved bundles are installed that have the specified symbolic name then null is returned param symbolic name the symbolic name of the bundle to be returned return the bundle that has the specified symbolic name with the highest version or tt null tt if no bundle is found since 3 0 public static bundle get bundle string symbolic name return internal platform get default get bundle symbolic name symbolicname getbundle symbolicname internalplatform getdefault getbundle symbolicname returns all bundles with the specified symbolic name if no resolved bundles with the specified symbolic name can be found tt null tt is returned if the version argument is not null then only the bundles that have the specified symbolic name and a version greater than or equal to the specified version are returned the returned bundles are ordered in descending bundle version order param symbolic name the symbolic name of the bundles that are to be returned param version the version that the return bundle versions must match or tt null tt if no version matching is to be done return the array of bundles with the specified name that match the specified version and match rule or tt null tt if no bundles are found public static bundle get bundles string symbolic name string version return internal platform get default get bundles symbolic name version symbolicname getbundles symbolicname internalplatform getdefault getbundles symbolicname returns an array of host bundles that the specified fragment bundle is attached to or tt null tt if the specified bundle is not attached to a host if the bundle is not a fragment bundle then tt null tt is returned param bundle the bundle to get the host bundles for return an array of host bundles or null if the bundle does not have any host bundles since 3 0 public static bundle get hosts bundle bundle return internal platform get default get hosts bundle gethosts internalplatform getdefault gethosts returns whether the platform is running return code true code if the platform is running and code false code otherwise since 3 0 public static boolean is running return internal platform get default is running isrunning internalplatform getdefault isrunning returns a list of known system architectures p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getos arch code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of system architectures known to the system see getos arch since 3 0 public static string knownos arch values return internal platform get default knownos arch values getosarch getosarch knownosarchvalues internalplatform getdefault knownosarchvalues returns a list of known operating system names p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getos code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of operating systems known to the system see getos since 3 0 public static string knownos values return internal platform get default knownos values knownosvalues internalplatform getdefault knownosvalues returns a map of known platform line separators the keys are translated names of platforms and the values are their associated line separator strings return a map of platform to their line separator string since 3 1 public static map known platform line separators map result new hash map result put line separator key mac os 9 line separator value cr result put line separator key unix line separator value lf result put line separator key windows line separator value crlf return result knownplatformlineseparators hashmap line_separator_key_mac_os_9 line_separator_value_cr line_separator_key_unix line_separator_value_lf line_separator_key_windows line_separator_value_crlf returns a list of known windowing system names p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getws code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of window systems known to the system see getws since 3 0 public static string knownws values return internal platform get default knownws values knownwsvalues internalplatform getdefault knownwsvalues returns code true code if the platform is currently running in debug mode the platform is typically put in debug mode using the debug command line argument return whether or not the platform is running in debug mode since 3 0 public static boolean in debug mode return system get property osgi debug null non nls 1 indebugmode getproperty returns code true code if the platform is currently running in development mode that is if special procedures are to be taken when defining plug in class paths the platform is typically put in development mode using the dev command line argument return whether or not the platform is running in development mode since 3 0 public static boolean in development mode return system get property osgi dev null non nls 1 indevelopmentmode getproperty private constructor to block instance creation private platform super adds the given authorization information to the key ring the information is relevant for the specified protection space and the given authorization scheme the protection space is defined by the combination of the given server url and realm the authorization scheme determines what the authorization information contains and how it should be used the authorization information is a code map code of code string code to code string code and typically contains information such as user names and passwords param server url the url identifying the server for this authorization information for example http www example com param realm the subsection of the given server to which this authorization information applies for example realm1 example com or for no realm param auth scheme the scheme for which this authorization information applies for example basic or for no authorization scheme param info a code map code containing authorization information such as user names and passwords key type code string code value type code string code exception core exception if there are problems setting the authorization information reasons include ul li the keyring could not be saved li ul public static void add authorization info url server url string realm string auth scheme map info throws core exception internal platform get default add authorization info server url realm auth scheme info serverurl authscheme coreexception addauthorizationinfo serverurl authscheme coreexception internalplatform getdefault addauthorizationinfo serverurl authscheme adds the given log listener to the notification list of the platform p once registered a listener starts receiving notification as entries are added to plug in logs via code i log log code the listener continues to receive notifications until it is replaced or removed p param listener the listener to register see i log add log listener i log listener see remove log listener i log listener public static void add log listener i log listener listener internal platform get default add log listener listener ilog ilog addloglistener iloglistener removeloglistener iloglistener addloglistener iloglistener internalplatform getdefault addloglistener adds the specified resource to the protection space specified by the given realm all targets at or deeper than the depth of the last symbolic element in the path of the given resource url are assumed to be in the same protection space param resource url the url identifying the resources to be added to the specified protection space for example http www example com folder param realm the name of the protection space for example realm1 example com exception core exception if there are problems setting the authorization information reasons include ul li the key ring could not be saved li ul public static void add protection space url resource url string realm throws core exception internal platform get default add protection space resource url realm resourceurl coreexception addprotectionspace resourceurl coreexception internalplatform getdefault addprotectionspace resourceurl returns a url that is the local equivalent of the supplied url this method is expected to be used with the plug in relative ur ls returned by i plugin descriptor bundle get entry and platform find if the specified url is not a plug in relative url it is returned as is if the specified url is a plug in relative url of a file including jar archive it is returned as a locally accessible url using file protocol extracting caching the file locally if required if the specified url is a plug in relative url of a directory the directory and any files and directories under it are made locally accessible likewise if param url original plug in relative url return the resolved url exception io exception if unable to resolve url see resolve url see find bundle i path see bundle get entry string public static url as localurl url url throws io exception return internal platform get default as localurl url urls iplugindescriptor getentry ioexception ipath getentry aslocalurl ioexception internalplatform getdefault aslocalurl takes down the splash screen if one was put up public static void end splash internal platform get default end splash endsplash internalplatform getdefault endsplash removes the authorization information for the specified protection space and given authorization scheme the protection space is defined by the given server url and realm param server url the url identifying the server to remove the authorization information for for example http www example com param realm the subsection of the given server to remove the authorization information for for example realm1 example com or for no realm param auth scheme the scheme for which the authorization information to remove applies for example basic or for no authorization scheme exception core exception if there are problems removing the authorization information reasons include ul li the keyring could not be saved li ul public static void flush authorization info url server url string realm string auth scheme throws core exception internal platform get default flush authorization info server url realm auth scheme serverurl authscheme coreexception flushauthorizationinfo serverurl authscheme coreexception internalplatform getdefault flushauthorizationinfo serverurl authscheme returns the adapter manager used for extending code i adaptable code objects return the adapter manager for this platform see i adapter manager public static i adapter manager get adapter manager return internal platform get default get adapter manager iadaptable iadaptermanager iadaptermanager getadaptermanager internalplatform getdefault getadaptermanager returns the authorization information for the specified protection space and given authorization scheme the protection space is defined by the given server url and realm returns code null code if no such information exists param server url the url identifying the server for the authorization information for example http www example com param realm the subsection of the given server to which the authorization information applies for example realm1 example com or for no realm param auth scheme the scheme for which the authorization information applies for example basic or for no authorization scheme return the authorization information for the specified protection space and given authorization scheme or code null code if no such information exists public static map get authorization info url server url string realm string auth scheme return internal platform get default get authorization info server url realm auth scheme serverurl authscheme getauthorizationinfo serverurl authscheme internalplatform getdefault getauthorizationinfo serverurl authscheme returns the command line args provided to the eclipse runtime layer when it was first run the returned value does not include arguments consumed by the lower levels of eclipse e g os gi or the launcher note that individual platform runnables may be provided with different arguments if they are being run individually rather than with code platform run code return the command line used to start the platform public static string get command line args return internal platform get default get command line args osgi getcommandlineargs internalplatform getdefault getcommandlineargs returns the content type manager return the content type manager since 3 0 public static i content type manager get content type manager return internal platform get default get content type manager icontenttypemanager getcontenttypemanager internalplatform getdefault getcontenttypemanager returns the identified option code null code is returned if no such option is found options are specified in the general form i lt plug in id gt lt option path gt i for example code org eclipse core runtime debug code param option the name of the option to lookup return the value of the requested debug option or code null code public static string get debug option string option return internal platform get default get option option getdebugoption internalplatform getdefault getoption returns the location of the platform working directory p callers of this method should consider using code get instance location code instead in various typically non ide related configurations of eclipse the platform working directory may not be on the local file system as such the more general form of this location is as a url p return the location of the platform see get instance location public static i path get location throws illegal state exception return internal platform get default get location getinstancelocation getinstancelocation ipath getlocation illegalstateexception internalplatform getdefault getlocation returns the location of the platform log file this file may contain information about errors that have previously occurred during this invocation of the platform p it is recommended not to keep this value as the log location may vary when an instance location is being set p p note it is very important that users of this method do not leave the log file open for extended periods of time doing so may prevent others from writing to the log file which could result in important error messages being lost it is strongly recommended that clients wanting to read the log file for extended periods should copy the log file contents elsewhere and immediately close the original file p return the path of the log file on disk public static i path get log file location return internal platform get default get meta area get log location ipath getlogfilelocation internalplatform getdefault getmetaarea getloglocation returns the plug in runtime object for the identified plug in or code null code if no such plug in can be found if the plug in is defined but not yet activated the plug in will be activated before being returned p b note b this method is only able to find and return plug in objects for plug ins described using plugin xml according to the traditional eclipse conventions eclipse 3 0 permits plug ins to be described in manifest mf files and to define their own bundle activators such plug ins cannot be discovered by this method p param id the unique identifier of the desired plug in e g code com example acme code return the plug in runtime object or code null code deprecated this method only works if the compatibility layer is installed and must not be used otherwise see the comments on link i plugin descriptor get plugin for details public static plugin get plugin string id try i plugin registry registry get plugin registry if registry null throw new illegal state exception i plugin descriptor pd registry get plugin descriptor id if pd null return null return pd get plugin catch core exception e todo log the exception return null iplugindescriptor getplugin getplugin ipluginregistry getpluginregistry illegalstateexception iplugindescriptor getplugindescriptor getplugin coreexception returns the plug in registry for this platform return the plug in registry see i plugin registry deprecated code i plugin registry code was refactored in eclipse 3 0 this method only works if the compatibility layer is installed and must not be used otherwise see the comments on link i plugin registry and its methods for details public static i plugin registry get plugin registry bundle compatibility internal platform get default get bundle compatibility helper pi runtime compatibility if compatibility null throw new illegal state exception class old internal platform null try old internal platform compatibility load class org eclipse core internal plugins internal platform non nls 1 method get plugin registry old internal platform get method get plugin registry null non nls 1 return i plugin registry get plugin registry invoke old internal platform null catch exception e ignore the exceptions return null return null ipluginregistry ipluginregistry ipluginregistry ipluginregistry getpluginregistry internalplatform getdefault getbundle compatibilityhelper pi_runtime_compatibility illegalstateexception oldinternalplatform oldinternalplatform loadclass internalplatform getpluginregistry oldinternalplatform getmethod getpluginregistry ipluginregistry getpluginregistry oldinternalplatform returns the location in the local file system of the plug in state area for the given plug in the platform must be running p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings p param plugin the plug in whose state location is returned return a local file system path public static i path get plugin state location plugin plugin return plugin get state location ipath getpluginstatelocation getstatelocation returns the protection space realm for the specified resource or code null code if the realm is unknown param resource url the url of the resource whose protection space is returned for example http www example com folder return the protection space realm for the specified resource or code null code if the realm is unknown public static string get protection space url resource url return internal platform get default get protection space resource url resourceurl getprotectionspace resourceurl internalplatform getdefault getprotectionspace resourceurl removes the indicated identical log listener from the notification list of the platform if no such listener exists no action is taken param listener the listener to de register see i log remove log listener i log listener see add log listener i log listener public static void remove log listener i log listener listener internal platform get default remove log listener listener ilog removeloglistener iloglistener addloglistener iloglistener removeloglistener iloglistener internalplatform getdefault removeloglistener returns a url which is the resolved equivalent of the supplied url this method is expected to be used with the plug in relative ur ls returned by i plugin descriptor bundle get entry and platform find p if the specified url is not a plug in relative url it is returned as is if the specified url is a plug in relative url this method attempts to reduce the given url to one which is native to the java class library eg file http etc p p note however that users of this api should not assume too much about the results of this method while it may consistently return a file url in certain installation configurations others may result in jar or http ur ls p param url original plug in relative url return the resolved url exception io exception if unable to resolve url see as localurl url see find bundle i path see bundle get entry string public static url resolve url url throws io exception return internal platform get default resolve url urls iplugindescriptor getentry urls ioexception aslocalurl ipath getentry ioexception internalplatform getdefault runs the given runnable in a protected mode exceptions thrown in the runnable are logged and passed to the runnable s exception handler such exceptions are not rethrown by this method param runnable the runnable to run public static void run i safe runnable runnable internal platform get default run runnable isaferunnable internalplatform getdefault returns the platform job manager return the platform s job manager since 3 0 public static i job manager get job manager return internal platform get default get job manager ijobmanager getjobmanager internalplatform getdefault getjobmanager returns the extension registry for this platform return the extension registry see i extension registry since 3 0 public static i extension registry get extension registry return internal platform get default get registry iextensionregistry iextensionregistry getextensionregistry internalplatform getdefault getregistry returns a url for the given path in the given bundle returns code null code if the url could not be computed or created param bundle the bundle in which to search param path path relative to plug in installation location return a url for the given path or code null code the actual form of the returned url is not specified see find bundle i path map see resolve url see as localurl url since 3 0 public static url find bundle bundle i path path return find support find bundle path null ipath aslocalurl ipath findsupport returns a url for the given path in the given bundle returns code null code if the url could not be computed or created p find looks for this path in given bundle and any attached fragments code null code is returned if no such entry is found note that there is no specific order to the fragments p p the following arguments may also be used pre nl for language specific information os for operating system specific information ws for windowing system specific information pre p p a path of nl about properties in an environment with a default locale of en ca will return a url corresponding to the first place about properties is found according to the following order pre plugin root nl en ca about properties fragment1 root nl en ca about properties fragment2 root nl en ca about properties plugin root nl en about properties fragment1 root nl en about properties fragment2 root nl en about properties plugin root about properties fragment1 root about properties fragment2 root about properties pre p p the current environment variable values can be overridden using the override map argument p param bundle the bundle in which to search param path file path relative to plug in installation location param override map of override substitution arguments to be used for any arg path elements the map keys correspond to the substitution arguments eg nl or os the resulting values must be of type java lang string if the map is code null code or does not contain the required substitution argument the default is used return a url for the given path or code null code the actual form of the returned url is not specified see resolve url see as localurl url since 3 0 public static url find bundle bundle i path path map override return find support find bundle path override en_ca aslocalurl ipath findsupport returns the location in the local file system of the plug in state area for the given bundle if the plug in state area did not exist prior to this call it is created p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings and other configuration parameters p param bundle the bundle whose state location if returned return a local file system path since 3 0 public static i path get state location bundle bundle return internal platform get default get state location bundle ipath getstatelocation internalplatform getdefault getstatelocation returns a number that changes whenever the set of installed plug ins changes this can be used for invalidating caches that are based on the set of currently installed plug ins e g extensions return a number related to the set of installed plug ins since 3 1 public static long get state stamp return internal platform get default get state time stamp getstatestamp internalplatform getdefault getstatetimestamp returns the log for the given bundle if no such log exists one is created param bundle the bundle whose log is returned return the log for the given bundle since 3 0 public static i log get log bundle bundle return internal platform get default get log bundle ilog getlog internalplatform getdefault getlog returns the given bundle s resource bundle for the current locale p this resource bundle is typically stored as the plugin properties file in the plug in itself and contains any translatable strings used in the plug in manifest file plugin xml p p this mechanism is intended only for externalizing strings found in the plug in manifest file using this method for externalizing strings in your code may result in degraded memory performance p param bundle the bundle whose resource bundle is being queried return the resource bundle exception missing resource exception if the resource bundle was not found since 3 0 public static resource bundle get resource bundle bundle bundle throws missing resource exception return internal platform get default get resource bundle bundle missingresourceexception resourcebundle getresourcebundle missingresourceexception internalplatform getdefault getresourcebundle returns a resource string corresponding to the given argument value if the argument value specifies a resource key the string is looked up in the default resource bundle for the given runtime bundle if the argument does not specify a valid key the argument itself is returned as the resource string the key lookup is performed in the file referenced in the bundle localization header of the bundle manifest if a resource string corresponding to the key is not found in the resource bundle the key value or any default text following the key in the argument value is returned as the resource string a key is identified as a string beginning with the character note that the character is stripped off prior to lookup in the resource bundle p equivalent to code get resource string bundle value get resource bundle code p param bundle the bundle whose resource bundle is being queried param value the value to look for return the resource string see get resource bundle bundle since 3 0 public static string get resource string bundle bundle string value return internal platform get default get resource string bundle value getresourcestring getresourcebundle getresourcebundle getresourcestring internalplatform getdefault getresourcestring returns a resource string corresponding to the given argument value and resource bundle in the given runtime bundle if the argument value specifies a resource key the string is looked up in the given resource bundle if the argument does not specify a valid key the argument itself is returned as the resource string the key lookup is performed against the specified resource bundle if a resource string corresponding to the key is not found in the resource bundle the key value or any default text following the key in the argument value is returned as the resource string a key is identified as a string beginning with the character note that the character is stripped off prior to lookup in the resource bundle p for example assume resource bundle plugin properties contains name project name pre get resource string hello world returns hello world li get resource string name returns project name li get resource string name hello world returns project name li get resource string abcd hello world returns hello world li get resource string abcd returns abcd li get resource string name returns name li pre p param bundle the bundle whose resource bundle is being queried param value the value param resource bundle the resource bundle to query return the resource string see get resource bundle bundle since 3 0 public static string get resource string bundle bundle string value resource bundle resource bundle return internal platform get default get resource string bundle value resource bundle getresourcestring getresourcestring getresourcestring getresourcestring getresourcestring getresourcestring resourcebundle getresourcebundle getresourcestring resourcebundle resourcebundle internalplatform getdefault getresourcestring resourcebundle returns the string name of the current system architecture the value is a user defined string if the architecture is specified on the command line otherwise it is the value returned by code java lang system get property os arch code return the string name of the current system architecture since 3 0 public static string getos arch return internal platform get default getos arch getproperty getosarch internalplatform getdefault getosarch returns the string name of the current locale for use in finding files whose path starts with code nl code return the string name of the current locale since 3 0 public static string getnl return internal platform get default getnl internalplatform getdefault returns the string name of the current operating system for use in finding files whose path starts with code os code code os unknown code is returned if the operating system cannot be determined the value may indicate one of the operating systems known to the platform as specified in code knownos values code or a user defined string if the operating system name is specified on the command line return the string name of the current operating system since 3 0 public static string getos return internal platform get default getos os_unknown knownosvalues internalplatform getdefault returns the string name of the current window system for use in finding files whose path starts with code ws code code null code is returned if the window system cannot be determined return the string name of the current window system or code null code since 3 0 public static string getws return internal platform get default getws internalplatform getdefault returns the arguments not consumed by the framework implementation itself which arguments are consumed is implementation specific these arguments are available for use by the application return the array of command line arguments not consumed by the framework since 3 0 public static string get application args return internal platform get default get application args getapplicationargs internalplatform getdefault getapplicationargs returns the platform administrator for this running eclipse p note this is an internal method and em must not em be used by clients which are not part of the eclipse platform this method allows access to classes which are not eclipse platform api but are part of the os gi runtime that the eclipse platform is built on even as the eclipse platform evolves in compatible ways from release to release the details of the os gi implementation might not p return the platform admin for this instance of eclipse since 3 0 public static platform admin get platform admin return internal platform get default get platform admin osgi osgi platformadmin getplatformadmin internalplatform getdefault getplatformadmin returns the location of the platform s working directory also known as the instance data area code null code is returned if the platform is running without an instance location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi instance area p return the location of the platform s instance data area or code null code if none since 3 0 public static location get instance location return internal platform get default get instance location getinstancelocation internalplatform getdefault getinstancelocation returns the currently registered bundle group providers return the currently registered bundle group providers since 3 0 public static i bundle group provider get bundle group providers return internal platform get default get bundle group providers ibundlegroupprovider getbundlegroupproviders internalplatform getdefault getbundlegroupproviders return the interface into the preference mechanism the returned object can be used for such operations as searching for preference values across multiple scopes and preference import export return an object to interface into the preference mechanism since 3 0 public static i preferences service get preferences service return internal platform get default get preferences service ipreferencesservice getpreferencesservice internalplatform getdefault getpreferencesservice returns the product which was selected when running this eclipse instance or code null code if none return the current product or code null code if none since 3 0 public static i product get product return internal platform get default get product iproduct getproduct internalplatform getdefault getproduct registers the given bundle group provider with the platform param provider a provider to register since 3 0 public static void register bundle group provider i bundle group provider provider internal platform get default register bundle group provider provider registerbundlegroupprovider ibundlegroupprovider internalplatform getdefault registerbundlegroupprovider de registers the given bundle group provider with the platform param provider a provider to de register since 3 0 public static void unregister bundle group provider i bundle group provider provider internal platform get default unregister bundle group provider provider unregisterbundlegroupprovider ibundlegroupprovider internalplatform getdefault unregisterbundlegroupprovider returns the location of the configuration information used to run this instance of eclipse the configuration area typically contains the list of plug ins available for use various settings those shared across different instances of the same configuration and any other such data needed by plug ins code null code is returned if the platform is running without a configuration location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi configuration area p return the location of the platform s configuration data area or code null code if none since 3 0 public static location get configuration location return internal platform get default get configuration location getconfigurationlocation internalplatform getdefault getconfigurationlocation returns the location of the platform s user data area the user data area is a location on the system which is specific to the system s current user by default it is located relative to the location given by the system property user home code null code is returned if the platform is running without an user location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi user area p return the location of the platform s user data area or code null code if none since 3 0 public static location get user location return internal platform get default get user location getuserlocation internalplatform getdefault getuserlocation returns the location of the base installation for the running platform code null code is returned if the platform is running without a configuration location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi install area p return the location of the platform s installation area or code null code if none since 3 0 public static location get install location return internal platform get default get install location getinstalllocation internalplatform getdefault getinstalllocation checks if the specified bundle is a fragment bundle param bundle the bundle to query return true if the specified bundle is a fragment bundle otherwise false is returned since 3 0 public static boolean is fragment bundle bundle return internal platform get default is fragment bundle isfragment internalplatform getdefault isfragment returns an array of attached fragment bundles for the specified bundle if the specified bundle is a fragment then tt null tt is returned if no fragments are attached to the specified bundle then tt null tt is returned param bundle the bundle to get the attached fragment bundles for return an array of fragment bundles or tt null tt if the bundle does not have any attached fragment bundles since 3 0 public static bundle get fragments bundle bundle return internal platform get default get fragments bundle getfragments internalplatform getdefault getfragments returns the resolved bundle with the specified symbolic name that has the highest version if no resolved bundles are installed that have the specified symbolic name then null is returned param symbolic name the symbolic name of the bundle to be returned return the bundle that has the specified symbolic name with the highest version or tt null tt if no bundle is found since 3 0 public static bundle get bundle string symbolic name return internal platform get default get bundle symbolic name symbolicname getbundle symbolicname internalplatform getdefault getbundle symbolicname returns all bundles with the specified symbolic name if no resolved bundles with the specified symbolic name can be found tt null tt is returned if the version argument is not null then only the bundles that have the specified symbolic name and a version greater than or equal to the specified version are returned the returned bundles are ordered in descending bundle version order param symbolic name the symbolic name of the bundles that are to be returned param version the version that the return bundle versions must match or tt null tt if no version matching is to be done return the array of bundles with the specified name that match the specified version and match rule or tt null tt if no bundles are found public static bundle get bundles string symbolic name string version return internal platform get default get bundles symbolic name version symbolicname getbundles symbolicname internalplatform getdefault getbundles symbolicname returns an array of host bundles that the specified fragment bundle is attached to or tt null tt if the specified bundle is not attached to a host if the bundle is not a fragment bundle then tt null tt is returned param bundle the bundle to get the host bundles for return an array of host bundles or null if the bundle does not have any host bundles since 3 0 public static bundle get hosts bundle bundle return internal platform get default get hosts bundle gethosts internalplatform getdefault gethosts returns whether the platform is running return code true code if the platform is running and code false code otherwise since 3 0 public static boolean is running return internal platform get default is running isrunning internalplatform getdefault isrunning returns a list of known system architectures p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getos arch code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of system architectures known to the system see getos arch since 3 0 public static string knownos arch values return internal platform get default knownos arch values getosarch getosarch knownosarchvalues internalplatform getdefault knownosarchvalues returns a list of known operating system names p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getos code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of operating systems known to the system see getos since 3 0 public static string knownos values return internal platform get default knownos values knownosvalues internalplatform getdefault knownosvalues returns a map of known platform line separators the keys are translated names of platforms and the values are their associated line separator strings return a map of platform to their line separator string since 3 1 public static map known platform line separators map result new hash map result put line separator key mac os 9 line separator value cr result put line separator key unix line separator value lf result put line separator key windows line separator value crlf return result knownplatformlineseparators hashmap line_separator_key_mac_os_9 line_separator_value_cr line_separator_key_unix line_separator_value_lf line_separator_key_windows line_separator_value_crlf returns a list of known windowing system names p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getws code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of window systems known to the system see getws since 3 0 public static string knownws values return internal platform get default knownws values knownwsvalues internalplatform getdefault knownwsvalues returns code true code if the platform is currently running in debug mode the platform is typically put in debug mode using the debug command line argument return whether or not the platform is running in debug mode since 3 0 public static boolean in debug mode return system get property osgi debug null non nls 1 indebugmode getproperty returns code true code if the platform is currently running in development mode that is if special procedures are to be taken when defining plug in class paths the platform is typically put in development mode using the dev command line argument return whether or not the platform is running in development mode since 3 0 public static boolean in development mode return system get property osgi dev null non nls 1 indevelopmentmode getproperty private constructor to block instance creation private platform super adds the given authorization information to the key ring the information is relevant for the specified protection space and the given authorization scheme the protection space is defined by the combination of the given server url and realm the authorization scheme determines what the authorization information contains and how it should be used the authorization information is a code map code of code string code to code string code and typically contains information such as user names and passwords param server url the url identifying the server for this authorization information for example http www example com param realm the subsection of the given server to which this authorization information applies for example realm1 example com or for no realm param auth scheme the scheme for which this authorization information applies for example basic or for no authorization scheme param info a code map code containing authorization information such as user names and passwords key type code string code value type code string code exception core exception if there are problems setting the authorization information reasons include ul li the keyring could not be saved li ul public static void add authorization info url server url string realm string auth scheme map info throws core exception internal platform get default add authorization info server url realm auth scheme info serverurl authscheme coreexception addauthorizationinfo serverurl authscheme coreexception internalplatform getdefault addauthorizationinfo serverurl authscheme adds the given log listener to the notification list of the platform p once registered a listener starts receiving notification as entries are added to plug in logs via code i log log code the listener continues to receive notifications until it is replaced or removed p param listener the listener to register see i log add log listener i log listener see remove log listener i log listener public static void add log listener i log listener listener internal platform get default add log listener listener ilog ilog addloglistener iloglistener removeloglistener iloglistener addloglistener iloglistener internalplatform getdefault addloglistener adds the specified resource to the protection space specified by the given realm all targets at or deeper than the depth of the last symbolic element in the path of the given resource url are assumed to be in the same protection space param resource url the url identifying the resources to be added to the specified protection space for example http www example com folder param realm the name of the protection space for example realm1 example com exception core exception if there are problems setting the authorization information reasons include ul li the key ring could not be saved li ul public static void add protection space url resource url string realm throws core exception internal platform get default add protection space resource url realm resourceurl coreexception addprotectionspace resourceurl coreexception internalplatform getdefault addprotectionspace resourceurl returns a url that is the local equivalent of the supplied url this method is expected to be used with the plug in relative ur ls returned by i plugin descriptor bundle get entry and platform find if the specified url is not a plug in relative url it is returned as is if the specified url is a plug in relative url of a file including jar archive it is returned as a locally accessible url using file protocol extracting caching the file locally if required if the specified url is a plug in relative url of a directory the directory and any files and directories under it are made locally accessible likewise if param url original plug in relative url return the resolved url exception io exception if unable to resolve url see resolve url see find bundle i path see bundle get entry string public static url as localurl url url throws io exception return internal platform get default as localurl url urls iplugindescriptor getentry ioexception ipath getentry aslocalurl ioexception internalplatform getdefault aslocalurl takes down the splash screen if one was put up public static void end splash internal platform get default end splash endsplash internalplatform getdefault endsplash removes the authorization information for the specified protection space and given authorization scheme the protection space is defined by the given server url and realm param server url the url identifying the server to remove the authorization information for for example http www example com param realm the subsection of the given server to remove the authorization information for for example realm1 example com or for no realm param auth scheme the scheme for which the authorization information to remove applies for example basic or for no authorization scheme exception core exception if there are problems removing the authorization information reasons include ul li the keyring could not be saved li ul public static void flush authorization info url server url string realm string auth scheme throws core exception internal platform get default flush authorization info server url realm auth scheme serverurl authscheme coreexception flushauthorizationinfo serverurl authscheme coreexception internalplatform getdefault flushauthorizationinfo serverurl authscheme returns the adapter manager used for extending code i adaptable code objects return the adapter manager for this platform see i adapter manager public static i adapter manager get adapter manager return internal platform get default get adapter manager iadaptable iadaptermanager iadaptermanager getadaptermanager internalplatform getdefault getadaptermanager returns the authorization information for the specified protection space and given authorization scheme the protection space is defined by the given server url and realm returns code null code if no such information exists param server url the url identifying the server for the authorization information for example http www example com param realm the subsection of the given server to which the authorization information applies for example realm1 example com or for no realm param auth scheme the scheme for which the authorization information applies for example basic or for no authorization scheme return the authorization information for the specified protection space and given authorization scheme or code null code if no such information exists public static map get authorization info url server url string realm string auth scheme return internal platform get default get authorization info server url realm auth scheme serverurl authscheme getauthorizationinfo serverurl authscheme internalplatform getdefault getauthorizationinfo serverurl authscheme returns the command line args provided to the eclipse runtime layer when it was first run the returned value does not include arguments consumed by the lower levels of eclipse e g os gi or the launcher note that individual platform runnables may be provided with different arguments if they are being run individually rather than with code platform run code return the command line used to start the platform public static string get command line args return internal platform get default get command line args osgi getcommandlineargs internalplatform getdefault getcommandlineargs returns the content type manager return the content type manager since 3 0 public static i content type manager get content type manager return internal platform get default get content type manager icontenttypemanager getcontenttypemanager internalplatform getdefault getcontenttypemanager returns the identified option code null code is returned if no such option is found options are specified in the general form i lt plug in id gt lt option path gt i for example code org eclipse core runtime debug code param option the name of the option to lookup return the value of the requested debug option or code null code public static string get debug option string option return internal platform get default get option option getdebugoption internalplatform getdefault getoption returns the location of the platform working directory p callers of this method should consider using code get instance location code instead in various typically non ide related configurations of eclipse the platform working directory may not be on the local file system as such the more general form of this location is as a url p return the location of the platform see get instance location public static i path get location throws illegal state exception return internal platform get default get location getinstancelocation getinstancelocation ipath getlocation illegalstateexception internalplatform getdefault getlocation returns the location of the platform log file this file may contain information about errors that have previously occurred during this invocation of the platform p it is recommended not to keep this value as the log location may vary when an instance location is being set p p note it is very important that users of this method do not leave the log file open for extended periods of time doing so may prevent others from writing to the log file which could result in important error messages being lost it is strongly recommended that clients wanting to read the log file for extended periods should copy the log file contents elsewhere and immediately close the original file p return the path of the log file on disk public static i path get log file location return internal platform get default get meta area get log location ipath getlogfilelocation internalplatform getdefault getmetaarea getloglocation returns the plug in runtime object for the identified plug in or code null code if no such plug in can be found if the plug in is defined but not yet activated the plug in will be activated before being returned p b note b this method is only able to find and return plug in objects for plug ins described using plugin xml according to the traditional eclipse conventions eclipse 3 0 permits plug ins to be described in manifest mf files and to define their own bundle activators such plug ins cannot be discovered by this method p param id the unique identifier of the desired plug in e g code com example acme code return the plug in runtime object or code null code deprecated this method only works if the compatibility layer is installed and must not be used otherwise see the comments on link i plugin descriptor get plugin for details public static plugin get plugin string id try i plugin registry registry get plugin registry if registry null throw new illegal state exception i plugin descriptor pd registry get plugin descriptor id if pd null return null return pd get plugin catch core exception e todo log the exception return null iplugindescriptor getplugin getplugin ipluginregistry getpluginregistry illegalstateexception iplugindescriptor getplugindescriptor getplugin coreexception returns the plug in registry for this platform return the plug in registry see i plugin registry deprecated code i plugin registry code was refactored in eclipse 3 0 this method only works if the compatibility layer is installed and must not be used otherwise see the comments on link i plugin registry and its methods for details public static i plugin registry get plugin registry bundle compatibility internal platform get default get bundle compatibility helper pi runtime compatibility if compatibility null throw new illegal state exception class old internal platform null try old internal platform compatibility load class org eclipse core internal plugins internal platform non nls 1 method get plugin registry old internal platform get method get plugin registry null non nls 1 return i plugin registry get plugin registry invoke old internal platform null catch exception e ignore the exceptions return null return null ipluginregistry ipluginregistry ipluginregistry ipluginregistry getpluginregistry internalplatform getdefault getbundle compatibilityhelper pi_runtime_compatibility illegalstateexception oldinternalplatform oldinternalplatform loadclass internalplatform getpluginregistry oldinternalplatform getmethod getpluginregistry ipluginregistry getpluginregistry oldinternalplatform returns the location in the local file system of the plug in state area for the given plug in the platform must be running p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings p param plugin the plug in whose state location is returned return a local file system path public static i path get plugin state location plugin plugin return plugin get state location ipath getpluginstatelocation getstatelocation returns the protection space realm for the specified resource or code null code if the realm is unknown param resource url the url of the resource whose protection space is returned for example http www example com folder return the protection space realm for the specified resource or code null code if the realm is unknown public static string get protection space url resource url return internal platform get default get protection space resource url resourceurl getprotectionspace resourceurl internalplatform getdefault getprotectionspace resourceurl removes the indicated identical log listener from the notification list of the platform if no such listener exists no action is taken param listener the listener to de register see i log remove log listener i log listener see add log listener i log listener public static void remove log listener i log listener listener internal platform get default remove log listener listener ilog removeloglistener iloglistener addloglistener iloglistener removeloglistener iloglistener internalplatform getdefault removeloglistener returns a url which is the resolved equivalent of the supplied url this method is expected to be used with the plug in relative ur ls returned by i plugin descriptor bundle get entry and platform find p if the specified url is not a plug in relative url it is returned as is if the specified url is a plug in relative url this method attempts to reduce the given url to one which is native to the java class library eg file http etc p p note however that users of this api should not assume too much about the results of this method while it may consistently return a file url in certain installation configurations others may result in jar or http ur ls p param url original plug in relative url return the resolved url exception io exception if unable to resolve url see as localurl url see find bundle i path see bundle get entry string public static url resolve url url throws io exception return internal platform get default resolve url urls iplugindescriptor getentry urls ioexception aslocalurl ipath getentry ioexception internalplatform getdefault runs the given runnable in a protected mode exceptions thrown in the runnable are logged and passed to the runnable s exception handler such exceptions are not rethrown by this method param runnable the runnable to run public static void run i safe runnable runnable internal platform get default run runnable isaferunnable internalplatform getdefault returns the platform job manager return the platform s job manager since 3 0 public static i job manager get job manager return internal platform get default get job manager ijobmanager getjobmanager internalplatform getdefault getjobmanager returns the extension registry for this platform return the extension registry see i extension registry since 3 0 public static i extension registry get extension registry return internal platform get default get registry iextensionregistry iextensionregistry getextensionregistry internalplatform getdefault getregistry returns a url for the given path in the given bundle returns code null code if the url could not be computed or created param bundle the bundle in which to search param path path relative to plug in installation location return a url for the given path or code null code the actual form of the returned url is not specified see find bundle i path map see resolve url see as localurl url since 3 0 public static url find bundle bundle i path path return find support find bundle path null ipath aslocalurl ipath findsupport returns a url for the given path in the given bundle returns code null code if the url could not be computed or created p find looks for this path in given bundle and any attached fragments code null code is returned if no such entry is found note that there is no specific order to the fragments p p the following arguments may also be used pre nl for language specific information os for operating system specific information ws for windowing system specific information pre p p a path of nl about properties in an environment with a default locale of en ca will return a url corresponding to the first place about properties is found according to the following order pre plugin root nl en ca about properties fragment1 root nl en ca about properties fragment2 root nl en ca about properties plugin root nl en about properties fragment1 root nl en about properties fragment2 root nl en about properties plugin root about properties fragment1 root about properties fragment2 root about properties pre p p the current environment variable values can be overridden using the override map argument p param bundle the bundle in which to search param path file path relative to plug in installation location param override map of override substitution arguments to be used for any arg path elements the map keys correspond to the substitution arguments eg nl or os the resulting values must be of type java lang string if the map is code null code or does not contain the required substitution argument the default is used return a url for the given path or code null code the actual form of the returned url is not specified see resolve url see as localurl url since 3 0 public static url find bundle bundle i path path map override return find support find bundle path override en_ca aslocalurl ipath findsupport returns the location in the local file system of the plug in state area for the given bundle if the plug in state area did not exist prior to this call it is created p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings and other configuration parameters p param bundle the bundle whose state location if returned return a local file system path since 3 0 public static i path get state location bundle bundle return internal platform get default get state location bundle ipath getstatelocation internalplatform getdefault getstatelocation returns a number that changes whenever the set of installed plug ins changes this can be used for invalidating caches that are based on the set of currently installed plug ins e g extensions return a number related to the set of installed plug ins since 3 1 public static long get state stamp return internal platform get default get state time stamp getstatestamp internalplatform getdefault getstatetimestamp returns the log for the given bundle if no such log exists one is created param bundle the bundle whose log is returned return the log for the given bundle since 3 0 public static i log get log bundle bundle return internal platform get default get log bundle ilog getlog internalplatform getdefault getlog returns the given bundle s resource bundle for the current locale p this resource bundle is typically stored as the plugin properties file in the plug in itself and contains any translatable strings used in the plug in manifest file plugin xml p p this mechanism is intended only for externalizing strings found in the plug in manifest file using this method for externalizing strings in your code may result in degraded memory performance p param bundle the bundle whose resource bundle is being queried return the resource bundle exception missing resource exception if the resource bundle was not found since 3 0 public static resource bundle get resource bundle bundle bundle throws missing resource exception return internal platform get default get resource bundle bundle missingresourceexception resourcebundle getresourcebundle missingresourceexception internalplatform getdefault getresourcebundle returns a resource string corresponding to the given argument value if the argument value specifies a resource key the string is looked up in the default resource bundle for the given runtime bundle if the argument does not specify a valid key the argument itself is returned as the resource string the key lookup is performed in the file referenced in the bundle localization header of the bundle manifest if a resource string corresponding to the key is not found in the resource bundle the key value or any default text following the key in the argument value is returned as the resource string a key is identified as a string beginning with the character note that the character is stripped off prior to lookup in the resource bundle p equivalent to code get resource string bundle value get resource bundle code p param bundle the bundle whose resource bundle is being queried param value the value to look for return the resource string see get resource bundle bundle since 3 0 public static string get resource string bundle bundle string value return internal platform get default get resource string bundle value getresourcestring getresourcebundle getresourcebundle getresourcestring internalplatform getdefault getresourcestring returns a resource string corresponding to the given argument value and resource bundle in the given runtime bundle if the argument value specifies a resource key the string is looked up in the given resource bundle if the argument does not specify a valid key the argument itself is returned as the resource string the key lookup is performed against the specified resource bundle if a resource string corresponding to the key is not found in the resource bundle the key value or any default text following the key in the argument value is returned as the resource string a key is identified as a string beginning with the character note that the character is stripped off prior to lookup in the resource bundle p for example assume resource bundle plugin properties contains name project name pre get resource string hello world returns hello world li get resource string name returns project name li get resource string name hello world returns project name li get resource string abcd hello world returns hello world li get resource string abcd returns abcd li get resource string name returns name li pre p param bundle the bundle whose resource bundle is being queried param value the value param resource bundle the resource bundle to query return the resource string see get resource bundle bundle since 3 0 public static string get resource string bundle bundle string value resource bundle resource bundle return internal platform get default get resource string bundle value resource bundle getresourcestring getresourcestring getresourcestring getresourcestring getresourcestring getresourcestring resourcebundle getresourcebundle getresourcestring resourcebundle resourcebundle internalplatform getdefault getresourcestring resourcebundle returns the string name of the current system architecture the value is a user defined string if the architecture is specified on the command line otherwise it is the value returned by code java lang system get property os arch code return the string name of the current system architecture since 3 0 public static string getos arch return internal platform get default getos arch getproperty getosarch internalplatform getdefault getosarch returns the string name of the current locale for use in finding files whose path starts with code nl code return the string name of the current locale since 3 0 public static string getnl return internal platform get default getnl internalplatform getdefault returns the string name of the current operating system for use in finding files whose path starts with code os code code os unknown code is returned if the operating system cannot be determined the value may indicate one of the operating systems known to the platform as specified in code knownos values code or a user defined string if the operating system name is specified on the command line return the string name of the current operating system since 3 0 public static string getos return internal platform get default getos os_unknown knownosvalues internalplatform getdefault returns the string name of the current window system for use in finding files whose path starts with code ws code code null code is returned if the window system cannot be determined return the string name of the current window system or code null code since 3 0 public static string getws return internal platform get default getws internalplatform getdefault returns the arguments not consumed by the framework implementation itself which arguments are consumed is implementation specific these arguments are available for use by the application return the array of command line arguments not consumed by the framework since 3 0 public static string get application args return internal platform get default get application args getapplicationargs internalplatform getdefault getapplicationargs returns the platform administrator for this running eclipse p note this is an internal method and em must not em be used by clients which are not part of the eclipse platform this method allows access to classes which are not eclipse platform api but are part of the os gi runtime that the eclipse platform is built on even as the eclipse platform evolves in compatible ways from release to release the details of the os gi implementation might not p return the platform admin for this instance of eclipse since 3 0 public static platform admin get platform admin return internal platform get default get platform admin osgi osgi platformadmin getplatformadmin internalplatform getdefault getplatformadmin returns the location of the platform s working directory also known as the instance data area code null code is returned if the platform is running without an instance location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi instance area p return the location of the platform s instance data area or code null code if none since 3 0 public static location get instance location return internal platform get default get instance location getinstancelocation internalplatform getdefault getinstancelocation returns the currently registered bundle group providers return the currently registered bundle group providers since 3 0 public static i bundle group provider get bundle group providers return internal platform get default get bundle group providers ibundlegroupprovider getbundlegroupproviders internalplatform getdefault getbundlegroupproviders return the interface into the preference mechanism the returned object can be used for such operations as searching for preference values across multiple scopes and preference import export return an object to interface into the preference mechanism since 3 0 public static i preferences service get preferences service return internal platform get default get preferences service ipreferencesservice getpreferencesservice internalplatform getdefault getpreferencesservice returns the product which was selected when running this eclipse instance or code null code if none return the current product or code null code if none since 3 0 public static i product get product return internal platform get default get product iproduct getproduct internalplatform getdefault getproduct registers the given bundle group provider with the platform param provider a provider to register since 3 0 public static void register bundle group provider i bundle group provider provider internal platform get default register bundle group provider provider registerbundlegroupprovider ibundlegroupprovider internalplatform getdefault registerbundlegroupprovider de registers the given bundle group provider with the platform param provider a provider to de register since 3 0 public static void unregister bundle group provider i bundle group provider provider internal platform get default unregister bundle group provider provider unregisterbundlegroupprovider ibundlegroupprovider internalplatform getdefault unregisterbundlegroupprovider returns the location of the configuration information used to run this instance of eclipse the configuration area typically contains the list of plug ins available for use various settings those shared across different instances of the same configuration and any other such data needed by plug ins code null code is returned if the platform is running without a configuration location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi configuration area p return the location of the platform s configuration data area or code null code if none since 3 0 public static location get configuration location return internal platform get default get configuration location getconfigurationlocation internalplatform getdefault getconfigurationlocation returns the location of the platform s user data area the user data area is a location on the system which is specific to the system s current user by default it is located relative to the location given by the system property user home code null code is returned if the platform is running without an user location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi user area p return the location of the platform s user data area or code null code if none since 3 0 public static location get user location return internal platform get default get user location getuserlocation internalplatform getdefault getuserlocation returns the location of the base installation for the running platform code null code is returned if the platform is running without a configuration location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi install area p return the location of the platform s installation area or code null code if none since 3 0 public static location get install location return internal platform get default get install location getinstalllocation internalplatform getdefault getinstalllocation checks if the specified bundle is a fragment bundle param bundle the bundle to query return true if the specified bundle is a fragment bundle otherwise false is returned since 3 0 public static boolean is fragment bundle bundle return internal platform get default is fragment bundle isfragment internalplatform getdefault isfragment returns an array of attached fragment bundles for the specified bundle if the specified bundle is a fragment then tt null tt is returned if no fragments are attached to the specified bundle then tt null tt is returned param bundle the bundle to get the attached fragment bundles for return an array of fragment bundles or tt null tt if the bundle does not have any attached fragment bundles since 3 0 public static bundle get fragments bundle bundle return internal platform get default get fragments bundle getfragments internalplatform getdefault getfragments returns the resolved bundle with the specified symbolic name that has the highest version if no resolved bundles are installed that have the specified symbolic name then null is returned param symbolic name the symbolic name of the bundle to be returned return the bundle that has the specified symbolic name with the highest version or tt null tt if no bundle is found since 3 0 public static bundle get bundle string symbolic name return internal platform get default get bundle symbolic name symbolicname getbundle symbolicname internalplatform getdefault getbundle symbolicname returns all bundles with the specified symbolic name if no resolved bundles with the specified symbolic name can be found tt null tt is returned if the version argument is not null then only the bundles that have the specified symbolic name and a version greater than or equal to the specified version are returned the returned bundles are ordered in descending bundle version order param symbolic name the symbolic name of the bundles that are to be returned param version the version that the return bundle versions must match or tt null tt if no version matching is to be done return the array of bundles with the specified name that match the specified version and match rule or tt null tt if no bundles are found public static bundle get bundles string symbolic name string version return internal platform get default get bundles symbolic name version symbolicname getbundles symbolicname internalplatform getdefault getbundles symbolicname returns an array of host bundles that the specified fragment bundle is attached to or tt null tt if the specified bundle is not attached to a host if the bundle is not a fragment bundle then tt null tt is returned param bundle the bundle to get the host bundles for return an array of host bundles or null if the bundle does not have any host bundles since 3 0 public static bundle get hosts bundle bundle return internal platform get default get hosts bundle gethosts internalplatform getdefault gethosts returns whether the platform is running return code true code if the platform is running and code false code otherwise since 3 0 public static boolean is running return internal platform get default is running isrunning internalplatform getdefault isrunning returns a list of known system architectures p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getos arch code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of system architectures known to the system see getos arch since 3 0 public static string knownos arch values return internal platform get default knownos arch values getosarch getosarch knownosarchvalues internalplatform getdefault knownosarchvalues returns a list of known operating system names p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getos code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of operating systems known to the system see getos since 3 0 public static string knownos values return internal platform get default knownos values knownosvalues internalplatform getdefault knownosvalues returns a map of known platform line separators the keys are translated names of platforms and the values are their associated line separator strings return a map of platform to their line separator string since 3 1 public static map known platform line separators map result new hash map result put line separator key mac os 9 line separator value cr result put line separator key unix line separator value lf result put line separator key windows line separator value crlf return result knownplatformlineseparators hashmap line_separator_key_mac_os_9 line_separator_value_cr line_separator_key_unix line_separator_value_lf line_separator_key_windows line_separator_value_crlf returns a list of known windowing system names p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getws code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of window systems known to the system see getws since 3 0 public static string knownws values return internal platform get default knownws values knownwsvalues internalplatform getdefault knownwsvalues returns code true code if the platform is currently running in debug mode the platform is typically put in debug mode using the debug command line argument return whether or not the platform is running in debug mode since 3 0 public static boolean in debug mode return system get property osgi debug null non nls 1 indebugmode getproperty returns code true code if the platform is currently running in development mode that is if special procedures are to be taken when defining plug in class paths the platform is typically put in development mode using the dev command line argument return whether or not the platform is running in development mode since 3 0 public static boolean in development mode return system get property osgi dev null non nls 1 indevelopmentmode getproperty private constructor to block instance creation private platform super adds the given authorization information to the key ring the information is relevant for the specified protection space and the given authorization scheme the protection space is defined by the combination of the given server url and realm the authorization scheme determines what the authorization information contains and how it should be used the authorization information is a code map code of code string code to code string code and typically contains information such as user names and passwords param server url the url identifying the server for this authorization information for example http www example com param realm the subsection of the given server to which this authorization information applies for example realm1 example com or for no realm param auth scheme the scheme for which this authorization information applies for example basic or for no authorization scheme param info a code map code containing authorization information such as user names and passwords key type code string code value type code string code exception core exception if there are problems setting the authorization information reasons include ul li the keyring could not be saved li ul public static void add authorization info url server url string realm string auth scheme map info throws core exception internal platform get default add authorization info server url realm auth scheme info serverurl authscheme coreexception addauthorizationinfo serverurl authscheme coreexception internalplatform getdefault addauthorizationinfo serverurl authscheme adds the given log listener to the notification list of the platform p once registered a listener starts receiving notification as entries are added to plug in logs via code i log log code the listener continues to receive notifications until it is replaced or removed p param listener the listener to register see i log add log listener i log listener see remove log listener i log listener public static void add log listener i log listener listener internal platform get default add log listener listener ilog ilog addloglistener iloglistener removeloglistener iloglistener addloglistener iloglistener internalplatform getdefault addloglistener adds the specified resource to the protection space specified by the given realm all targets at or deeper than the depth of the last symbolic element in the path of the given resource url are assumed to be in the same protection space param resource url the url identifying the resources to be added to the specified protection space for example http www example com folder param realm the name of the protection space for example realm1 example com exception core exception if there are problems setting the authorization information reasons include ul li the key ring could not be saved li ul public static void add protection space url resource url string realm throws core exception internal platform get default add protection space resource url realm resourceurl coreexception addprotectionspace resourceurl coreexception internalplatform getdefault addprotectionspace resourceurl returns a url that is the local equivalent of the supplied url this method is expected to be used with the plug in relative ur ls returned by i plugin descriptor bundle get entry and platform find if the specified url is not a plug in relative url it is returned as is if the specified url is a plug in relative url of a file including jar archive it is returned as a locally accessible url using file protocol extracting caching the file locally if required if the specified url is a plug in relative url of a directory the directory and any files and directories under it are made locally accessible likewise if param url original plug in relative url return the resolved url exception io exception if unable to resolve url see resolve url see find bundle i path see bundle get entry string public static url as localurl url url throws io exception return internal platform get default as localurl url urls iplugindescriptor getentry ioexception ipath getentry aslocalurl ioexception internalplatform getdefault aslocalurl takes down the splash screen if one was put up public static void end splash internal platform get default end splash endsplash internalplatform getdefault endsplash removes the authorization information for the specified protection space and given authorization scheme the protection space is defined by the given server url and realm param server url the url identifying the server to remove the authorization information for for example http www example com param realm the subsection of the given server to remove the authorization information for for example realm1 example com or for no realm param auth scheme the scheme for which the authorization information to remove applies for example basic or for no authorization scheme exception core exception if there are problems removing the authorization information reasons include ul li the keyring could not be saved li ul public static void flush authorization info url server url string realm string auth scheme throws core exception internal platform get default flush authorization info server url realm auth scheme serverurl authscheme coreexception flushauthorizationinfo serverurl authscheme coreexception internalplatform getdefault flushauthorizationinfo serverurl authscheme returns the adapter manager used for extending code i adaptable code objects return the adapter manager for this platform see i adapter manager public static i adapter manager get adapter manager return internal platform get default get adapter manager iadaptable iadaptermanager iadaptermanager getadaptermanager internalplatform getdefault getadaptermanager returns the authorization information for the specified protection space and given authorization scheme the protection space is defined by the given server url and realm returns code null code if no such information exists param server url the url identifying the server for the authorization information for example http www example com param realm the subsection of the given server to which the authorization information applies for example realm1 example com or for no realm param auth scheme the scheme for which the authorization information applies for example basic or for no authorization scheme return the authorization information for the specified protection space and given authorization scheme or code null code if no such information exists public static map get authorization info url server url string realm string auth scheme return internal platform get default get authorization info server url realm auth scheme serverurl authscheme getauthorizationinfo serverurl authscheme internalplatform getdefault getauthorizationinfo serverurl authscheme returns the command line args provided to the eclipse runtime layer when it was first run the returned value does not include arguments consumed by the lower levels of eclipse e g os gi or the launcher note that individual platform runnables may be provided with different arguments if they are being run individually rather than with code platform run code return the command line used to start the platform public static string get command line args return internal platform get default get command line args osgi getcommandlineargs internalplatform getdefault getcommandlineargs returns the content type manager return the content type manager since 3 0 public static i content type manager get content type manager return internal platform get default get content type manager icontenttypemanager getcontenttypemanager internalplatform getdefault getcontenttypemanager returns the identified option code null code is returned if no such option is found options are specified in the general form i lt plug in id gt lt option path gt i for example code org eclipse core runtime debug code param option the name of the option to lookup return the value of the requested debug option or code null code public static string get debug option string option return internal platform get default get option option getdebugoption internalplatform getdefault getoption returns the location of the platform working directory p callers of this method should consider using code get instance location code instead in various typically non ide related configurations of eclipse the platform working directory may not be on the local file system as such the more general form of this location is as a url p return the location of the platform see get instance location public static i path get location throws illegal state exception return internal platform get default get location getinstancelocation getinstancelocation ipath getlocation illegalstateexception internalplatform getdefault getlocation returns the location of the platform log file this file may contain information about errors that have previously occurred during this invocation of the platform p it is recommended not to keep this value as the log location may vary when an instance location is being set p p note it is very important that users of this method do not leave the log file open for extended periods of time doing so may prevent others from writing to the log file which could result in important error messages being lost it is strongly recommended that clients wanting to read the log file for extended periods should copy the log file contents elsewhere and immediately close the original file p return the path of the log file on disk public static i path get log file location return internal platform get default get meta area get log location ipath getlogfilelocation internalplatform getdefault getmetaarea getloglocation returns the plug in runtime object for the identified plug in or code null code if no such plug in can be found if the plug in is defined but not yet activated the plug in will be activated before being returned p b note b this method is only able to find and return plug in objects for plug ins described using plugin xml according to the traditional eclipse conventions eclipse 3 0 permits plug ins to be described in manifest mf files and to define their own bundle activators such plug ins cannot be discovered by this method p param id the unique identifier of the desired plug in e g code com example acme code return the plug in runtime object or code null code deprecated this method only works if the compatibility layer is installed and must not be used otherwise see the comments on link i plugin descriptor get plugin for details public static plugin get plugin string id try i plugin registry registry get plugin registry if registry null throw new illegal state exception i plugin descriptor pd registry get plugin descriptor id if pd null return null return pd get plugin catch core exception e todo log the exception return null iplugindescriptor getplugin getplugin ipluginregistry getpluginregistry illegalstateexception iplugindescriptor getplugindescriptor getplugin coreexception returns the plug in registry for this platform return the plug in registry see i plugin registry deprecated code i plugin registry code was refactored in eclipse 3 0 this method only works if the compatibility layer is installed and must not be used otherwise see the comments on link i plugin registry and its methods for details public static i plugin registry get plugin registry bundle compatibility internal platform get default get bundle compatibility helper pi runtime compatibility if compatibility null throw new illegal state exception class old internal platform null try old internal platform compatibility load class org eclipse core internal plugins internal platform non nls 1 method get plugin registry old internal platform get method get plugin registry null non nls 1 return i plugin registry get plugin registry invoke old internal platform null catch exception e ignore the exceptions return null return null ipluginregistry ipluginregistry ipluginregistry ipluginregistry getpluginregistry internalplatform getdefault getbundle compatibilityhelper pi_runtime_compatibility illegalstateexception oldinternalplatform oldinternalplatform loadclass internalplatform getpluginregistry oldinternalplatform getmethod getpluginregistry ipluginregistry getpluginregistry oldinternalplatform returns the location in the local file system of the plug in state area for the given plug in the platform must be running p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings p param plugin the plug in whose state location is returned return a local file system path public static i path get plugin state location plugin plugin return plugin get state location ipath getpluginstatelocation getstatelocation returns the protection space realm for the specified resource or code null code if the realm is unknown param resource url the url of the resource whose protection space is returned for example http www example com folder return the protection space realm for the specified resource or code null code if the realm is unknown public static string get protection space url resource url return internal platform get default get protection space resource url resourceurl getprotectionspace resourceurl internalplatform getdefault getprotectionspace resourceurl removes the indicated identical log listener from the notification list of the platform if no such listener exists no action is taken param listener the listener to de register see i log remove log listener i log listener see add log listener i log listener public static void remove log listener i log listener listener internal platform get default remove log listener listener ilog removeloglistener iloglistener addloglistener iloglistener removeloglistener iloglistener internalplatform getdefault removeloglistener returns a url which is the resolved equivalent of the supplied url this method is expected to be used with the plug in relative ur ls returned by i plugin descriptor bundle get entry and platform find p if the specified url is not a plug in relative url it is returned as is if the specified url is a plug in relative url this method attempts to reduce the given url to one which is native to the java class library eg file http etc p p note however that users of this api should not assume too much about the results of this method while it may consistently return a file url in certain installation configurations others may result in jar or http ur ls p param url original plug in relative url return the resolved url exception io exception if unable to resolve url see as localurl url see find bundle i path see bundle get entry string public static url resolve url url throws io exception return internal platform get default resolve url urls iplugindescriptor getentry urls ioexception aslocalurl ipath getentry ioexception internalplatform getdefault runs the given runnable in a protected mode exceptions thrown in the runnable are logged and passed to the runnable s exception handler such exceptions are not rethrown by this method param runnable the runnable to run public static void run i safe runnable runnable internal platform get default run runnable isaferunnable internalplatform getdefault returns the platform job manager return the platform s job manager since 3 0 public static i job manager get job manager return internal platform get default get job manager ijobmanager getjobmanager internalplatform getdefault getjobmanager returns the extension registry for this platform return the extension registry see i extension registry since 3 0 public static i extension registry get extension registry return internal platform get default get registry iextensionregistry iextensionregistry getextensionregistry internalplatform getdefault getregistry returns a url for the given path in the given bundle returns code null code if the url could not be computed or created param bundle the bundle in which to search param path path relative to plug in installation location return a url for the given path or code null code the actual form of the returned url is not specified see find bundle i path map see resolve url see as localurl url since 3 0 public static url find bundle bundle i path path return find support find bundle path null ipath aslocalurl ipath findsupport returns a url for the given path in the given bundle returns code null code if the url could not be computed or created p find looks for this path in given bundle and any attached fragments code null code is returned if no such entry is found note that there is no specific order to the fragments p p the following arguments may also be used pre nl for language specific information os for operating system specific information ws for windowing system specific information pre p p a path of nl about properties in an environment with a default locale of en ca will return a url corresponding to the first place about properties is found according to the following order pre plugin root nl en ca about properties fragment1 root nl en ca about properties fragment2 root nl en ca about properties plugin root nl en about properties fragment1 root nl en about properties fragment2 root nl en about properties plugin root about properties fragment1 root about properties fragment2 root about properties pre p p the current environment variable values can be overridden using the override map argument p param bundle the bundle in which to search param path file path relative to plug in installation location param override map of override substitution arguments to be used for any arg path elements the map keys correspond to the substitution arguments eg nl or os the resulting values must be of type java lang string if the map is code null code or does not contain the required substitution argument the default is used return a url for the given path or code null code the actual form of the returned url is not specified see resolve url see as localurl url since 3 0 public static url find bundle bundle i path path map override return find support find bundle path override en_ca aslocalurl ipath findsupport returns the location in the local file system of the plug in state area for the given bundle if the plug in state area did not exist prior to this call it is created p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings and other configuration parameters p param bundle the bundle whose state location if returned return a local file system path since 3 0 public static i path get state location bundle bundle return internal platform get default get state location bundle ipath getstatelocation internalplatform getdefault getstatelocation returns a number that changes whenever the set of installed plug ins changes this can be used for invalidating caches that are based on the set of currently installed plug ins e g extensions return a number related to the set of installed plug ins since 3 1 public static long get state stamp return internal platform get default get state time stamp getstatestamp internalplatform getdefault getstatetimestamp returns the log for the given bundle if no such log exists one is created param bundle the bundle whose log is returned return the log for the given bundle since 3 0 public static i log get log bundle bundle return internal platform get default get log bundle ilog getlog internalplatform getdefault getlog returns the given bundle s resource bundle for the current locale p this resource bundle is typically stored as the plugin properties file in the plug in itself and contains any translatable strings used in the plug in manifest file plugin xml p p this mechanism is intended only for externalizing strings found in the plug in manifest file using this method for externalizing strings in your code may result in degraded memory performance p param bundle the bundle whose resource bundle is being queried return the resource bundle exception missing resource exception if the resource bundle was not found since 3 0 public static resource bundle get resource bundle bundle bundle throws missing resource exception return internal platform get default get resource bundle bundle missingresourceexception resourcebundle getresourcebundle missingresourceexception internalplatform getdefault getresourcebundle returns a resource string corresponding to the given argument value if the argument value specifies a resource key the string is looked up in the default resource bundle for the given runtime bundle if the argument does not specify a valid key the argument itself is returned as the resource string the key lookup is performed in the file referenced in the bundle localization header of the bundle manifest if a resource string corresponding to the key is not found in the resource bundle the key value or any default text following the key in the argument value is returned as the resource string a key is identified as a string beginning with the character note that the character is stripped off prior to lookup in the resource bundle p equivalent to code get resource string bundle value get resource bundle code p param bundle the bundle whose resource bundle is being queried param value the value to look for return the resource string see get resource bundle bundle since 3 0 public static string get resource string bundle bundle string value return internal platform get default get resource string bundle value getresourcestring getresourcebundle getresourcebundle getresourcestring internalplatform getdefault getresourcestring returns a resource string corresponding to the given argument value and resource bundle in the given runtime bundle if the argument value specifies a resource key the string is looked up in the given resource bundle if the argument does not specify a valid key the argument itself is returned as the resource string the key lookup is performed against the specified resource bundle if a resource string corresponding to the key is not found in the resource bundle the key value or any default text following the key in the argument value is returned as the resource string a key is identified as a string beginning with the character note that the character is stripped off prior to lookup in the resource bundle p for example assume resource bundle plugin properties contains name project name pre get resource string hello world returns hello world li get resource string name returns project name li get resource string name hello world returns project name li get resource string abcd hello world returns hello world li get resource string abcd returns abcd li get resource string name returns name li pre p param bundle the bundle whose resource bundle is being queried param value the value param resource bundle the resource bundle to query return the resource string see get resource bundle bundle since 3 0 public static string get resource string bundle bundle string value resource bundle resource bundle return internal platform get default get resource string bundle value resource bundle getresourcestring getresourcestring getresourcestring getresourcestring getresourcestring getresourcestring resourcebundle getresourcebundle getresourcestring resourcebundle resourcebundle internalplatform getdefault getresourcestring resourcebundle returns the string name of the current system architecture the value is a user defined string if the architecture is specified on the command line otherwise it is the value returned by code java lang system get property os arch code return the string name of the current system architecture since 3 0 public static string getos arch return internal platform get default getos arch getproperty getosarch internalplatform getdefault getosarch returns the string name of the current locale for use in finding files whose path starts with code nl code return the string name of the current locale since 3 0 public static string getnl return internal platform get default getnl internalplatform getdefault returns the string name of the current operating system for use in finding files whose path starts with code os code code os unknown code is returned if the operating system cannot be determined the value may indicate one of the operating systems known to the platform as specified in code knownos values code or a user defined string if the operating system name is specified on the command line return the string name of the current operating system since 3 0 public static string getos return internal platform get default getos os_unknown knownosvalues internalplatform getdefault returns the string name of the current window system for use in finding files whose path starts with code ws code code null code is returned if the window system cannot be determined return the string name of the current window system or code null code since 3 0 public static string getws return internal platform get default getws internalplatform getdefault returns the arguments not consumed by the framework implementation itself which arguments are consumed is implementation specific these arguments are available for use by the application return the array of command line arguments not consumed by the framework since 3 0 public static string get application args return internal platform get default get application args getapplicationargs internalplatform getdefault getapplicationargs returns the platform administrator for this running eclipse p note this is an internal method and em must not em be used by clients which are not part of the eclipse platform this method allows access to classes which are not eclipse platform api but are part of the os gi runtime that the eclipse platform is built on even as the eclipse platform evolves in compatible ways from release to release the details of the os gi implementation might not p return the platform admin for this instance of eclipse since 3 0 public static platform admin get platform admin return internal platform get default get platform admin osgi osgi platformadmin getplatformadmin internalplatform getdefault getplatformadmin returns the location of the platform s working directory also known as the instance data area code null code is returned if the platform is running without an instance location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi instance area p return the location of the platform s instance data area or code null code if none since 3 0 public static location get instance location return internal platform get default get instance location getinstancelocation internalplatform getdefault getinstancelocation returns the currently registered bundle group providers return the currently registered bundle group providers since 3 0 public static i bundle group provider get bundle group providers return internal platform get default get bundle group providers ibundlegroupprovider getbundlegroupproviders internalplatform getdefault getbundlegroupproviders return the interface into the preference mechanism the returned object can be used for such operations as searching for preference values across multiple scopes and preference import export return an object to interface into the preference mechanism since 3 0 public static i preferences service get preferences service return internal platform get default get preferences service ipreferencesservice getpreferencesservice internalplatform getdefault getpreferencesservice returns the product which was selected when running this eclipse instance or code null code if none return the current product or code null code if none since 3 0 public static i product get product return internal platform get default get product iproduct getproduct internalplatform getdefault getproduct registers the given bundle group provider with the platform param provider a provider to register since 3 0 public static void register bundle group provider i bundle group provider provider internal platform get default register bundle group provider provider registerbundlegroupprovider ibundlegroupprovider internalplatform getdefault registerbundlegroupprovider de registers the given bundle group provider with the platform param provider a provider to de register since 3 0 public static void unregister bundle group provider i bundle group provider provider internal platform get default unregister bundle group provider provider unregisterbundlegroupprovider ibundlegroupprovider internalplatform getdefault unregisterbundlegroupprovider returns the location of the configuration information used to run this instance of eclipse the configuration area typically contains the list of plug ins available for use various settings those shared across different instances of the same configuration and any other such data needed by plug ins code null code is returned if the platform is running without a configuration location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi configuration area p return the location of the platform s configuration data area or code null code if none since 3 0 public static location get configuration location return internal platform get default get configuration location getconfigurationlocation internalplatform getdefault getconfigurationlocation returns the location of the platform s user data area the user data area is a location on the system which is specific to the system s current user by default it is located relative to the location given by the system property user home code null code is returned if the platform is running without an user location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi user area p return the location of the platform s user data area or code null code if none since 3 0 public static location get user location return internal platform get default get user location getuserlocation internalplatform getdefault getuserlocation returns the location of the base installation for the running platform code null code is returned if the platform is running without a configuration location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi install area p return the location of the platform s installation area or code null code if none since 3 0 public static location get install location return internal platform get default get install location getinstalllocation internalplatform getdefault getinstalllocation checks if the specified bundle is a fragment bundle param bundle the bundle to query return true if the specified bundle is a fragment bundle otherwise false is returned since 3 0 public static boolean is fragment bundle bundle return internal platform get default is fragment bundle isfragment internalplatform getdefault isfragment returns an array of attached fragment bundles for the specified bundle if the specified bundle is a fragment then tt null tt is returned if no fragments are attached to the specified bundle then tt null tt is returned param bundle the bundle to get the attached fragment bundles for return an array of fragment bundles or tt null tt if the bundle does not have any attached fragment bundles since 3 0 public static bundle get fragments bundle bundle return internal platform get default get fragments bundle getfragments internalplatform getdefault getfragments returns the resolved bundle with the specified symbolic name that has the highest version if no resolved bundles are installed that have the specified symbolic name then null is returned param symbolic name the symbolic name of the bundle to be returned return the bundle that has the specified symbolic name with the highest version or tt null tt if no bundle is found since 3 0 public static bundle get bundle string symbolic name return internal platform get default get bundle symbolic name symbolicname getbundle symbolicname internalplatform getdefault getbundle symbolicname returns all bundles with the specified symbolic name if no resolved bundles with the specified symbolic name can be found tt null tt is returned if the version argument is not null then only the bundles that have the specified symbolic name and a version greater than or equal to the specified version are returned the returned bundles are ordered in descending bundle version order param symbolic name the symbolic name of the bundles that are to be returned param version the version that the return bundle versions must match or tt null tt if no version matching is to be done return the array of bundles with the specified name that match the specified version and match rule or tt null tt if no bundles are found public static bundle get bundles string symbolic name string version return internal platform get default get bundles symbolic name version symbolicname getbundles symbolicname internalplatform getdefault getbundles symbolicname returns an array of host bundles that the specified fragment bundle is attached to or tt null tt if the specified bundle is not attached to a host if the bundle is not a fragment bundle then tt null tt is returned param bundle the bundle to get the host bundles for return an array of host bundles or null if the bundle does not have any host bundles since 3 0 public static bundle get hosts bundle bundle return internal platform get default get hosts bundle gethosts internalplatform getdefault gethosts returns whether the platform is running return code true code if the platform is running and code false code otherwise since 3 0 public static boolean is running return internal platform get default is running isrunning internalplatform getdefault isrunning returns a list of known system architectures p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getos arch code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of system architectures known to the system see getos arch since 3 0 public static string knownos arch values return internal platform get default knownos arch values getosarch getosarch knownosarchvalues internalplatform getdefault knownosarchvalues returns a list of known operating system names p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getos code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of operating systems known to the system see getos since 3 0 public static string knownos values return internal platform get default knownos values knownosvalues internalplatform getdefault knownosvalues returns a map of known platform line separators the keys are translated names of platforms and the values are their associated line separator strings return a map of platform to their line separator string since 3 1 public static map known platform line separators map result new hash map result put line separator key mac os 9 line separator value cr result put line separator key unix line separator value lf result put line separator key windows line separator value crlf return result knownplatformlineseparators hashmap line_separator_key_mac_os_9 line_separator_value_cr line_separator_key_unix line_separator_value_lf line_separator_key_windows line_separator_value_crlf returns a list of known windowing system names p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getws code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of window systems known to the system see getws since 3 0 public static string knownws values return internal platform get default knownws values knownwsvalues internalplatform getdefault knownwsvalues returns code true code if the platform is currently running in debug mode the platform is typically put in debug mode using the debug command line argument return whether or not the platform is running in debug mode since 3 0 public static boolean in debug mode return system get property osgi debug null non nls 1 indebugmode getproperty returns code true code if the platform is currently running in development mode that is if special procedures are to be taken when defining plug in class paths the platform is typically put in development mode using the dev command line argument return whether or not the platform is running in development mode since 3 0 public static boolean in development mode return system get property osgi dev null non nls 1 indevelopmentmode getproperty private constructor to block instance creation private platform super adds the given authorization information to the key ring the information is relevant for the specified protection space and the given authorization scheme the protection space is defined by the combination of the given server url and realm the authorization scheme determines what the authorization information contains and how it should be used the authorization information is a code map code of code string code to code string code and typically contains information such as user names and passwords param server url the url identifying the server for this authorization information for example http www example com param realm the subsection of the given server to which this authorization information applies for example realm1 example com or for no realm param auth scheme the scheme for which this authorization information applies for example basic or for no authorization scheme param info a code map code containing authorization information such as user names and passwords key type code string code value type code string code exception core exception if there are problems setting the authorization information reasons include ul li the keyring could not be saved li ul public static void add authorization info url server url string realm string auth scheme map info throws core exception internal platform get default add authorization info server url realm auth scheme info serverurl authscheme coreexception addauthorizationinfo serverurl authscheme coreexception internalplatform getdefault addauthorizationinfo serverurl authscheme adds the given log listener to the notification list of the platform p once registered a listener starts receiving notification as entries are added to plug in logs via code i log log code the listener continues to receive notifications until it is replaced or removed p param listener the listener to register see i log add log listener i log listener see remove log listener i log listener public static void add log listener i log listener listener internal platform get default add log listener listener ilog ilog addloglistener iloglistener removeloglistener iloglistener addloglistener iloglistener internalplatform getdefault addloglistener adds the specified resource to the protection space specified by the given realm all targets at or deeper than the depth of the last symbolic element in the path of the given resource url are assumed to be in the same protection space param resource url the url identifying the resources to be added to the specified protection space for example http www example com folder param realm the name of the protection space for example realm1 example com exception core exception if there are problems setting the authorization information reasons include ul li the key ring could not be saved li ul public static void add protection space url resource url string realm throws core exception internal platform get default add protection space resource url realm resourceurl coreexception addprotectionspace resourceurl coreexception internalplatform getdefault addprotectionspace resourceurl returns a url that is the local equivalent of the supplied url this method is expected to be used with the plug in relative ur ls returned by i plugin descriptor bundle get entry and platform find if the specified url is not a plug in relative url it is returned as is if the specified url is a plug in relative url of a file including jar archive it is returned as a locally accessible url using file protocol extracting caching the file locally if required if the specified url is a plug in relative url of a directory the directory and any files and directories under it are made locally accessible likewise if param url original plug in relative url return the resolved url exception io exception if unable to resolve url see resolve url see find bundle i path see bundle get entry string public static url as localurl url url throws io exception return internal platform get default as localurl url urls iplugindescriptor getentry ioexception ipath getentry aslocalurl ioexception internalplatform getdefault aslocalurl takes down the splash screen if one was put up public static void end splash internal platform get default end splash endsplash internalplatform getdefault endsplash removes the authorization information for the specified protection space and given authorization scheme the protection space is defined by the given server url and realm param server url the url identifying the server to remove the authorization information for for example http www example com param realm the subsection of the given server to remove the authorization information for for example realm1 example com or for no realm param auth scheme the scheme for which the authorization information to remove applies for example basic or for no authorization scheme exception core exception if there are problems removing the authorization information reasons include ul li the keyring could not be saved li ul public static void flush authorization info url server url string realm string auth scheme throws core exception internal platform get default flush authorization info server url realm auth scheme serverurl authscheme coreexception flushauthorizationinfo serverurl authscheme coreexception internalplatform getdefault flushauthorizationinfo serverurl authscheme returns the adapter manager used for extending code i adaptable code objects return the adapter manager for this platform see i adapter manager public static i adapter manager get adapter manager return internal platform get default get adapter manager iadaptable iadaptermanager iadaptermanager getadaptermanager internalplatform getdefault getadaptermanager returns the authorization information for the specified protection space and given authorization scheme the protection space is defined by the given server url and realm returns code null code if no such information exists param server url the url identifying the server for the authorization information for example http www example com param realm the subsection of the given server to which the authorization information applies for example realm1 example com or for no realm param auth scheme the scheme for which the authorization information applies for example basic or for no authorization scheme return the authorization information for the specified protection space and given authorization scheme or code null code if no such information exists public static map get authorization info url server url string realm string auth scheme return internal platform get default get authorization info server url realm auth scheme serverurl authscheme getauthorizationinfo serverurl authscheme internalplatform getdefault getauthorizationinfo serverurl authscheme returns the command line args provided to the eclipse runtime layer when it was first run the returned value does not include arguments consumed by the lower levels of eclipse e g os gi or the launcher note that individual platform runnables may be provided with different arguments if they are being run individually rather than with code platform run code return the command line used to start the platform public static string get command line args return internal platform get default get command line args osgi getcommandlineargs internalplatform getdefault getcommandlineargs returns the content type manager return the content type manager since 3 0 public static i content type manager get content type manager return internal platform get default get content type manager icontenttypemanager getcontenttypemanager internalplatform getdefault getcontenttypemanager returns the identified option code null code is returned if no such option is found options are specified in the general form i lt plug in id gt lt option path gt i for example code org eclipse core runtime debug code param option the name of the option to lookup return the value of the requested debug option or code null code public static string get debug option string option return internal platform get default get option option getdebugoption internalplatform getdefault getoption returns the location of the platform working directory p callers of this method should consider using code get instance location code instead in various typically non ide related configurations of eclipse the platform working directory may not be on the local file system as such the more general form of this location is as a url p return the location of the platform see get instance location public static i path get location throws illegal state exception return internal platform get default get location getinstancelocation getinstancelocation ipath getlocation illegalstateexception internalplatform getdefault getlocation returns the location of the platform log file this file may contain information about errors that have previously occurred during this invocation of the platform p it is recommended not to keep this value as the log location may vary when an instance location is being set p p note it is very important that users of this method do not leave the log file open for extended periods of time doing so may prevent others from writing to the log file which could result in important error messages being lost it is strongly recommended that clients wanting to read the log file for extended periods should copy the log file contents elsewhere and immediately close the original file p return the path of the log file on disk public static i path get log file location return internal platform get default get meta area get log location ipath getlogfilelocation internalplatform getdefault getmetaarea getloglocation returns the plug in runtime object for the identified plug in or code null code if no such plug in can be found if the plug in is defined but not yet activated the plug in will be activated before being returned p b note b this method is only able to find and return plug in objects for plug ins described using plugin xml according to the traditional eclipse conventions eclipse 3 0 permits plug ins to be described in manifest mf files and to define their own bundle activators such plug ins cannot be discovered by this method p param id the unique identifier of the desired plug in e g code com example acme code return the plug in runtime object or code null code deprecated this method only works if the compatibility layer is installed and must not be used otherwise see the comments on link i plugin descriptor get plugin for details public static plugin get plugin string id try i plugin registry registry get plugin registry if registry null throw new illegal state exception i plugin descriptor pd registry get plugin descriptor id if pd null return null return pd get plugin catch core exception e todo log the exception return null iplugindescriptor getplugin getplugin ipluginregistry getpluginregistry illegalstateexception iplugindescriptor getplugindescriptor getplugin coreexception returns the plug in registry for this platform return the plug in registry see i plugin registry deprecated code i plugin registry code was refactored in eclipse 3 0 this method only works if the compatibility layer is installed and must not be used otherwise see the comments on link i plugin registry and its methods for details public static i plugin registry get plugin registry bundle compatibility internal platform get default get bundle compatibility helper pi runtime compatibility if compatibility null throw new illegal state exception class old internal platform null try old internal platform compatibility load class org eclipse core internal plugins internal platform non nls 1 method get plugin registry old internal platform get method get plugin registry null non nls 1 return i plugin registry get plugin registry invoke old internal platform null catch exception e ignore the exceptions return null return null ipluginregistry ipluginregistry ipluginregistry ipluginregistry getpluginregistry internalplatform getdefault getbundle compatibilityhelper pi_runtime_compatibility illegalstateexception oldinternalplatform oldinternalplatform loadclass internalplatform getpluginregistry oldinternalplatform getmethod getpluginregistry ipluginregistry getpluginregistry oldinternalplatform returns the location in the local file system of the plug in state area for the given plug in the platform must be running p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings p param plugin the plug in whose state location is returned return a local file system path public static i path get plugin state location plugin plugin return plugin get state location ipath getpluginstatelocation getstatelocation returns the protection space realm for the specified resource or code null code if the realm is unknown param resource url the url of the resource whose protection space is returned for example http www example com folder return the protection space realm for the specified resource or code null code if the realm is unknown public static string get protection space url resource url return internal platform get default get protection space resource url resourceurl getprotectionspace resourceurl internalplatform getdefault getprotectionspace resourceurl removes the indicated identical log listener from the notification list of the platform if no such listener exists no action is taken param listener the listener to de register see i log remove log listener i log listener see add log listener i log listener public static void remove log listener i log listener listener internal platform get default remove log listener listener ilog removeloglistener iloglistener addloglistener iloglistener removeloglistener iloglistener internalplatform getdefault removeloglistener returns a url which is the resolved equivalent of the supplied url this method is expected to be used with the plug in relative ur ls returned by i plugin descriptor bundle get entry and platform find p if the specified url is not a plug in relative url it is returned as is if the specified url is a plug in relative url this method attempts to reduce the given url to one which is native to the java class library eg file http etc p p note however that users of this api should not assume too much about the results of this method while it may consistently return a file url in certain installation configurations others may result in jar or http ur ls p param url original plug in relative url return the resolved url exception io exception if unable to resolve url see as localurl url see find bundle i path see bundle get entry string public static url resolve url url throws io exception return internal platform get default resolve url urls iplugindescriptor getentry urls ioexception aslocalurl ipath getentry ioexception internalplatform getdefault runs the given runnable in a protected mode exceptions thrown in the runnable are logged and passed to the runnable s exception handler such exceptions are not rethrown by this method param runnable the runnable to run public static void run i safe runnable runnable internal platform get default run runnable isaferunnable internalplatform getdefault returns the platform job manager return the platform s job manager since 3 0 public static i job manager get job manager return internal platform get default get job manager ijobmanager getjobmanager internalplatform getdefault getjobmanager returns the extension registry for this platform return the extension registry see i extension registry since 3 0 public static i extension registry get extension registry return internal platform get default get registry iextensionregistry iextensionregistry getextensionregistry internalplatform getdefault getregistry returns a url for the given path in the given bundle returns code null code if the url could not be computed or created param bundle the bundle in which to search param path path relative to plug in installation location return a url for the given path or code null code the actual form of the returned url is not specified see find bundle i path map see resolve url see as localurl url since 3 0 public static url find bundle bundle i path path return find support find bundle path null ipath aslocalurl ipath findsupport returns a url for the given path in the given bundle returns code null code if the url could not be computed or created p find looks for this path in given bundle and any attached fragments code null code is returned if no such entry is found note that there is no specific order to the fragments p p the following arguments may also be used pre nl for language specific information os for operating system specific information ws for windowing system specific information pre p p a path of nl about properties in an environment with a default locale of en ca will return a url corresponding to the first place about properties is found according to the following order pre plugin root nl en ca about properties fragment1 root nl en ca about properties fragment2 root nl en ca about properties plugin root nl en about properties fragment1 root nl en about properties fragment2 root nl en about properties plugin root about properties fragment1 root about properties fragment2 root about properties pre p p the current environment variable values can be overridden using the override map argument p param bundle the bundle in which to search param path file path relative to plug in installation location param override map of override substitution arguments to be used for any arg path elements the map keys correspond to the substitution arguments eg nl or os the resulting values must be of type java lang string if the map is code null code or does not contain the required substitution argument the default is used return a url for the given path or code null code the actual form of the returned url is not specified see resolve url see as localurl url since 3 0 public static url find bundle bundle i path path map override return find support find bundle path override en_ca aslocalurl ipath findsupport returns the location in the local file system of the plug in state area for the given bundle if the plug in state area did not exist prior to this call it is created p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings and other configuration parameters p param bundle the bundle whose state location if returned return a local file system path since 3 0 public static i path get state location bundle bundle return internal platform get default get state location bundle ipath getstatelocation internalplatform getdefault getstatelocation returns a number that changes whenever the set of installed plug ins changes this can be used for invalidating caches that are based on the set of currently installed plug ins e g extensions return a number related to the set of installed plug ins since 3 1 public static long get state stamp return internal platform get default get state time stamp getstatestamp internalplatform getdefault getstatetimestamp returns the log for the given bundle if no such log exists one is created param bundle the bundle whose log is returned return the log for the given bundle since 3 0 public static i log get log bundle bundle return internal platform get default get log bundle ilog getlog internalplatform getdefault getlog returns the given bundle s resource bundle for the current locale p this resource bundle is typically stored as the plugin properties file in the plug in itself and contains any translatable strings used in the plug in manifest file plugin xml p p this mechanism is intended only for externalizing strings found in the plug in manifest file using this method for externalizing strings in your code may result in degraded memory performance p param bundle the bundle whose resource bundle is being queried return the resource bundle exception missing resource exception if the resource bundle was not found since 3 0 public static resource bundle get resource bundle bundle bundle throws missing resource exception return internal platform get default get resource bundle bundle missingresourceexception resourcebundle getresourcebundle missingresourceexception internalplatform getdefault getresourcebundle returns a resource string corresponding to the given argument value if the argument value specifies a resource key the string is looked up in the default resource bundle for the given runtime bundle if the argument does not specify a valid key the argument itself is returned as the resource string the key lookup is performed in the file referenced in the bundle localization header of the bundle manifest if a resource string corresponding to the key is not found in the resource bundle the key value or any default text following the key in the argument value is returned as the resource string a key is identified as a string beginning with the character note that the character is stripped off prior to lookup in the resource bundle p equivalent to code get resource string bundle value get resource bundle code p param bundle the bundle whose resource bundle is being queried param value the value to look for return the resource string see get resource bundle bundle since 3 0 public static string get resource string bundle bundle string value return internal platform get default get resource string bundle value getresourcestring getresourcebundle getresourcebundle getresourcestring internalplatform getdefault getresourcestring returns a resource string corresponding to the given argument value and resource bundle in the given runtime bundle if the argument value specifies a resource key the string is looked up in the given resource bundle if the argument does not specify a valid key the argument itself is returned as the resource string the key lookup is performed against the specified resource bundle if a resource string corresponding to the key is not found in the resource bundle the key value or any default text following the key in the argument value is returned as the resource string a key is identified as a string beginning with the character note that the character is stripped off prior to lookup in the resource bundle p for example assume resource bundle plugin properties contains name project name pre get resource string hello world returns hello world li get resource string name returns project name li get resource string name hello world returns project name li get resource string abcd hello world returns hello world li get resource string abcd returns abcd li get resource string name returns name li pre p param bundle the bundle whose resource bundle is being queried param value the value param resource bundle the resource bundle to query return the resource string see get resource bundle bundle since 3 0 public static string get resource string bundle bundle string value resource bundle resource bundle return internal platform get default get resource string bundle value resource bundle getresourcestring getresourcestring getresourcestring getresourcestring getresourcestring getresourcestring resourcebundle getresourcebundle getresourcestring resourcebundle resourcebundle internalplatform getdefault getresourcestring resourcebundle returns the string name of the current system architecture the value is a user defined string if the architecture is specified on the command line otherwise it is the value returned by code java lang system get property os arch code return the string name of the current system architecture since 3 0 public static string getos arch return internal platform get default getos arch getproperty getosarch internalplatform getdefault getosarch returns the string name of the current locale for use in finding files whose path starts with code nl code return the string name of the current locale since 3 0 public static string getnl return internal platform get default getnl internalplatform getdefault returns the string name of the current operating system for use in finding files whose path starts with code os code code os unknown code is returned if the operating system cannot be determined the value may indicate one of the operating systems known to the platform as specified in code knownos values code or a user defined string if the operating system name is specified on the command line return the string name of the current operating system since 3 0 public static string getos return internal platform get default getos os_unknown knownosvalues internalplatform getdefault returns the string name of the current window system for use in finding files whose path starts with code ws code code null code is returned if the window system cannot be determined return the string name of the current window system or code null code since 3 0 public static string getws return internal platform get default getws internalplatform getdefault returns the arguments not consumed by the framework implementation itself which arguments are consumed is implementation specific these arguments are available for use by the application return the array of command line arguments not consumed by the framework since 3 0 public static string get application args return internal platform get default get application args getapplicationargs internalplatform getdefault getapplicationargs returns the platform administrator for this running eclipse p note this is an internal method and em must not em be used by clients which are not part of the eclipse platform this method allows access to classes which are not eclipse platform api but are part of the os gi runtime that the eclipse platform is built on even as the eclipse platform evolves in compatible ways from release to release the details of the os gi implementation might not p return the platform admin for this instance of eclipse since 3 0 public static platform admin get platform admin return internal platform get default get platform admin osgi osgi platformadmin getplatformadmin internalplatform getdefault getplatformadmin returns the location of the platform s working directory also known as the instance data area code null code is returned if the platform is running without an instance location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi instance area p return the location of the platform s instance data area or code null code if none since 3 0 public static location get instance location return internal platform get default get instance location getinstancelocation internalplatform getdefault getinstancelocation returns the currently registered bundle group providers return the currently registered bundle group providers since 3 0 public static i bundle group provider get bundle group providers return internal platform get default get bundle group providers ibundlegroupprovider getbundlegroupproviders internalplatform getdefault getbundlegroupproviders return the interface into the preference mechanism the returned object can be used for such operations as searching for preference values across multiple scopes and preference import export return an object to interface into the preference mechanism since 3 0 public static i preferences service get preferences service return internal platform get default get preferences service ipreferencesservice getpreferencesservice internalplatform getdefault getpreferencesservice returns the product which was selected when running this eclipse instance or code null code if none return the current product or code null code if none since 3 0 public static i product get product return internal platform get default get product iproduct getproduct internalplatform getdefault getproduct registers the given bundle group provider with the platform param provider a provider to register since 3 0 public static void register bundle group provider i bundle group provider provider internal platform get default register bundle group provider provider registerbundlegroupprovider ibundlegroupprovider internalplatform getdefault registerbundlegroupprovider de registers the given bundle group provider with the platform param provider a provider to de register since 3 0 public static void unregister bundle group provider i bundle group provider provider internal platform get default unregister bundle group provider provider unregisterbundlegroupprovider ibundlegroupprovider internalplatform getdefault unregisterbundlegroupprovider returns the location of the configuration information used to run this instance of eclipse the configuration area typically contains the list of plug ins available for use various settings those shared across different instances of the same configuration and any other such data needed by plug ins code null code is returned if the platform is running without a configuration location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi configuration area p return the location of the platform s configuration data area or code null code if none since 3 0 public static location get configuration location return internal platform get default get configuration location getconfigurationlocation internalplatform getdefault getconfigurationlocation returns the location of the platform s user data area the user data area is a location on the system which is specific to the system s current user by default it is located relative to the location given by the system property user home code null code is returned if the platform is running without an user location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi user area p return the location of the platform s user data area or code null code if none since 3 0 public static location get user location return internal platform get default get user location getuserlocation internalplatform getdefault getuserlocation returns the location of the base installation for the running platform code null code is returned if the platform is running without a configuration location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi install area p return the location of the platform s installation area or code null code if none since 3 0 public static location get install location return internal platform get default get install location getinstalllocation internalplatform getdefault getinstalllocation checks if the specified bundle is a fragment bundle param bundle the bundle to query return true if the specified bundle is a fragment bundle otherwise false is returned since 3 0 public static boolean is fragment bundle bundle return internal platform get default is fragment bundle isfragment internalplatform getdefault isfragment returns an array of attached fragment bundles for the specified bundle if the specified bundle is a fragment then tt null tt is returned if no fragments are attached to the specified bundle then tt null tt is returned param bundle the bundle to get the attached fragment bundles for return an array of fragment bundles or tt null tt if the bundle does not have any attached fragment bundles since 3 0 public static bundle get fragments bundle bundle return internal platform get default get fragments bundle getfragments internalplatform getdefault getfragments returns the resolved bundle with the specified symbolic name that has the highest version if no resolved bundles are installed that have the specified symbolic name then null is returned param symbolic name the symbolic name of the bundle to be returned return the bundle that has the specified symbolic name with the highest version or tt null tt if no bundle is found since 3 0 public static bundle get bundle string symbolic name return internal platform get default get bundle symbolic name symbolicname getbundle symbolicname internalplatform getdefault getbundle symbolicname returns all bundles with the specified symbolic name if no resolved bundles with the specified symbolic name can be found tt null tt is returned if the version argument is not null then only the bundles that have the specified symbolic name and a version greater than or equal to the specified version are returned the returned bundles are ordered in descending bundle version order param symbolic name the symbolic name of the bundles that are to be returned param version the version that the return bundle versions must match or tt null tt if no version matching is to be done return the array of bundles with the specified name that match the specified version and match rule or tt null tt if no bundles are found public static bundle get bundles string symbolic name string version return internal platform get default get bundles symbolic name version symbolicname getbundles symbolicname internalplatform getdefault getbundles symbolicname returns an array of host bundles that the specified fragment bundle is attached to or tt null tt if the specified bundle is not attached to a host if the bundle is not a fragment bundle then tt null tt is returned param bundle the bundle to get the host bundles for return an array of host bundles or null if the bundle does not have any host bundles since 3 0 public static bundle get hosts bundle bundle return internal platform get default get hosts bundle gethosts internalplatform getdefault gethosts returns whether the platform is running return code true code if the platform is running and code false code otherwise since 3 0 public static boolean is running return internal platform get default is running isrunning internalplatform getdefault isrunning returns a list of known system architectures p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getos arch code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of system architectures known to the system see getos arch since 3 0 public static string knownos arch values return internal platform get default knownos arch values getosarch getosarch knownosarchvalues internalplatform getdefault knownosarchvalues returns a list of known operating system names p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getos code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of operating systems known to the system see getos since 3 0 public static string knownos values return internal platform get default knownos values knownosvalues internalplatform getdefault knownosvalues returns a map of known platform line separators the keys are translated names of platforms and the values are their associated line separator strings return a map of platform to their line separator string since 3 1 public static map known platform line separators map result new hash map result put line separator key mac os 9 line separator value cr result put line separator key unix line separator value lf result put line separator key windows line separator value crlf return result knownplatformlineseparators hashmap line_separator_key_mac_os_9 line_separator_value_cr line_separator_key_unix line_separator_value_lf line_separator_key_windows line_separator_value_crlf returns a list of known windowing system names p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getws code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of window systems known to the system see getws since 3 0 public static string knownws values return internal platform get default knownws values knownwsvalues internalplatform getdefault knownwsvalues returns code true code if the platform is currently running in debug mode the platform is typically put in debug mode using the debug command line argument return whether or not the platform is running in debug mode since 3 0 public static boolean in debug mode return system get property osgi debug null non nls 1 indebugmode getproperty returns code true code if the platform is currently running in development mode that is if special procedures are to be taken when defining plug in class paths the platform is typically put in development mode using the dev command line argument return whether or not the platform is running in development mode since 3 0 public static boolean in development mode return system get property osgi dev null non nls 1 indevelopmentmode getproperty private constructor to block instance creation private platform super adds the given authorization information to the key ring the information is relevant for the specified protection space and the given authorization scheme the protection space is defined by the combination of the given server url and realm the authorization scheme determines what the authorization information contains and how it should be used the authorization information is a code map code of code string code to code string code and typically contains information such as user names and passwords param server url the url identifying the server for this authorization information for example http www example com param realm the subsection of the given server to which this authorization information applies for example realm1 example com or for no realm param auth scheme the scheme for which this authorization information applies for example basic or for no authorization scheme param info a code map code containing authorization information such as user names and passwords key type code string code value type code string code exception core exception if there are problems setting the authorization information reasons include ul li the keyring could not be saved li ul public static void add authorization info url server url string realm string auth scheme map info throws core exception internal platform get default add authorization info server url realm auth scheme info serverurl authscheme coreexception addauthorizationinfo serverurl authscheme coreexception internalplatform getdefault addauthorizationinfo serverurl authscheme adds the given log listener to the notification list of the platform p once registered a listener starts receiving notification as entries are added to plug in logs via code i log log code the listener continues to receive notifications until it is replaced or removed p param listener the listener to register see i log add log listener i log listener see remove log listener i log listener public static void add log listener i log listener listener internal platform get default add log listener listener ilog ilog addloglistener iloglistener removeloglistener iloglistener addloglistener iloglistener internalplatform getdefault addloglistener adds the specified resource to the protection space specified by the given realm all targets at or deeper than the depth of the last symbolic element in the path of the given resource url are assumed to be in the same protection space param resource url the url identifying the resources to be added to the specified protection space for example http www example com folder param realm the name of the protection space for example realm1 example com exception core exception if there are problems setting the authorization information reasons include ul li the key ring could not be saved li ul public static void add protection space url resource url string realm throws core exception internal platform get default add protection space resource url realm resourceurl coreexception addprotectionspace resourceurl coreexception internalplatform getdefault addprotectionspace resourceurl returns a url that is the local equivalent of the supplied url this method is expected to be used with the plug in relative ur ls returned by i plugin descriptor bundle get entry and platform find if the specified url is not a plug in relative url it is returned as is if the specified url is a plug in relative url of a file including jar archive it is returned as a locally accessible url using file protocol extracting caching the file locally if required if the specified url is a plug in relative url of a directory the directory and any files and directories under it are made locally accessible likewise if param url original plug in relative url return the resolved url exception io exception if unable to resolve url see resolve url see find bundle i path see bundle get entry string public static url as localurl url url throws io exception return internal platform get default as localurl url urls iplugindescriptor getentry ioexception ipath getentry aslocalurl ioexception internalplatform getdefault aslocalurl takes down the splash screen if one was put up public static void end splash internal platform get default end splash endsplash internalplatform getdefault endsplash removes the authorization information for the specified protection space and given authorization scheme the protection space is defined by the given server url and realm param server url the url identifying the server to remove the authorization information for for example http www example com param realm the subsection of the given server to remove the authorization information for for example realm1 example com or for no realm param auth scheme the scheme for which the authorization information to remove applies for example basic or for no authorization scheme exception core exception if there are problems removing the authorization information reasons include ul li the keyring could not be saved li ul public static void flush authorization info url server url string realm string auth scheme throws core exception internal platform get default flush authorization info server url realm auth scheme serverurl authscheme coreexception flushauthorizationinfo serverurl authscheme coreexception internalplatform getdefault flushauthorizationinfo serverurl authscheme returns the adapter manager used for extending code i adaptable code objects return the adapter manager for this platform see i adapter manager public static i adapter manager get adapter manager return internal platform get default get adapter manager iadaptable iadaptermanager iadaptermanager getadaptermanager internalplatform getdefault getadaptermanager returns the authorization information for the specified protection space and given authorization scheme the protection space is defined by the given server url and realm returns code null code if no such information exists param server url the url identifying the server for the authorization information for example http www example com param realm the subsection of the given server to which the authorization information applies for example realm1 example com or for no realm param auth scheme the scheme for which the authorization information applies for example basic or for no authorization scheme return the authorization information for the specified protection space and given authorization scheme or code null code if no such information exists public static map get authorization info url server url string realm string auth scheme return internal platform get default get authorization info server url realm auth scheme serverurl authscheme getauthorizationinfo serverurl authscheme internalplatform getdefault getauthorizationinfo serverurl authscheme returns the command line args provided to the eclipse runtime layer when it was first run the returned value does not include arguments consumed by the lower levels of eclipse e g os gi or the launcher note that individual platform runnables may be provided with different arguments if they are being run individually rather than with code platform run code return the command line used to start the platform public static string get command line args return internal platform get default get command line args osgi getcommandlineargs internalplatform getdefault getcommandlineargs returns the content type manager return the content type manager since 3 0 public static i content type manager get content type manager return internal platform get default get content type manager icontenttypemanager getcontenttypemanager internalplatform getdefault getcontenttypemanager returns the identified option code null code is returned if no such option is found options are specified in the general form i lt plug in id gt lt option path gt i for example code org eclipse core runtime debug code param option the name of the option to lookup return the value of the requested debug option or code null code public static string get debug option string option return internal platform get default get option option getdebugoption internalplatform getdefault getoption returns the location of the platform working directory p callers of this method should consider using code get instance location code instead in various typically non ide related configurations of eclipse the platform working directory may not be on the local file system as such the more general form of this location is as a url p return the location of the platform see get instance location public static i path get location throws illegal state exception return internal platform get default get location getinstancelocation getinstancelocation ipath getlocation illegalstateexception internalplatform getdefault getlocation returns the location of the platform log file this file may contain information about errors that have previously occurred during this invocation of the platform p it is recommended not to keep this value as the log location may vary when an instance location is being set p p note it is very important that users of this method do not leave the log file open for extended periods of time doing so may prevent others from writing to the log file which could result in important error messages being lost it is strongly recommended that clients wanting to read the log file for extended periods should copy the log file contents elsewhere and immediately close the original file p return the path of the log file on disk public static i path get log file location return internal platform get default get meta area get log location ipath getlogfilelocation internalplatform getdefault getmetaarea getloglocation returns the plug in runtime object for the identified plug in or code null code if no such plug in can be found if the plug in is defined but not yet activated the plug in will be activated before being returned p b note b this method is only able to find and return plug in objects for plug ins described using plugin xml according to the traditional eclipse conventions eclipse 3 0 permits plug ins to be described in manifest mf files and to define their own bundle activators such plug ins cannot be discovered by this method p param id the unique identifier of the desired plug in e g code com example acme code return the plug in runtime object or code null code deprecated this method only works if the compatibility layer is installed and must not be used otherwise see the comments on link i plugin descriptor get plugin for details public static plugin get plugin string id try i plugin registry registry get plugin registry if registry null throw new illegal state exception i plugin descriptor pd registry get plugin descriptor id if pd null return null return pd get plugin catch core exception e todo log the exception return null iplugindescriptor getplugin getplugin ipluginregistry getpluginregistry illegalstateexception iplugindescriptor getplugindescriptor getplugin coreexception returns the plug in registry for this platform return the plug in registry see i plugin registry deprecated code i plugin registry code was refactored in eclipse 3 0 this method only works if the compatibility layer is installed and must not be used otherwise see the comments on link i plugin registry and its methods for details public static i plugin registry get plugin registry bundle compatibility internal platform get default get bundle compatibility helper pi runtime compatibility if compatibility null throw new illegal state exception class old internal platform null try old internal platform compatibility load class org eclipse core internal plugins internal platform non nls 1 method get plugin registry old internal platform get method get plugin registry null non nls 1 return i plugin registry get plugin registry invoke old internal platform null catch exception e ignore the exceptions return null return null ipluginregistry ipluginregistry ipluginregistry ipluginregistry getpluginregistry internalplatform getdefault getbundle compatibilityhelper pi_runtime_compatibility illegalstateexception oldinternalplatform oldinternalplatform loadclass internalplatform getpluginregistry oldinternalplatform getmethod getpluginregistry ipluginregistry getpluginregistry oldinternalplatform returns the location in the local file system of the plug in state area for the given plug in the platform must be running p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings p param plugin the plug in whose state location is returned return a local file system path public static i path get plugin state location plugin plugin return plugin get state location ipath getpluginstatelocation getstatelocation returns the protection space realm for the specified resource or code null code if the realm is unknown param resource url the url of the resource whose protection space is returned for example http www example com folder return the protection space realm for the specified resource or code null code if the realm is unknown public static string get protection space url resource url return internal platform get default get protection space resource url resourceurl getprotectionspace resourceurl internalplatform getdefault getprotectionspace resourceurl removes the indicated identical log listener from the notification list of the platform if no such listener exists no action is taken param listener the listener to de register see i log remove log listener i log listener see add log listener i log listener public static void remove log listener i log listener listener internal platform get default remove log listener listener ilog removeloglistener iloglistener addloglistener iloglistener removeloglistener iloglistener internalplatform getdefault removeloglistener returns a url which is the resolved equivalent of the supplied url this method is expected to be used with the plug in relative ur ls returned by i plugin descriptor bundle get entry and platform find p if the specified url is not a plug in relative url it is returned as is if the specified url is a plug in relative url this method attempts to reduce the given url to one which is native to the java class library eg file http etc p p note however that users of this api should not assume too much about the results of this method while it may consistently return a file url in certain installation configurations others may result in jar or http ur ls p param url original plug in relative url return the resolved url exception io exception if unable to resolve url see as localurl url see find bundle i path see bundle get entry string public static url resolve url url throws io exception return internal platform get default resolve url urls iplugindescriptor getentry urls ioexception aslocalurl ipath getentry ioexception internalplatform getdefault runs the given runnable in a protected mode exceptions thrown in the runnable are logged and passed to the runnable s exception handler such exceptions are not rethrown by this method param runnable the runnable to run public static void run i safe runnable runnable internal platform get default run runnable isaferunnable internalplatform getdefault returns the platform job manager return the platform s job manager since 3 0 public static i job manager get job manager return internal platform get default get job manager ijobmanager getjobmanager internalplatform getdefault getjobmanager returns the extension registry for this platform return the extension registry see i extension registry since 3 0 public static i extension registry get extension registry return internal platform get default get registry iextensionregistry iextensionregistry getextensionregistry internalplatform getdefault getregistry returns a url for the given path in the given bundle returns code null code if the url could not be computed or created param bundle the bundle in which to search param path path relative to plug in installation location return a url for the given path or code null code the actual form of the returned url is not specified see find bundle i path map see resolve url see as localurl url since 3 0 public static url find bundle bundle i path path return find support find bundle path null ipath aslocalurl ipath findsupport returns a url for the given path in the given bundle returns code null code if the url could not be computed or created p find looks for this path in given bundle and any attached fragments code null code is returned if no such entry is found note that there is no specific order to the fragments p p the following arguments may also be used pre nl for language specific information os for operating system specific information ws for windowing system specific information pre p p a path of nl about properties in an environment with a default locale of en ca will return a url corresponding to the first place about properties is found according to the following order pre plugin root nl en ca about properties fragment1 root nl en ca about properties fragment2 root nl en ca about properties plugin root nl en about properties fragment1 root nl en about properties fragment2 root nl en about properties plugin root about properties fragment1 root about properties fragment2 root about properties pre p p the current environment variable values can be overridden using the override map argument p param bundle the bundle in which to search param path file path relative to plug in installation location param override map of override substitution arguments to be used for any arg path elements the map keys correspond to the substitution arguments eg nl or os the resulting values must be of type java lang string if the map is code null code or does not contain the required substitution argument the default is used return a url for the given path or code null code the actual form of the returned url is not specified see resolve url see as localurl url since 3 0 public static url find bundle bundle i path path map override return find support find bundle path override en_ca aslocalurl ipath findsupport returns the location in the local file system of the plug in state area for the given bundle if the plug in state area did not exist prior to this call it is created p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings and other configuration parameters p param bundle the bundle whose state location if returned return a local file system path since 3 0 public static i path get state location bundle bundle return internal platform get default get state location bundle ipath getstatelocation internalplatform getdefault getstatelocation returns a number that changes whenever the set of installed plug ins changes this can be used for invalidating caches that are based on the set of currently installed plug ins e g extensions return a number related to the set of installed plug ins since 3 1 public static long get state stamp return internal platform get default get state time stamp getstatestamp internalplatform getdefault getstatetimestamp returns the log for the given bundle if no such log exists one is created param bundle the bundle whose log is returned return the log for the given bundle since 3 0 public static i log get log bundle bundle return internal platform get default get log bundle ilog getlog internalplatform getdefault getlog returns the given bundle s resource bundle for the current locale p this resource bundle is typically stored as the plugin properties file in the plug in itself and contains any translatable strings used in the plug in manifest file plugin xml p p this mechanism is intended only for externalizing strings found in the plug in manifest file using this method for externalizing strings in your code may result in degraded memory performance p param bundle the bundle whose resource bundle is being queried return the resource bundle exception missing resource exception if the resource bundle was not found since 3 0 public static resource bundle get resource bundle bundle bundle throws missing resource exception return internal platform get default get resource bundle bundle missingresourceexception resourcebundle getresourcebundle missingresourceexception internalplatform getdefault getresourcebundle returns a resource string corresponding to the given argument value if the argument value specifies a resource key the string is looked up in the default resource bundle for the given runtime bundle if the argument does not specify a valid key the argument itself is returned as the resource string the key lookup is performed in the file referenced in the bundle localization header of the bundle manifest if a resource string corresponding to the key is not found in the resource bundle the key value or any default text following the key in the argument value is returned as the resource string a key is identified as a string beginning with the character note that the character is stripped off prior to lookup in the resource bundle p equivalent to code get resource string bundle value get resource bundle code p param bundle the bundle whose resource bundle is being queried param value the value to look for return the resource string see get resource bundle bundle since 3 0 public static string get resource string bundle bundle string value return internal platform get default get resource string bundle value getresourcestring getresourcebundle getresourcebundle getresourcestring internalplatform getdefault getresourcestring returns a resource string corresponding to the given argument value and resource bundle in the given runtime bundle if the argument value specifies a resource key the string is looked up in the given resource bundle if the argument does not specify a valid key the argument itself is returned as the resource string the key lookup is performed against the specified resource bundle if a resource string corresponding to the key is not found in the resource bundle the key value or any default text following the key in the argument value is returned as the resource string a key is identified as a string beginning with the character note that the character is stripped off prior to lookup in the resource bundle p for example assume resource bundle plugin properties contains name project name pre get resource string hello world returns hello world li get resource string name returns project name li get resource string name hello world returns project name li get resource string abcd hello world returns hello world li get resource string abcd returns abcd li get resource string name returns name li pre p param bundle the bundle whose resource bundle is being queried param value the value param resource bundle the resource bundle to query return the resource string see get resource bundle bundle since 3 0 public static string get resource string bundle bundle string value resource bundle resource bundle return internal platform get default get resource string bundle value resource bundle getresourcestring getresourcestring getresourcestring getresourcestring getresourcestring getresourcestring resourcebundle getresourcebundle getresourcestring resourcebundle resourcebundle internalplatform getdefault getresourcestring resourcebundle returns the string name of the current system architecture the value is a user defined string if the architecture is specified on the command line otherwise it is the value returned by code java lang system get property os arch code return the string name of the current system architecture since 3 0 public static string getos arch return internal platform get default getos arch getproperty getosarch internalplatform getdefault getosarch returns the string name of the current locale for use in finding files whose path starts with code nl code return the string name of the current locale since 3 0 public static string getnl return internal platform get default getnl internalplatform getdefault returns the string name of the current operating system for use in finding files whose path starts with code os code code os unknown code is returned if the operating system cannot be determined the value may indicate one of the operating systems known to the platform as specified in code knownos values code or a user defined string if the operating system name is specified on the command line return the string name of the current operating system since 3 0 public static string getos return internal platform get default getos os_unknown knownosvalues internalplatform getdefault returns the string name of the current window system for use in finding files whose path starts with code ws code code null code is returned if the window system cannot be determined return the string name of the current window system or code null code since 3 0 public static string getws return internal platform get default getws internalplatform getdefault returns the arguments not consumed by the framework implementation itself which arguments are consumed is implementation specific these arguments are available for use by the application return the array of command line arguments not consumed by the framework since 3 0 public static string get application args return internal platform get default get application args getapplicationargs internalplatform getdefault getapplicationargs returns the platform administrator for this running eclipse p note this is an internal method and em must not em be used by clients which are not part of the eclipse platform this method allows access to classes which are not eclipse platform api but are part of the os gi runtime that the eclipse platform is built on even as the eclipse platform evolves in compatible ways from release to release the details of the os gi implementation might not p return the platform admin for this instance of eclipse since 3 0 public static platform admin get platform admin return internal platform get default get platform admin osgi osgi platformadmin getplatformadmin internalplatform getdefault getplatformadmin returns the location of the platform s working directory also known as the instance data area code null code is returned if the platform is running without an instance location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi instance area p return the location of the platform s instance data area or code null code if none since 3 0 public static location get instance location return internal platform get default get instance location getinstancelocation internalplatform getdefault getinstancelocation returns the currently registered bundle group providers return the currently registered bundle group providers since 3 0 public static i bundle group provider get bundle group providers return internal platform get default get bundle group providers ibundlegroupprovider getbundlegroupproviders internalplatform getdefault getbundlegroupproviders return the interface into the preference mechanism the returned object can be used for such operations as searching for preference values across multiple scopes and preference import export return an object to interface into the preference mechanism since 3 0 public static i preferences service get preferences service return internal platform get default get preferences service ipreferencesservice getpreferencesservice internalplatform getdefault getpreferencesservice returns the product which was selected when running this eclipse instance or code null code if none return the current product or code null code if none since 3 0 public static i product get product return internal platform get default get product iproduct getproduct internalplatform getdefault getproduct registers the given bundle group provider with the platform param provider a provider to register since 3 0 public static void register bundle group provider i bundle group provider provider internal platform get default register bundle group provider provider registerbundlegroupprovider ibundlegroupprovider internalplatform getdefault registerbundlegroupprovider de registers the given bundle group provider with the platform param provider a provider to de register since 3 0 public static void unregister bundle group provider i bundle group provider provider internal platform get default unregister bundle group provider provider unregisterbundlegroupprovider ibundlegroupprovider internalplatform getdefault unregisterbundlegroupprovider returns the location of the configuration information used to run this instance of eclipse the configuration area typically contains the list of plug ins available for use various settings those shared across different instances of the same configuration and any other such data needed by plug ins code null code is returned if the platform is running without a configuration location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi configuration area p return the location of the platform s configuration data area or code null code if none since 3 0 public static location get configuration location return internal platform get default get configuration location getconfigurationlocation internalplatform getdefault getconfigurationlocation returns the location of the platform s user data area the user data area is a location on the system which is specific to the system s current user by default it is located relative to the location given by the system property user home code null code is returned if the platform is running without an user location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi user area p return the location of the platform s user data area or code null code if none since 3 0 public static location get user location return internal platform get default get user location getuserlocation internalplatform getdefault getuserlocation returns the location of the base installation for the running platform code null code is returned if the platform is running without a configuration location p this method is equivalent to acquiring the code org eclipse osgi service datalocation location code service with the property type osgi install area p return the location of the platform s installation area or code null code if none since 3 0 public static location get install location return internal platform get default get install location getinstalllocation internalplatform getdefault getinstalllocation checks if the specified bundle is a fragment bundle param bundle the bundle to query return true if the specified bundle is a fragment bundle otherwise false is returned since 3 0 public static boolean is fragment bundle bundle return internal platform get default is fragment bundle isfragment internalplatform getdefault isfragment returns an array of attached fragment bundles for the specified bundle if the specified bundle is a fragment then tt null tt is returned if no fragments are attached to the specified bundle then tt null tt is returned param bundle the bundle to get the attached fragment bundles for return an array of fragment bundles or tt null tt if the bundle does not have any attached fragment bundles since 3 0 public static bundle get fragments bundle bundle return internal platform get default get fragments bundle getfragments internalplatform getdefault getfragments returns the resolved bundle with the specified symbolic name that has the highest version if no resolved bundles are installed that have the specified symbolic name then null is returned param symbolic name the symbolic name of the bundle to be returned return the bundle that has the specified symbolic name with the highest version or tt null tt if no bundle is found since 3 0 public static bundle get bundle string symbolic name return internal platform get default get bundle symbolic name symbolicname getbundle symbolicname internalplatform getdefault getbundle symbolicname returns all bundles with the specified symbolic name if no resolved bundles with the specified symbolic name can be found tt null tt is returned if the version argument is not null then only the bundles that have the specified symbolic name and a version greater than or equal to the specified version are returned the returned bundles are ordered in descending bundle version order param symbolic name the symbolic name of the bundles that are to be returned param version the version that the return bundle versions must match or tt null tt if no version matching is to be done return the array of bundles with the specified name that match the specified version and match rule or tt null tt if no bundles are found public static bundle get bundles string symbolic name string version return internal platform get default get bundles symbolic name version symbolicname getbundles symbolicname internalplatform getdefault getbundles symbolicname returns an array of host bundles that the specified fragment bundle is attached to or tt null tt if the specified bundle is not attached to a host if the bundle is not a fragment bundle then tt null tt is returned param bundle the bundle to get the host bundles for return an array of host bundles or null if the bundle does not have any host bundles since 3 0 public static bundle get hosts bundle bundle return internal platform get default get hosts bundle gethosts internalplatform getdefault gethosts returns whether the platform is running return code true code if the platform is running and code false code otherwise since 3 0 public static boolean is running return internal platform get default is running isrunning internalplatform getdefault isrunning returns a list of known system architectures p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getos arch code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of system architectures known to the system see getos arch since 3 0 public static string knownos arch values return internal platform get default knownos arch values getosarch getosarch knownosarchvalues internalplatform getdefault knownosarchvalues returns a list of known operating system names p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getos code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of operating systems known to the system see getos since 3 0 public static string knownos values return internal platform get default knownos values knownosvalues internalplatform getdefault knownosvalues returns a map of known platform line separators the keys are translated names of platforms and the values are their associated line separator strings return a map of platform to their line separator string since 3 1 public static map known platform line separators map result new hash map result put line separator key mac os 9 line separator value cr result put line separator key unix line separator value lf result put line separator key windows line separator value crlf return result knownplatformlineseparators hashmap line_separator_key_mac_os_9 line_separator_value_cr line_separator_key_unix line_separator_value_lf line_separator_key_windows line_separator_value_crlf returns a list of known windowing system names p note that this list is not authoritative there may be legal values not included in this list indeed the value returned by code getws code may not be in this list also this list may change over time as eclipse comes to run on more operating environments p return the list of window systems known to the system see getws since 3 0 public static string knownws values return internal platform get default knownws values knownwsvalues internalplatform getdefault knownwsvalues returns code true code if the platform is currently running in debug mode the platform is typically put in debug mode using the debug command line argument return whether or not the platform is running in debug mode since 3 0 public static boolean in debug mode return system get property osgi debug null non nls 1 indebugmode getproperty returns code true code if the platform is currently running in development mode that is if special procedures are to be taken when defining plug in class paths the platform is typically put in development mode using the dev command line argument return whether or not the platform is running in development mode since 3 0 public static boolean in development mode return system get property osgi dev null non nls 1 indevelopmentmode getproperty class browser content provider implements i structured content provider public object get elements object input element list list new array list iterator iterator browser manager get instance get web browsers iterator while iterator has next i browser descriptor browser i browser descriptor iterator next list add browser return list to array browsercontentprovider istructuredcontentprovider getelements inputelement arraylist browsermanager getinstance getwebbrowsers hasnext ibrowserdescriptor ibrowserdescriptor toarray public void input changed viewer viewer object old input object new input do nothing inputchanged oldinput newinput public void dispose do nothing class browser table label provider implements i table label provider public image get column image object element int column index return null browsertablelabelprovider itablelabelprovider getcolumnimage columnindex public string get column text object element int column index i browser descriptor browser i browser descriptor element return not null browser get name getcolumntext columnindex ibrowserdescriptor ibrowserdescriptor notnull getname protected string not null string s if s null return non nls 1 return s notnull public boolean is label property object element string property return false islabelproperty public void add listener i label provider listener listener do nothing addlistener ilabelproviderlistener public void remove listener i label provider listener listener do nothing removelistener ilabelproviderlistener public void dispose do nothing web browser preference page constructor comment public web browser preference page super webbrowserpreferencepage webbrowserpreferencepage create the preference options param parent org eclipse swt widgets composite return org eclipse swt widgets control protected control create contents composite parent initialize dialog units parent platformui get workbench get help system set help parent context ids pref browser composite composite new composite parent swt none grid layout layout new grid layout layout num columns 2 layout horizontal spacing convert horizontaldl us to pixels 4 layout vertical spacing convert verticaldl us to pixels 3 layout margin width 0 layout margin height 0 composite set layout layout grid data data new grid data grid data fill horizontal grid data vertical align fill composite set layout data data label label new label composite swt wrap label set text messages preference web browser description data new grid data grid data horizontal align beginning data horizontal span 2 label set layout data data label new label composite swt wrap data new grid data grid data horizontal align beginning data horizontal span 2 label set layout data data internal new button composite swt radio internal set text messages pref internal browser data new grid data grid data horizontal align beginning data horizontal span 2 internal set layout data data if web browser util can use internal web browser internal set enabled false external new button composite swt radio external set text messages pref external browser data new grid data grid data horizontal align beginning data horizontal span 2 external set layout data data label new label composite swt none label set text messages browser list data new grid data grid data fill horizontal grid data vertical align center data horizontal span 2 label set layout data data table new table composite swt check swt border swt v scroll swt h scroll swt single swt full selection data new grid data grid data fill both table set layout data data table set header visible false table set lines visible false table layout table layout new table layout new table column table swt none table layout add column data new column weight data 100 table set layout table layout table viewer new checkbox table viewer table table viewer set content provider new browser content provider table viewer set label provider new browser table label provider table viewer set input root non nls 1 uncheck any other elements that might be checked and leave only the element checked to remain checked since one can only chose one brower at a time to be current table viewer add check state listener new i check state listener public void check state changed check state changed event e check new default browser e get element i browser descriptor browser i browser descriptor e get element browser manager get instance set current web browser browser if no other browsers are checked don t allow the single one currently checked to become unchecked and lose a current browser that is don t permit unchecking if no other item is checked which is supposed to be the case object obj table viewer get checked elements if obj length 0 table viewer set checked e get element true set a default checked browser based on the current browser if there is not a current browser but the first item exists use that instead this will work currently until workbench shutdown because current browser is not yet persisted i browser descriptor browser browser manager get instance get current web browser if browser null table viewer set checked browser true else object obj table viewer get element at 0 if obj null table viewer set checked obj true table viewer add selection changed listener new i selection changed listener public void selection changed selection changed event event i structured selection sele structured selection table viewer get selection boolean sel sele get first element null sele get first element instanceof system browser descriptor remove set enabled sel edit set enabled sel table viewer add double click listener new i double click listener public void double click double click event event i structured selection sel structured selection table viewer get selection if sel get first element null i browser descriptor browser2 i browser descriptor sel get first element i browser descriptor working copy wc browser2 get working copy browser descriptor dialog dialog new browser descriptor dialog get shell wc if dialog open window cancel try table viewer refresh wc save catch exception ex ignore table add key listener new key listener public void key pressed key event e if e character swt del i structured selection sel structured selection table viewer get selection if sel get first element null i browser descriptor browser2 i browser descriptor sel get first element try browser2 delete table viewer remove browser2 need here to ensure that if the item deleted was checked ie was the current browser that the new current browser will be the first in the list typically the internal browser which cannot be deleted and be current browser manager manager browser manager get instance if browser2 manager get current web browser if manager browsers size 0 i browser descriptor wb i browser descriptor manager browsers get 0 manager set current web browser wb table viewer set checked wb true catch exception ex ignore public void key released key event e ignore composite button comp new composite composite swt none layout new grid layout layout horizontal spacing 0 layout vertical spacing convert verticaldl us to pixels 3 layout margin width 0 layout margin height 0 layout num columns 1 button comp set layout layout data new grid data grid data horizontal align fill grid data vertical align fill button comp set layout data data final button add swt util create button button comp messages add add add selection listener new selection adapter public void widget selected selection event e browser descriptor dialog dialog new browser descriptor dialog get shell if dialog open window cancel return table viewer refresh i browser descriptor cbrowser browser manager get instance get current web browser if cbrowser null table viewer set checked cbrowser true edit swt util create button button comp messages edit edit add selection listener new selection adapter public void widget selected selection event e i structured selection sel structured selection table viewer get selection i browser descriptor browser2 i browser descriptor sel get first element i browser descriptor working copy wc browser2 get working copy browser descriptor dialog dialog new browser descriptor dialog get shell wc if dialog open window cancel try table viewer refresh wc save catch exception ex ignore remove swt util create button button comp messages remove remove add selection listener new selection adapter public void widget selected selection event e i structured selection sel structured selection table viewer get selection i browser descriptor browser2 i browser descriptor sel get first element try browser2 delete table viewer remove browser2 need here to ensure that if the item deleted was checked ie was the current browser that the new current browser will be the first in the list typically the internal browser which cannot be deleted and be current browser manager manager browser manager get instance if browser2 manager get current web browser if manager browsers size 0 i browser descriptor wb i browser descriptor manager browsers get 0 manager set current web browser wb table viewer set checked wb true catch exception ex ignore search swt util create button button comp messages search data grid data search get layout data data vertical indent 9 search add selection listener new selection adapter public void widget selected selection event e final list found browsers new array list final list existing paths web browser util get external browser paths select a target directory for the search directory dialog dialog new directory dialog get shell dialog set message messages select directory dialog set text messages directory dialog title string path dialog open if path null return final file root dir new file path progress monitor dialog pm new progress monitor dialog get shell i runnable with progress r new i runnable with progress public void run i progress monitor monitor monitor begin task messages searching task name i progress monitor unknown search root dir existing paths found browsers monitor createcontents initializedialogunits getworkbench gethelpsystem sethelp contextids pref_browser gridlayout gridlayout numcolumns horizontalspacing converthorizontaldlustopixels verticalspacing convertverticaldlustopixels marginwidth marginheight setlayout griddata griddata griddata fill_horizontal griddata vertical_align_fill setlayoutdata settext preferencewebbrowserdescription griddata griddata horizontal_align_beginning horizontalspan setlayoutdata griddata griddata horizontal_align_beginning horizontalspan setlayoutdata settext prefinternalbrowser griddata griddata horizontal_align_beginning horizontalspan setlayoutdata webbrowserutil canuseinternalwebbrowser setenabled settext prefexternalbrowser griddata griddata horizontal_align_beginning horizontalspan setlayoutdata settext browserlist griddata griddata fill_horizontal griddata vertical_align_center horizontalspan setlayoutdata v_scroll h_scroll full_selection griddata griddata fill_both setlayoutdata setheadervisible setlinesvisible tablelayout tablelayout tablelayout tablecolumn tablelayout addcolumndata columnweightdata setlayout tablelayout tableviewer checkboxtableviewer tableviewer setcontentprovider browsercontentprovider tableviewer setlabelprovider browsertablelabelprovider tableviewer setinput tableviewer addcheckstatelistener icheckstatelistener checkstatechanged checkstatechangedevent checknewdefaultbrowser getelement ibrowserdescriptor ibrowserdescriptor getelement browsermanager getinstance setcurrentwebbrowser tableviewer getcheckedelements tableviewer setchecked getelement ibrowserdescriptor browsermanager getinstance getcurrentwebbrowser tableviewer setchecked tableviewer getelementat tableviewer setchecked tableviewer addselectionchangedlistener iselectionchangedlistener selectionchanged selectionchangedevent istructuredselection structuredselection tableviewer getselection getfirstelement getfirstelement systembrowserdescriptor setenabled setenabled tableviewer adddoubleclicklistener idoubleclicklistener doubleclick doubleclickevent istructuredselection structuredselection tableviewer getselection getfirstelement ibrowserdescriptor ibrowserdescriptor getfirstelement ibrowserdescriptorworkingcopy getworkingcopy browserdescriptordialog browserdescriptordialog getshell tableviewer addkeylistener keylistener keypressed keyevent istructuredselection structuredselection tableviewer getselection getfirstelement ibrowserdescriptor ibrowserdescriptor getfirstelement tableviewer browsermanager browsermanager getinstance getcurrentwebbrowser ibrowserdescriptor ibrowserdescriptor setcurrentwebbrowser tableviewer setchecked keyreleased keyevent buttoncomp gridlayout horizontalspacing verticalspacing convertverticaldlustopixels marginwidth marginheight numcolumns buttoncomp setlayout griddata griddata horizontal_align_fill griddata vertical_align_fill buttoncomp setlayoutdata swtutil createbutton buttoncomp addselectionlistener selectionadapter widgetselected selectionevent browserdescriptordialog browserdescriptordialog getshell tableviewer ibrowserdescriptor browsermanager getinstance getcurrentwebbrowser tableviewer setchecked swtutil createbutton buttoncomp addselectionlistener selectionadapter widgetselected selectionevent istructuredselection structuredselection tableviewer getselection ibrowserdescriptor ibrowserdescriptor getfirstelement ibrowserdescriptorworkingcopy getworkingcopy browserdescriptordialog browserdescriptordialog getshell tableviewer swtutil createbutton buttoncomp addselectionlistener selectionadapter widgetselected selectionevent istructuredselection structuredselection tableviewer getselection ibrowserdescriptor ibrowserdescriptor getfirstelement tableviewer browsermanager browsermanager getinstance getcurrentwebbrowser ibrowserdescriptor ibrowserdescriptor setcurrentwebbrowser tableviewer setchecked swtutil createbutton buttoncomp griddata getlayoutdata verticalindent addselectionlistener selectionadapter widgetselected selectionevent foundbrowsers arraylist existingpaths webbrowserutil getexternalbrowserpaths directorydialog directorydialog getshell setmessage selectdirectory settext directorydialogtitle rootdir progressmonitordialog progressmonitordialog getshell irunnablewithprogress irunnablewithprogress iprogressmonitor begintask searchingtaskname iprogressmonitor rootdir existingpaths foundbrowsers table viewer add check state listener new i check state listener public void check state changed check state changed event e check new default browser e get element i browser descriptor browser i browser descriptor e get element browser manager get instance set current web browser browser if no other browsers are checked don t allow the single one currently checked to become unchecked and lose a current browser that is don t permit unchecking if no other item is checked which is supposed to be the case object obj table viewer get checked elements if obj length 0 table viewer set checked e get element true tableviewer addcheckstatelistener icheckstatelistener checkstatechanged checkstatechangedevent checknewdefaultbrowser getelement ibrowserdescriptor ibrowserdescriptor getelement browsermanager getinstance setcurrentwebbrowser tableviewer getcheckedelements tableviewer setchecked getelement add selection changed listener new i selection changed listener public void selection changed selection changed event event i structured selection sele structured selection table viewer get selection boolean sel sele get first element null sele get first element instanceof system browser descriptor remove set enabled sel edit set enabled sel addselectionchangedlistener iselectionchangedlistener selectionchanged selectionchangedevent istructuredselection structuredselection tableviewer getselection getfirstelement getfirstelement systembrowserdescriptor setenabled setenabled table viewer add double click listener new i double click listener public void double click double click event event i structured selection sel structured selection table viewer get selection if sel get first element null i browser descriptor browser2 i browser descriptor sel get first element i browser descriptor working copy wc browser2 get working copy browser descriptor dialog dialog new browser descriptor dialog get shell wc if dialog open window cancel try table viewer refresh wc save catch exception ex ignore tableviewer adddoubleclicklistener idoubleclicklistener doubleclick doubleclickevent istructuredselection structuredselection tableviewer getselection getfirstelement ibrowserdescriptor ibrowserdescriptor getfirstelement ibrowserdescriptorworkingcopy getworkingcopy browserdescriptordialog browserdescriptordialog getshell tableviewer table add key listener new key listener public void key pressed key event e if e character swt del i structured selection sel structured selection table viewer get selection if sel get first element null i browser descriptor browser2 i browser descriptor sel get first element try browser2 delete table viewer remove browser2 need here to ensure that if the item deleted was checked ie was the current browser that the new current browser will be the first in the list typically the internal browser which cannot be deleted and be current browser manager manager browser manager get instance if browser2 manager get current web browser if manager browsers size 0 i browser descriptor wb i browser descriptor manager browsers get 0 manager set current web browser wb table viewer set checked wb true catch exception ex ignore addkeylistener keylistener keypressed keyevent istructuredselection structuredselection tableviewer getselection getfirstelement ibrowserdescriptor ibrowserdescriptor getfirstelement tableviewer browsermanager browsermanager getinstance getcurrentwebbrowser ibrowserdescriptor ibrowserdescriptor setcurrentwebbrowser tableviewer setchecked public void key released key event e ignore keyreleased keyevent add add selection listener new selection adapter public void widget selected selection event e browser descriptor dialog dialog new browser descriptor dialog get shell if dialog open window cancel return table viewer refresh i browser descriptor cbrowser browser manager get instance get current web browser if cbrowser null table viewer set checked cbrowser true addselectionlistener selectionadapter widgetselected selectionevent browserdescriptordialog browserdescriptordialog getshell tableviewer ibrowserdescriptor browsermanager getinstance getcurrentwebbrowser tableviewer setchecked edit add selection listener new selection adapter public void widget selected selection event e i structured selection sel structured selection table viewer get selection i browser descriptor browser2 i browser descriptor sel get first element i browser descriptor working copy wc browser2 get working copy browser descriptor dialog dialog new browser descriptor dialog get shell wc if dialog open window cancel try table viewer refresh wc save catch exception ex ignore addselectionlistener selectionadapter widgetselected selectionevent istructuredselection structuredselection tableviewer getselection ibrowserdescriptor ibrowserdescriptor getfirstelement ibrowserdescriptorworkingcopy getworkingcopy browserdescriptordialog browserdescriptordialog getshell tableviewer remove add selection listener new selection adapter public void widget selected selection event e i structured selection sel structured selection table viewer get selection i browser descriptor browser2 i browser descriptor sel get first element try browser2 delete table viewer remove browser2 need here to ensure that if the item deleted was checked ie was the current browser that the new current browser will be the first in the list typically the internal browser which cannot be deleted and be current browser manager manager browser manager get instance if browser2 manager get current web browser if manager browsers size 0 i browser descriptor wb i browser descriptor manager browsers get 0 manager set current web browser wb table viewer set checked wb true catch exception ex ignore addselectionlistener selectionadapter widgetselected selectionevent istructuredselection structuredselection tableviewer getselection ibrowserdescriptor ibrowserdescriptor getfirstelement tableviewer browsermanager browsermanager getinstance getcurrentwebbrowser ibrowserdescriptor ibrowserdescriptor setcurrentwebbrowser tableviewer setchecked search add selection listener new selection adapter public void widget selected selection event e final list found browsers new array list final list existing paths web browser util get external browser paths select a target directory for the search directory dialog dialog new directory dialog get shell dialog set message messages select directory dialog set text messages directory dialog title string path dialog open if path null return final file root dir new file path progress monitor dialog pm new progress monitor dialog get shell i runnable with progress r new i runnable with progress public void run i progress monitor monitor monitor begin task messages searching task name i progress monitor unknown search root dir existing paths found browsers monitor monitor done try pm run true true r catch invocation target exception ex trace trace trace severe invocation exception occured running monitor non nls 1 ex catch interrupted exception ex trace trace trace severe interrupted exception occured running monitor non nls 1 ex return if pm get progress monitor is canceled return list browsers to create found browsers if browsers to create null cancelled return if browsers to create is empty no browsers found web browser util open message messages searching none found return iterator iterator browsers to create iterator while iterator has next i browser descriptor working copy browser2 i browser descriptor working copy iterator next browser2 save table viewer refresh i browser descriptor cbrowser browser manager get instance get current web browser if cbrowser null table viewer set checked cbrowser true addselectionlistener selectionadapter widgetselected selectionevent foundbrowsers arraylist existingpaths webbrowserutil getexternalbrowserpaths directorydialog directorydialog getshell setmessage selectdirectory settext directorydialogtitle rootdir progressmonitordialog progressmonitordialog getshell irunnablewithprogress irunnablewithprogress iprogressmonitor begintask searchingtaskname iprogressmonitor rootdir existingpaths foundbrowsers invocationtargetexception interruptedexception getprogressmonitor iscanceled browserstocreate foundbrowsers browserstocreate browserstocreate isempty webbrowserutil openmessage searchingnonefound browserstocreate hasnext ibrowserdescriptorworkingcopy ibrowserdescriptorworkingcopy tableviewer ibrowserdescriptor browsermanager getinstance getcurrentwebbrowser tableviewer setchecked i runnable with progress r new i runnable with progress public void run i progress monitor monitor monitor begin task messages searching task name i progress monitor unknown search root dir existing paths found browsers monitor monitor done irunnablewithprogress irunnablewithprogress iprogressmonitor begintask searchingtaskname iprogressmonitor rootdir existingpaths foundbrowsers table viewer add check state listener new i check state listener public void check state changed check state changed event e check new default browser e get element i browser descriptor browser2 i browser descriptor e get element browser manager get instance set current web browser browser2 tableviewer addcheckstatelistener icheckstatelistener checkstatechanged checkstatechangedevent checknewdefaultbrowser getelement ibrowserdescriptor ibrowserdescriptor getelement browsermanager getinstance setcurrentwebbrowser initializes this preference page using the passed workbench param workbench the current workbench public void init i workbench workbench do nothing iworkbench public void set visible boolean visible super set visible visible if visible set title messages preference web browser title long setvisible setvisible settitle preferencewebbrowsertitlelong protected object get selection i selection sel2 i structured selection sel i structured selection sel2 return sel get first element getselection iselection istructuredselection istructuredselection getfirstelement uncheck all the items except the current one that was just checked protected void check new default browser object browser table item children table viewer get table get items for int i 0 i children length i table item item children i if item get data equals browser item set checked false checknewdefaultbrowser tableitem tableviewer gettable getitems tableitem getdata setchecked protected static void search file directory list existing paths list found browsers i progress monitor monitor if monitor is canceled return monitor sub task nls bind messages searching new string integer to string found browsers size directory get absolute path string names directory list list sub dirs new array list for int i 0 i names length i if monitor is canceled return file file new file directory names i if existing paths contains file get absolute path to lower case continue i browser descriptor working copy wc web browser util create external browser file if wc null found browsers add wc if file is directory if monitor is canceled return sub dirs add file while sub dirs is empty file sub dir file sub dirs remove 0 search sub dir existing paths found browsers monitor if monitor is canceled return existingpaths foundbrowsers iprogressmonitor iscanceled subtask tostring foundbrowsers getabsolutepath subdirs arraylist iscanceled existingpaths getabsolutepath tolowercase ibrowserdescriptorworkingcopy webbrowserutil createexternalbrowser foundbrowsers isdirectory iscanceled subdirs subdirs isempty subdir subdirs subdir existingpaths foundbrowsers iscanceled performs special processing when this page s defaults button has been pressed protected void perform defaults internal set selection web browser preference is default use internal browser external set selection web browser preference is default use internal browser browser manager get instance current browser null browser manager get instance setup default browsers table viewer refresh i browser descriptor wb browser manager get instance get current web browser if wb null table viewer set checked wb true super perform defaults performdefaults setselection webbrowserpreference isdefaultuseinternalbrowser setselection webbrowserpreference isdefaultuseinternalbrowser browsermanager getinstance currentbrowser browsermanager getinstance setupdefaultbrowsers tableviewer ibrowserdescriptor browsermanager getinstance getcurrentwebbrowser tableviewer setchecked performdefaults method declared on i preference page subclasses should override public boolean perform ok int choice if internal get selection choice web browser preference internal else choice web browser preference external web browser preference set browser choice choice return true ipreferencepage performok getselection webbrowserpreference webbrowserpreference webbrowserpreference setbrowserchoice public class default browser extends abstract web browser public default browser string id super id defaultbrowser abstractwebbrowser defaultbrowser see org eclipse help browser i browser displayurl string public void openurl url url2 string url url2 to external form code from marc antoine parent try runtime get runtime exec new string usr bin osascript non nls 1 e non nls 1 open location url non nls 1 non nls 2 catch io exception ioe web browserui plugin log error launching osascript has failed ioe non nls 1 ibrowser toexternalform getruntime ioexception webbrowseruiplugin logerror public class browser launcher implements i editor launcher public browser launcher do nothing browserlauncher ieditorlauncher browserlauncher public void open i path file i workbench browser support support platformui get workbench get browser support try if web browser preference get browser choice web browser preference internal support create browser i workbench browser support location bar i workbench browser support navigation bar file to portable string null null openurl file to file tourl else support create browser i workbench browser support location bar i workbench browser support navigation bar default browser support shared id null null openurl file to file tourl catch malformedurl exception e ignore catch part init exception e message dialog open error platformui get workbench get display get active shell messages error dialog title e get localized message ipath iworkbenchbrowsersupport getworkbench getbrowsersupport webbrowserpreference getbrowserchoice webbrowserpreference createbrowser iworkbenchbrowsersupport location_bar iworkbenchbrowsersupport navigation_bar toportablestring tofile createbrowser iworkbenchbrowsersupport location_bar iworkbenchbrowsersupport navigation_bar defaultbrowsersupport shared_id tofile malformedurlexception partinitexception messagedialog openerror getworkbench getdisplay getactiveshell errordialogtitle getlocalizedmessage private runnable dispose runnable new runnable public void run dispose disposerunnable private device original display public original image descriptor image original device original display this original original this original display original display originaldisplay originalimagedescriptor originaldisplay originaldisplay originaldisplay public object create resource device device throws device resource exception if device original display ref count return original return super create resource device createresource deviceresourceexception originaldisplay refcount createresource public void destroy resource object to dispose if original to dispose ref count if ref count 0 original dispose original null else super destroy resource to dispose destroyresource todispose todispose refcount refcount destroyresource todispose see org eclipse jface resource image descriptor get image data public image data get image data return original get image data imagedescriptor getimagedata imagedata getimagedata getimagedata creates an empty image registry p there must be an swt display created in the current thread before calling this method p public image registry this display get current imageregistry getcurrent creates an empty image registry using the given resource manager to allocate images param manager the resource manager used to allocate images since 3 1 public image registry resource manager manager assert is not null manager device dev manager get device if dev instanceof display this display display dev this manager manager manager dispose exec dispose runnable imageregistry resourcemanager isnotnull getdevice disposeexec disposerunnable creates an empty image registry param display this code display code must not be code null code and must not be disposed in order to use this registry public image registry display display this j face resources get resources display imageregistry jfaceresources getresources returns the image associated with the given key in this registry or code null code if none param key the key return the image or code null code if none public image get string key can be null if key null return null if display null note for backwards compatibility the following images are supported here they should never be disposed hence we explicitly return them rather then registering images that swt will dispose applications should go direclty to swt for these icons see display get system icon int id int swt key 1 if key equals dialog dlg img info swt key swt icon information if key equals dialog dlg img question swt key swt icon question if key equals dialog dlg img warning swt key swt icon warning if key equals dialog dlg img error swt key swt icon error if we actually just want to return an swt image do so without looking in the registry if swt key 1 final image image new image 1 final int id swt key display sync exec new runnable public void run image 0 display get system image id return image 0 entry entry get entry key if entry null return null if entry image null entry image manager create image with default entry descriptor return entry image getsystemicon swtkey dlg_img_info swtkey icon_information dlg_img_question swtkey icon_question dlg_img_warning swtkey icon_warning dlg_img_error swtkey icon_error swtkey swtkey syncexec getsystemimage getentry createimagewithdefault final int id swt key display sync exec new runnable public void run image 0 display get system image id swtkey syncexec getsystemimage returns the descriptor associated with the given key in this registry or code null code if none param key the key return the descriptor or code null code if none since 2 1 public image descriptor get descriptor string key entry entry get entry key if entry null return null return entry descriptor imagedescriptor getdescriptor getentry adds or replaces an image descriptor to this registry the first time this new entry is retrieved the image descriptor s image will be computed via code image descriptor create image code and remembered this method replaces an existing image descriptor associated with the given key but fails if there is a real image associated with it param key the key param descriptor the image descriptor exception illegal argument exception if the key already exists public void put string key image descriptor descriptor entry entry get entry key if entry null entry new entry get table put key entry if entry image null throw new illegal argument exception image registry key already in use key non nls 1 entry descriptor descriptor imagedescriptor createimage imagedescriptor illegalargumentexception imagedescriptor getentry gettable illegalargumentexception imageregistry adds an image to this registry this method fails if there is already an image or descriptor for the given key p note that an image registry owns all of the image objects registered with it and automatically disposes of them when the swt display is disposed because of this clients must not register an image object that is managed by another object p param key the key param image the image exception illegal argument exception if the key already exists public void put string key image image entry entry get entry key if entry null entry new entry put entry key entry if entry image null entry descriptor null throw new illegal argument exception image registry key already in use key non nls 1 entry image image entry descriptor new original image descriptor image manager get device try manager create entry descriptor catch device resource exception e illegalargumentexception getentry putentry illegalargumentexception imageregistry originalimagedescriptor getdevice deviceresourceexception removes an image from this registry if an swt image was allocated it is disposed this method has no effect if there is no image or descriptor for the given key param key the key public void remove string key image descriptor descriptor get descriptor key if descriptor null manager destroy descriptor get table remove key imagedescriptor getdescriptor gettable private entry get entry string key return entry get table get key getentry gettable private void put entry string key entry entry get table put key entry putentry gettable private map get table if table null table new hash map 10 return table gettable hashmap disposes this image registry disposing any images that were allocated for it and clearing its entries since 3 1 public void dispose manager cancel dispose exec dispose runnable if table null for iterator i table values iterator i has next entry entry entry i next if entry image null manager destroy image entry descriptor table null display null canceldisposeexec disposerunnable hasnext destroyimage private runnable dispose runnable new runnable public void run dispose disposerunnable private device original display public original image descriptor image original device original display this original original this original display original display originaldisplay originalimagedescriptor originaldisplay originaldisplay originaldisplay public object create resource device device throws device resource exception if device original display ref count return original return super create resource device createresource deviceresourceexception originaldisplay refcount createresource public void destroy resource object to dispose if original to dispose ref count if ref count 0 original dispose original null else super destroy resource to dispose destroyresource todispose todispose refcount refcount destroyresource todispose see org eclipse jface resource image descriptor get image data public image data get image data return original get image data imagedescriptor getimagedata imagedata getimagedata getimagedata creates an empty image registry p there must be an swt display created in the current thread before calling this method p public image registry this display get current imageregistry getcurrent creates an empty image registry using the given resource manager to allocate images param manager the resource manager used to allocate images since 3 1 public image registry resource manager manager assert is not null manager device dev manager get device if dev instanceof display this display display dev this manager manager manager dispose exec dispose runnable imageregistry resourcemanager isnotnull getdevice disposeexec disposerunnable creates an empty image registry param display this code display code must not be code null code and must not be disposed in order to use this registry public image registry display display this j face resources get resources display imageregistry jfaceresources getresources returns the image associated with the given key in this registry or code null code if none param key the key return the image or code null code if none public image get string key can be null if key null return null if display null note for backwards compatibility the following images are supported here they should never be disposed hence we explicitly return them rather then registering images that swt will dispose applications should go direclty to swt for these icons see display get system icon int id int swt key 1 if key equals dialog dlg img info swt key swt icon information if key equals dialog dlg img question swt key swt icon question if key equals dialog dlg img warning swt key swt icon warning if key equals dialog dlg img error swt key swt icon error if we actually just want to return an swt image do so without looking in the registry if swt key 1 final image image new image 1 final int id swt key display sync exec new runnable public void run image 0 display get system image id return image 0 entry entry get entry key if entry null return null if entry image null entry image manager create image with default entry descriptor return entry image getsystemicon swtkey dlg_img_info swtkey icon_information dlg_img_question swtkey icon_question dlg_img_warning swtkey icon_warning dlg_img_error swtkey icon_error swtkey swtkey syncexec getsystemimage getentry createimagewithdefault returns the descriptor associated with the given key in this registry or code null code if none param key the key return the descriptor or code null code if none since 2 1 public image descriptor get descriptor string key entry entry get entry key if entry null return null return entry descriptor imagedescriptor getdescriptor getentry adds or replaces an image descriptor to this registry the first time this new entry is retrieved the image descriptor s image will be computed via code image descriptor create image code and remembered this method replaces an existing image descriptor associated with the given key but fails if there is a real image associated with it param key the key param descriptor the image descriptor exception illegal argument exception if the key already exists public void put string key image descriptor descriptor entry entry get entry key if entry null entry new entry get table put key entry if entry image null throw new illegal argument exception image registry key already in use key non nls 1 entry descriptor descriptor imagedescriptor createimage imagedescriptor illegalargumentexception imagedescriptor getentry gettable illegalargumentexception imageregistry adds an image to this registry this method fails if there is already an image or descriptor for the given key p note that an image registry owns all of the image objects registered with it and automatically disposes of them when the swt display is disposed because of this clients must not register an image object that is managed by another object p param key the key param image the image exception illegal argument exception if the key already exists public void put string key image image entry entry get entry key if entry null entry new entry put entry key entry if entry image null entry descriptor null throw new illegal argument exception image registry key already in use key non nls 1 entry image image entry descriptor new original image descriptor image manager get device try manager create entry descriptor catch device resource exception e illegalargumentexception getentry putentry illegalargumentexception imageregistry originalimagedescriptor getdevice deviceresourceexception removes an image from this registry if an swt image was allocated it is disposed this method has no effect if there is no image or descriptor for the given key param key the key public void remove string key image descriptor descriptor get descriptor key if descriptor null manager destroy descriptor get table remove key imagedescriptor getdescriptor gettable private entry get entry string key return entry get table get key getentry gettable private void put entry string key entry entry get table put key entry putentry gettable private map get table if table null table new hash map 10 return table gettable hashmap disposes this image registry disposing any images that were allocated for it and clearing its entries since 3 1 public void dispose manager cancel dispose exec dispose runnable if table null for iterator i table values iterator i has next entry entry entry i next if entry image null manager destroy image entry descriptor table null display null canceldisposeexec disposerunnable hasnext destroyimage private runnable dispose runnable new runnable public void run dispose disposerunnable private device original display public original image descriptor image original device original display this original original this original display original display originaldisplay originalimagedescriptor originaldisplay originaldisplay originaldisplay public object create resource device device throws device resource exception if device original display ref count return original return super create resource device createresource deviceresourceexception originaldisplay refcount createresource public void destroy resource object to dispose if original to dispose ref count if ref count 0 original dispose original null else super destroy resource to dispose destroyresource todispose todispose refcount refcount destroyresource todispose see org eclipse jface resource image descriptor get image data public image data get image data return original get image data imagedescriptor getimagedata imagedata getimagedata getimagedata creates an empty image registry p there must be an swt display created in the current thread before calling this method p public image registry this display get current imageregistry getcurrent creates an empty image registry using the given resource manager to allocate images param manager the resource manager used to allocate images since 3 1 public image registry resource manager manager assert is not null manager device dev manager get device if dev instanceof display this display display dev this manager manager manager dispose exec dispose runnable imageregistry resourcemanager isnotnull getdevice disposeexec disposerunnable creates an empty image registry param display this code display code must not be code null code and must not be disposed in order to use this registry public image registry display display this j face resources get resources display imageregistry jfaceresources getresources returns the image associated with the given key in this registry or code null code if none param key the key return the image or code null code if none public image get string key can be null if key null return null if display null note for backwards compatibility the following images are supported here they should never be disposed hence we explicitly return them rather then registering images that swt will dispose applications should go direclty to swt for these icons see display get system icon int id int swt key 1 if key equals dialog dlg img info swt key swt icon information if key equals dialog dlg img question swt key swt icon question if key equals dialog dlg img warning swt key swt icon warning if key equals dialog dlg img error swt key swt icon error if we actually just want to return an swt image do so without looking in the registry if swt key 1 final image image new image 1 final int id swt key display sync exec new runnable public void run image 0 display get system image id return image 0 entry entry get entry key if entry null return null if entry image null entry image manager create image with default entry descriptor return entry image getsystemicon swtkey dlg_img_info swtkey icon_information dlg_img_question swtkey icon_question dlg_img_warning swtkey icon_warning dlg_img_error swtkey icon_error swtkey swtkey syncexec getsystemimage getentry createimagewithdefault returns the descriptor associated with the given key in this registry or code null code if none param key the key return the descriptor or code null code if none since 2 1 public image descriptor get descriptor string key entry entry get entry key if entry null return null return entry descriptor imagedescriptor getdescriptor getentry adds or replaces an image descriptor to this registry the first time this new entry is retrieved the image descriptor s image will be computed via code image descriptor create image code and remembered this method replaces an existing image descriptor associated with the given key but fails if there is a real image associated with it param key the key param descriptor the image descriptor exception illegal argument exception if the key already exists public void put string key image descriptor descriptor entry entry get entry key if entry null entry new entry get table put key entry if entry image null throw new illegal argument exception image registry key already in use key non nls 1 entry descriptor descriptor imagedescriptor createimage imagedescriptor illegalargumentexception imagedescriptor getentry gettable illegalargumentexception imageregistry adds an image to this registry this method fails if there is already an image or descriptor for the given key p note that an image registry owns all of the image objects registered with it and automatically disposes of them when the swt display is disposed because of this clients must not register an image object that is managed by another object p param key the key param image the image exception illegal argument exception if the key already exists public void put string key image image entry entry get entry key if entry null entry new entry put entry key entry if entry image null entry descriptor null throw new illegal argument exception image registry key already in use key non nls 1 entry image image entry descriptor new original image descriptor image manager get device try manager create entry descriptor catch device resource exception e illegalargumentexception getentry putentry illegalargumentexception imageregistry originalimagedescriptor getdevice deviceresourceexception removes an image from this registry if an swt image was allocated it is disposed this method has no effect if there is no image or descriptor for the given key param key the key public void remove string key image descriptor descriptor get descriptor key if descriptor null manager destroy descriptor get table remove key imagedescriptor getdescriptor gettable private entry get entry string key return entry get table get key getentry gettable private void put entry string key entry entry get table put key entry putentry gettable private map get table if table null table new hash map 10 return table gettable hashmap disposes this image registry disposing any images that were allocated for it and clearing its entries since 3 1 public void dispose manager cancel dispose exec dispose runnable if table null for iterator i table values iterator i has next entry entry entry i next if entry image null manager destroy image entry descriptor table null display null canceldisposeexec disposerunnable hasnext destroyimage private runnable dispose runnable new runnable public void run dispose disposerunnable private device original display public original image descriptor image original device original display this original original this original display original display originaldisplay originalimagedescriptor originaldisplay originaldisplay originaldisplay public object create resource device device throws device resource exception if device original display ref count return original return super create resource device createresource deviceresourceexception originaldisplay refcount createresource public void destroy resource object to dispose if original to dispose ref count if ref count 0 original dispose original null else super destroy resource to dispose destroyresource todispose todispose refcount refcount destroyresource todispose see org eclipse jface resource image descriptor get image data public image data get image data return original get image data imagedescriptor getimagedata imagedata getimagedata getimagedata creates an empty image registry p there must be an swt display created in the current thread before calling this method p public image registry this display get current imageregistry getcurrent creates an empty image registry using the given resource manager to allocate images param manager the resource manager used to allocate images since 3 1 public image registry resource manager manager assert is not null manager device dev manager get device if dev instanceof display this display display dev this manager manager manager dispose exec dispose runnable imageregistry resourcemanager isnotnull getdevice disposeexec disposerunnable creates an empty image registry param display this code display code must not be code null code and must not be disposed in order to use this registry public image registry display display this j face resources get resources display imageregistry jfaceresources getresources returns the image associated with the given key in this registry or code null code if none param key the key return the image or code null code if none public image get string key can be null if key null return null if display null note for backwards compatibility the following images are supported here they should never be disposed hence we explicitly return them rather then registering images that swt will dispose applications should go direclty to swt for these icons see display get system icon int id int swt key 1 if key equals dialog dlg img info swt key swt icon information if key equals dialog dlg img question swt key swt icon question if key equals dialog dlg img warning swt key swt icon warning if key equals dialog dlg img error swt key swt icon error if we actually just want to return an swt image do so without looking in the registry if swt key 1 final image image new image 1 final int id swt key display sync exec new runnable public void run image 0 display get system image id return image 0 entry entry get entry key if entry null return null if entry image null entry image manager create image with default entry descriptor return entry image getsystemicon swtkey dlg_img_info swtkey icon_information dlg_img_question swtkey icon_question dlg_img_warning swtkey icon_warning dlg_img_error swtkey icon_error swtkey swtkey syncexec getsystemimage getentry createimagewithdefault returns the descriptor associated with the given key in this registry or code null code if none param key the key return the descriptor or code null code if none since 2 1 public image descriptor get descriptor string key entry entry get entry key if entry null return null return entry descriptor imagedescriptor getdescriptor getentry adds or replaces an image descriptor to this registry the first time this new entry is retrieved the image descriptor s image will be computed via code image descriptor create image code and remembered this method replaces an existing image descriptor associated with the given key but fails if there is a real image associated with it param key the key param descriptor the image descriptor exception illegal argument exception if the key already exists public void put string key image descriptor descriptor entry entry get entry key if entry null entry new entry get table put key entry if entry image null throw new illegal argument exception image registry key already in use key non nls 1 entry descriptor descriptor imagedescriptor createimage imagedescriptor illegalargumentexception imagedescriptor getentry gettable illegalargumentexception imageregistry adds an image to this registry this method fails if there is already an image or descriptor for the given key p note that an image registry owns all of the image objects registered with it and automatically disposes of them when the swt display is disposed because of this clients must not register an image object that is managed by another object p param key the key param image the image exception illegal argument exception if the key already exists public void put string key image image entry entry get entry key if entry null entry new entry put entry key entry if entry image null entry descriptor null throw new illegal argument exception image registry key already in use key non nls 1 entry image image entry descriptor new original image descriptor image manager get device try manager create entry descriptor catch device resource exception e illegalargumentexception getentry putentry illegalargumentexception imageregistry originalimagedescriptor getdevice deviceresourceexception removes an image from this registry if an swt image was allocated it is disposed this method has no effect if there is no image or descriptor for the given key param key the key public void remove string key image descriptor descriptor get descriptor key if descriptor null manager destroy descriptor get table remove key imagedescriptor getdescriptor gettable private entry get entry string key return entry get table get key getentry gettable private void put entry string key entry entry get table put key entry putentry gettable private map get table if table null table new hash map 10 return table gettable hashmap disposes this image registry disposing any images that were allocated for it and clearing its entries since 3 1 public void dispose manager cancel dispose exec dispose runnable if table null for iterator i table values iterator i has next entry entry entry i next if entry image null manager destroy image entry descriptor table null display null canceldisposeexec disposerunnable hasnext destroyimage private runnable dispose runnable new runnable public void run dispose disposerunnable private device original display public original image descriptor image original device original display this original original this original display original display originaldisplay originalimagedescriptor originaldisplay originaldisplay originaldisplay public object create resource device device throws device resource exception if device original display ref count return original return super create resource device createresource deviceresourceexception originaldisplay refcount createresource public void destroy resource object to dispose if original to dispose ref count if ref count 0 original dispose original null else super destroy resource to dispose destroyresource todispose todispose refcount refcount destroyresource todispose see org eclipse jface resource image descriptor get image data public image data get image data return original get image data imagedescriptor getimagedata imagedata getimagedata getimagedata creates an empty image registry p there must be an swt display created in the current thread before calling this method p public image registry this display get current imageregistry getcurrent creates an empty image registry using the given resource manager to allocate images param manager the resource manager used to allocate images since 3 1 public image registry resource manager manager assert is not null manager device dev manager get device if dev instanceof display this display display dev this manager manager manager dispose exec dispose runnable imageregistry resourcemanager isnotnull getdevice disposeexec disposerunnable creates an empty image registry param display this code display code must not be code null code and must not be disposed in order to use this registry public image registry display display this j face resources get resources display imageregistry jfaceresources getresources returns the image associated with the given key in this registry or code null code if none param key the key return the image or code null code if none public image get string key can be null if key null return null if display null note for backwards compatibility the following images are supported here they should never be disposed hence we explicitly return them rather then registering images that swt will dispose applications should go direclty to swt for these icons see display get system icon int id int swt key 1 if key equals dialog dlg img info swt key swt icon information if key equals dialog dlg img question swt key swt icon question if key equals dialog dlg img warning swt key swt icon warning if key equals dialog dlg img error swt key swt icon error if we actually just want to return an swt image do so without looking in the registry if swt key 1 final image image new image 1 final int id swt key display sync exec new runnable public void run image 0 display get system image id return image 0 entry entry get entry key if entry null return null if entry image null entry image manager create image with default entry descriptor return entry image getsystemicon swtkey dlg_img_info swtkey icon_information dlg_img_question swtkey icon_question dlg_img_warning swtkey icon_warning dlg_img_error swtkey icon_error swtkey swtkey syncexec getsystemimage getentry createimagewithdefault returns the descriptor associated with the given key in this registry or code null code if none param key the key return the descriptor or code null code if none since 2 1 public image descriptor get descriptor string key entry entry get entry key if entry null return null return entry descriptor imagedescriptor getdescriptor getentry adds or replaces an image descriptor to this registry the first time this new entry is retrieved the image descriptor s image will be computed via code image descriptor create image code and remembered this method replaces an existing image descriptor associated with the given key but fails if there is a real image associated with it param key the key param descriptor the image descriptor exception illegal argument exception if the key already exists public void put string key image descriptor descriptor entry entry get entry key if entry null entry new entry get table put key entry if entry image null throw new illegal argument exception image registry key already in use key non nls 1 entry descriptor descriptor imagedescriptor createimage imagedescriptor illegalargumentexception imagedescriptor getentry gettable illegalargumentexception imageregistry adds an image to this registry this method fails if there is already an image or descriptor for the given key p note that an image registry owns all of the image objects registered with it and automatically disposes of them when the swt display is disposed because of this clients must not register an image object that is managed by another object p param key the key param image the image exception illegal argument exception if the key already exists public void put string key image image entry entry get entry key if entry null entry new entry put entry key entry if entry image null entry descriptor null throw new illegal argument exception image registry key already in use key non nls 1 entry image image entry descriptor new original image descriptor image manager get device try manager create entry descriptor catch device resource exception e illegalargumentexception getentry putentry illegalargumentexception imageregistry originalimagedescriptor getdevice deviceresourceexception removes an image from this registry if an swt image was allocated it is disposed this method has no effect if there is no image or descriptor for the given key param key the key public void remove string key image descriptor descriptor get descriptor key if descriptor null manager destroy descriptor get table remove key imagedescriptor getdescriptor gettable private entry get entry string key return entry get table get key getentry gettable private void put entry string key entry entry get table put key entry putentry gettable private map get table if table null table new hash map 10 return table gettable hashmap disposes this image registry disposing any images that were allocated for it and clearing its entries since 3 1 public void dispose manager cancel dispose exec dispose runnable if table null for iterator i table values iterator i has next entry entry entry i next if entry image null manager destroy image entry descriptor table null display null canceldisposeexec disposerunnable hasnext destroyimage private runnable dispose runnable new runnable public void run dispose disposerunnable private device original display public original image descriptor image original device original display this original original this original display original display originaldisplay originalimagedescriptor originaldisplay originaldisplay originaldisplay public object create resource device device throws device resource exception if device original display ref count return original return super create resource device createresource deviceresourceexception originaldisplay refcount createresource public void destroy resource object to dispose if original to dispose ref count if ref count 0 original dispose original null else super destroy resource to dispose destroyresource todispose todispose refcount refcount destroyresource todispose see org eclipse jface resource image descriptor get image data public image data get image data return original get image data imagedescriptor getimagedata imagedata getimagedata getimagedata creates an empty image registry p there must be an swt display created in the current thread before calling this method p public image registry this display get current imageregistry getcurrent creates an empty image registry using the given resource manager to allocate images param manager the resource manager used to allocate images since 3 1 public image registry resource manager manager assert is not null manager device dev manager get device if dev instanceof display this display display dev this manager manager manager dispose exec dispose runnable imageregistry resourcemanager isnotnull getdevice disposeexec disposerunnable creates an empty image registry param display this code display code must not be code null code and must not be disposed in order to use this registry public image registry display display this j face resources get resources display imageregistry jfaceresources getresources returns the image associated with the given key in this registry or code null code if none param key the key return the image or code null code if none public image get string key can be null if key null return null if display null note for backwards compatibility the following images are supported here they should never be disposed hence we explicitly return them rather then registering images that swt will dispose applications should go direclty to swt for these icons see display get system icon int id int swt key 1 if key equals dialog dlg img info swt key swt icon information if key equals dialog dlg img question swt key swt icon question if key equals dialog dlg img warning swt key swt icon warning if key equals dialog dlg img error swt key swt icon error if we actually just want to return an swt image do so without looking in the registry if swt key 1 final image image new image 1 final int id swt key display sync exec new runnable public void run image 0 display get system image id return image 0 entry entry get entry key if entry null return null if entry image null entry image manager create image with default entry descriptor return entry image getsystemicon swtkey dlg_img_info swtkey icon_information dlg_img_question swtkey icon_question dlg_img_warning swtkey icon_warning dlg_img_error swtkey icon_error swtkey swtkey syncexec getsystemimage getentry createimagewithdefault final int id swt key display sync exec new runnable public void run image 0 display get system image id swtkey syncexec getsystemimage returns the descriptor associated with the given key in this registry or code null code if none param key the key return the descriptor or code null code if none since 2 1 public image descriptor get descriptor string key entry entry get entry key if entry null return null return entry descriptor imagedescriptor getdescriptor getentry adds or replaces an image descriptor to this registry the first time this new entry is retrieved the image descriptor s image will be computed via code image descriptor create image code and remembered this method replaces an existing image descriptor associated with the given key but fails if there is a real image associated with it param key the key param descriptor the image descriptor exception illegal argument exception if the key already exists public void put string key image descriptor descriptor entry entry get entry key if entry null entry new entry get table put key entry if entry image null throw new illegal argument exception image registry key already in use key non nls 1 entry descriptor descriptor imagedescriptor createimage imagedescriptor illegalargumentexception imagedescriptor getentry gettable illegalargumentexception imageregistry adds an image to this registry this method fails if there is already an image or descriptor for the given key p note that an image registry owns all of the image objects registered with it and automatically disposes of them when the swt display is disposed because of this clients must not register an image object that is managed by another object p param key the key param image the image exception illegal argument exception if the key already exists public void put string key image image entry entry get entry key if entry null entry new entry put entry key entry if entry image null entry descriptor null throw new illegal argument exception image registry key already in use key non nls 1 entry image image entry descriptor new original image descriptor image manager get device try manager create entry descriptor catch device resource exception e illegalargumentexception getentry putentry illegalargumentexception imageregistry originalimagedescriptor getdevice deviceresourceexception removes an image from this registry if an swt image was allocated it is disposed this method has no effect if there is no image or descriptor for the given key param key the key public void remove string key image descriptor descriptor get descriptor key if descriptor null manager destroy descriptor get table remove key imagedescriptor getdescriptor gettable private entry get entry string key return entry get table get key getentry gettable private void put entry string key entry entry get table put key entry putentry gettable private map get table if table null table new hash map 10 return table gettable hashmap disposes this image registry disposing any images that were allocated for it and clearing its entries since 3 1 public void dispose manager cancel dispose exec dispose runnable if table null for iterator i table values iterator i has next entry entry entry i next if entry image null manager destroy image entry descriptor table null display null canceldisposeexec disposerunnable hasnext destroyimage private runnable dispose runnable new runnable public void run dispose disposerunnable private device original display public original image descriptor image original device original display this original original this original display original display originaldisplay originalimagedescriptor originaldisplay originaldisplay originaldisplay public object create resource device device throws device resource exception if device original display ref count return original return super create resource device createresource deviceresourceexception originaldisplay refcount createresource public void destroy resource object to dispose if original to dispose ref count if ref count 0 original dispose original null else super destroy resource to dispose destroyresource todispose todispose refcount refcount destroyresource todispose see org eclipse jface resource image descriptor get image data public image data get image data return original get image data imagedescriptor getimagedata imagedata getimagedata getimagedata creates an empty image registry p there must be an swt display created in the current thread before calling this method p public image registry this display get current imageregistry getcurrent creates an empty image registry using the given resource manager to allocate images param manager the resource manager used to allocate images since 3 1 public image registry resource manager manager assert is not null manager device dev manager get device if dev instanceof display this display display dev this manager manager manager dispose exec dispose runnable imageregistry resourcemanager isnotnull getdevice disposeexec disposerunnable creates an empty image registry param display this code display code must not be code null code and must not be disposed in order to use this registry public image registry display display this j face resources get resources display imageregistry jfaceresources getresources returns the image associated with the given key in this registry or code null code if none param key the key return the image or code null code if none public image get string key can be null if key null return null if display null note for backwards compatibility the following images are supported here they should never be disposed hence we explicitly return them rather then registering images that swt will dispose applications should go direclty to swt for these icons see display get system icon int id int swt key 1 if key equals dialog dlg img info swt key swt icon information if key equals dialog dlg img question swt key swt icon question if key equals dialog dlg img warning swt key swt icon warning if key equals dialog dlg img error swt key swt icon error if we actually just want to return an swt image do so without looking in the registry if swt key 1 final image image new image 1 final int id swt key display sync exec new runnable public void run image 0 display get system image id return image 0 entry entry get entry key if entry null return null if entry image null entry image manager create image with default entry descriptor return entry image getsystemicon swtkey dlg_img_info swtkey icon_information dlg_img_question swtkey icon_question dlg_img_warning swtkey icon_warning dlg_img_error swtkey icon_error swtkey swtkey syncexec getsystemimage getentry createimagewithdefault returns the descriptor associated with the given key in this registry or code null code if none param key the key return the descriptor or code null code if none since 2 1 public image descriptor get descriptor string key entry entry get entry key if entry null return null return entry descriptor imagedescriptor getdescriptor getentry adds or replaces an image descriptor to this registry the first time this new entry is retrieved the image descriptor s image will be computed via code image descriptor create image code and remembered this method replaces an existing image descriptor associated with the given key but fails if there is a real image associated with it param key the key param descriptor the image descriptor exception illegal argument exception if the key already exists public void put string key image descriptor descriptor entry entry get entry key if entry null entry new entry get table put key entry if entry image null throw new illegal argument exception image registry key already in use key non nls 1 entry descriptor descriptor imagedescriptor createimage imagedescriptor illegalargumentexception imagedescriptor getentry gettable illegalargumentexception imageregistry adds an image to this registry this method fails if there is already an image or descriptor for the given key p note that an image registry owns all of the image objects registered with it and automatically disposes of them when the swt display is disposed because of this clients must not register an image object that is managed by another object p param key the key param image the image exception illegal argument exception if the key already exists public void put string key image image entry entry get entry key if entry null entry new entry put entry key entry if entry image null entry descriptor null throw new illegal argument exception image registry key already in use key non nls 1 entry image image entry descriptor new original image descriptor image manager get device try manager create entry descriptor catch device resource exception e illegalargumentexception getentry putentry illegalargumentexception imageregistry originalimagedescriptor getdevice deviceresourceexception removes an image from this registry if an swt image was allocated it is disposed this method has no effect if there is no image or descriptor for the given key param key the key public void remove string key image descriptor descriptor get descriptor key if descriptor null manager destroy descriptor get table remove key imagedescriptor getdescriptor gettable private entry get entry string key return entry get table get key getentry gettable private void put entry string key entry entry get table put key entry putentry gettable private map get table if table null table new hash map 10 return table gettable hashmap disposes this image registry disposing any images that were allocated for it and clearing its entries since 3 1 public void dispose manager cancel dispose exec dispose runnable if table null for iterator i table values iterator i has next entry entry entry i next if entry image null manager destroy image entry descriptor table null display null canceldisposeexec disposerunnable hasnext destroyimage private runnable dispose runnable new runnable public void run dispose disposerunnable private device original display public original image descriptor image original device original display this original original this original display original display originaldisplay originalimagedescriptor originaldisplay originaldisplay originaldisplay public object create resource device device throws device resource exception if device original display ref count return original return super create resource device createresource deviceresourceexception originaldisplay refcount createresource public void destroy resource object to dispose if original to dispose ref count if ref count 0 original dispose original null else super destroy resource to dispose destroyresource todispose todispose refcount refcount destroyresource todispose see org eclipse jface resource image descriptor get image data public image data get image data return original get image data imagedescriptor getimagedata imagedata getimagedata getimagedata creates an empty image registry p there must be an swt display created in the current thread before calling this method p public image registry this display get current imageregistry getcurrent creates an empty image registry using the given resource manager to allocate images param manager the resource manager used to allocate images since 3 1 public image registry resource manager manager assert is not null manager device dev manager get device if dev instanceof display this display display dev this manager manager manager dispose exec dispose runnable imageregistry resourcemanager isnotnull getdevice disposeexec disposerunnable creates an empty image registry param display this code display code must not be code null code and must not be disposed in order to use this registry public image registry display display this j face resources get resources display imageregistry jfaceresources getresources returns the image associated with the given key in this registry or code null code if none param key the key return the image or code null code if none public image get string key can be null if key null return null if display null note for backwards compatibility the following images are supported here they should never be disposed hence we explicitly return them rather then registering images that swt will dispose applications should go direclty to swt for these icons see display get system icon int id int swt key 1 if key equals dialog dlg img info swt key swt icon information if key equals dialog dlg img question swt key swt icon question if key equals dialog dlg img warning swt key swt icon warning if key equals dialog dlg img error swt key swt icon error if we actually just want to return an swt image do so without looking in the registry if swt key 1 final image image new image 1 final int id swt key display sync exec new runnable public void run image 0 display get system image id return image 0 entry entry get entry key if entry null return null if entry image null entry image manager create image with default entry descriptor return entry image getsystemicon swtkey dlg_img_info swtkey icon_information dlg_img_question swtkey icon_question dlg_img_warning swtkey icon_warning dlg_img_error swtkey icon_error swtkey swtkey syncexec getsystemimage getentry createimagewithdefault returns the descriptor associated with the given key in this registry or code null code if none param key the key return the descriptor or code null code if none since 2 1 public image descriptor get descriptor string key entry entry get entry key if entry null return null return entry descriptor imagedescriptor getdescriptor getentry adds or replaces an image descriptor to this registry the first time this new entry is retrieved the image descriptor s image will be computed via code image descriptor create image code and remembered this method replaces an existing image descriptor associated with the given key but fails if there is a real image associated with it param key the key param descriptor the image descriptor exception illegal argument exception if the key already exists public void put string key image descriptor descriptor entry entry get entry key if entry null entry new entry get table put key entry if entry image null throw new illegal argument exception image registry key already in use key non nls 1 entry descriptor descriptor imagedescriptor createimage imagedescriptor illegalargumentexception imagedescriptor getentry gettable illegalargumentexception imageregistry adds an image to this registry this method fails if there is already an image or descriptor for the given key p note that an image registry owns all of the image objects registered with it and automatically disposes of them when the swt display is disposed because of this clients must not register an image object that is managed by another object p param key the key param image the image exception illegal argument exception if the key already exists public void put string key image image entry entry get entry key if entry null entry new entry put entry key entry if entry image null entry descriptor null throw new illegal argument exception image registry key already in use key non nls 1 entry image image entry descriptor new original image descriptor image manager get device try manager create entry descriptor catch device resource exception e illegalargumentexception getentry putentry illegalargumentexception imageregistry originalimagedescriptor getdevice deviceresourceexception removes an image from this registry if an swt image was allocated it is disposed this method has no effect if there is no image or descriptor for the given key param key the key public void remove string key image descriptor descriptor get descriptor key if descriptor null manager destroy descriptor get table remove key imagedescriptor getdescriptor gettable private entry get entry string key return entry get table get key getentry gettable private void put entry string key entry entry get table put key entry putentry gettable private map get table if table null table new hash map 10 return table gettable hashmap disposes this image registry disposing any images that were allocated for it and clearing its entries since 3 1 public void dispose manager cancel dispose exec dispose runnable if table null for iterator i table values iterator i has next entry entry entry i next if entry image null manager destroy image entry descriptor table null display null canceldisposeexec disposerunnable hasnext destroyimage private runnable dispose runnable new runnable public void run dispose disposerunnable private device original display public original image descriptor image original device original display this original original this original display original display originaldisplay originalimagedescriptor originaldisplay originaldisplay originaldisplay public object create resource device device throws device resource exception if device original display ref count return original return super create resource device createresource deviceresourceexception originaldisplay refcount createresource public void destroy resource object to dispose if original to dispose ref count if ref count 0 original dispose original null else super destroy resource to dispose destroyresource todispose todispose refcount refcount destroyresource todispose see org eclipse jface resource image descriptor get image data public image data get image data return original get image data imagedescriptor getimagedata imagedata getimagedata getimagedata creates an empty image registry p there must be an swt display created in the current thread before calling this method p public image registry this display get current imageregistry getcurrent creates an empty image registry using the given resource manager to allocate images param manager the resource manager used to allocate images since 3 1 public image registry resource manager manager assert is not null manager device dev manager get device if dev instanceof display this display display dev this manager manager manager dispose exec dispose runnable imageregistry resourcemanager isnotnull getdevice disposeexec disposerunnable creates an empty image registry param display this code display code must not be code null code and must not be disposed in order to use this registry public image registry display display this j face resources get resources display imageregistry jfaceresources getresources returns the image associated with the given key in this registry or code null code if none param key the key return the image or code null code if none public image get string key can be null if key null return null if display null note for backwards compatibility the following images are supported here they should never be disposed hence we explicitly return them rather then registering images that swt will dispose applications should go direclty to swt for these icons see display get system icon int id int swt key 1 if key equals dialog dlg img info swt key swt icon information if key equals dialog dlg img question swt key swt icon question if key equals dialog dlg img warning swt key swt icon warning if key equals dialog dlg img error swt key swt icon error if we actually just want to return an swt image do so without looking in the registry if swt key 1 final image image new image 1 final int id swt key display sync exec new runnable public void run image 0 display get system image id return image 0 entry entry get entry key if entry null return null if entry image null entry image manager create image with default entry descriptor return entry image getsystemicon swtkey dlg_img_info swtkey icon_information dlg_img_question swtkey icon_question dlg_img_warning swtkey icon_warning dlg_img_error swtkey icon_error swtkey swtkey syncexec getsystemimage getentry createimagewithdefault final int id swt key display sync exec new runnable public void run image 0 display get system image id swtkey syncexec getsystemimage returns the descriptor associated with the given key in this registry or code null code if none param key the key return the descriptor or code null code if none since 2 1 public image descriptor get descriptor string key entry entry get entry key if entry null return null return entry descriptor imagedescriptor getdescriptor getentry adds or replaces an image descriptor to this registry the first time this new entry is retrieved the image descriptor s image will be computed via code image descriptor create image code and remembered this method replaces an existing image descriptor associated with the given key but fails if there is a real image associated with it param key the key param descriptor the image descriptor exception illegal argument exception if the key already exists public void put string key image descriptor descriptor entry entry get entry key if entry null entry new entry get table put key entry if entry image null throw new illegal argument exception image registry key already in use key non nls 1 entry descriptor descriptor imagedescriptor createimage imagedescriptor illegalargumentexception imagedescriptor getentry gettable illegalargumentexception imageregistry adds an image to this registry this method fails if there is already an image or descriptor for the given key p note that an image registry owns all of the image objects registered with it and automatically disposes of them when the swt display is disposed because of this clients must not register an image object that is managed by another object p param key the key param image the image exception illegal argument exception if the key already exists public void put string key image image entry entry get entry key if entry null entry new entry put entry key entry if entry image null entry descriptor null throw new illegal argument exception image registry key already in use key non nls 1 entry image image entry descriptor new original image descriptor image manager get device try manager create entry descriptor catch device resource exception e illegalargumentexception getentry putentry illegalargumentexception imageregistry originalimagedescriptor getdevice deviceresourceexception removes an image from this registry if an swt image was allocated it is disposed this method has no effect if there is no image or descriptor for the given key param key the key public void remove string key image descriptor descriptor get descriptor key if descriptor null manager destroy descriptor get table remove key imagedescriptor getdescriptor gettable private entry get entry string key return entry get table get key getentry gettable private void put entry string key entry entry get table put key entry putentry gettable private map get table if table null table new hash map 10 return table gettable hashmap disposes this image registry disposing any images that were allocated for it and clearing its entries since 3 1 public void dispose manager cancel dispose exec dispose runnable if table null for iterator i table values iterator i has next entry entry entry i next if entry image null manager destroy image entry descriptor table null display null canceldisposeexec disposerunnable hasnext destroyimage private runnable dispose runnable new runnable public void run dispose disposerunnable private device original display public original image descriptor image original device original display this original original this original display original display originaldisplay originalimagedescriptor originaldisplay originaldisplay originaldisplay public object create resource device device throws device resource exception if device original display ref count return original return super create resource device createresource deviceresourceexception originaldisplay refcount createresource public void destroy resource object to dispose if original to dispose ref count if ref count 0 original dispose original null else super destroy resource to dispose destroyresource todispose todispose refcount refcount destroyresource todispose see org eclipse jface resource image descriptor get image data public image data get image data return original get image data imagedescriptor getimagedata imagedata getimagedata getimagedata creates an empty image registry p there must be an swt display created in the current thread before calling this method p public image registry this display get current imageregistry getcurrent creates an empty image registry using the given resource manager to allocate images param manager the resource manager used to allocate images since 3 1 public image registry resource manager manager assert is not null manager device dev manager get device if dev instanceof display this display display dev this manager manager manager dispose exec dispose runnable imageregistry resourcemanager isnotnull getdevice disposeexec disposerunnable creates an empty image registry param display this code display code must not be code null code and must not be disposed in order to use this registry public image registry display display this j face resources get resources display imageregistry jfaceresources getresources returns the image associated with the given key in this registry or code null code if none param key the key return the image or code null code if none public image get string key can be null if key null return null if display null note for backwards compatibility the following images are supported here they should never be disposed hence we explicitly return them rather then registering images that swt will dispose applications should go direclty to swt for these icons see display get system icon int id int swt key 1 if key equals dialog dlg img info swt key swt icon information if key equals dialog dlg img question swt key swt icon question if key equals dialog dlg img warning swt key swt icon warning if key equals dialog dlg img error swt key swt icon error if we actually just want to return an swt image do so without looking in the registry if swt key 1 final image image new image 1 final int id swt key display sync exec new runnable public void run image 0 display get system image id return image 0 entry entry get entry key if entry null return null if entry image null entry image manager create image with default entry descriptor return entry image getsystemicon swtkey dlg_img_info swtkey icon_information dlg_img_question swtkey icon_question dlg_img_warning swtkey icon_warning dlg_img_error swtkey icon_error swtkey swtkey syncexec getsystemimage getentry createimagewithdefault final int id swt key display sync exec new runnable public void run image 0 display get system image id swtkey syncexec getsystemimage returns the descriptor associated with the given key in this registry or code null code if none param key the key return the descriptor or code null code if none since 2 1 public image descriptor get descriptor string key entry entry get entry key if entry null return null return entry descriptor imagedescriptor getdescriptor getentry adds or replaces an image descriptor to this registry the first time this new entry is retrieved the image descriptor s image will be computed via code image descriptor create image code and remembered this method replaces an existing image descriptor associated with the given key but fails if there is a real image associated with it param key the key param descriptor the image descriptor exception illegal argument exception if the key already exists public void put string key image descriptor descriptor entry entry get entry key if entry null entry new entry get table put key entry if entry image null throw new illegal argument exception image registry key already in use key non nls 1 entry descriptor descriptor imagedescriptor createimage imagedescriptor illegalargumentexception imagedescriptor getentry gettable illegalargumentexception imageregistry adds an image to this registry this method fails if there is already an image or descriptor for the given key p note that an image registry owns all of the image objects registered with it and automatically disposes of them when the swt display is disposed because of this clients must not register an image object that is managed by another object p param key the key param image the image exception illegal argument exception if the key already exists public void put string key image image entry entry get entry key if entry null entry new entry put entry key entry if entry image null entry descriptor null throw new illegal argument exception image registry key already in use key non nls 1 entry image image entry descriptor new original image descriptor image manager get device try manager create entry descriptor catch device resource exception e illegalargumentexception getentry putentry illegalargumentexception imageregistry originalimagedescriptor getdevice deviceresourceexception removes an image from this registry if an swt image was allocated it is disposed this method has no effect if there is no image or descriptor for the given key param key the key public void remove string key image descriptor descriptor get descriptor key if descriptor null manager destroy descriptor get table remove key imagedescriptor getdescriptor gettable private entry get entry string key return entry get table get key getentry gettable private void put entry string key entry entry get table put key entry putentry gettable private map get table if table null table new hash map 10 return table gettable hashmap disposes this image registry disposing any images that were allocated for it and clearing its entries since 3 1 public void dispose manager cancel dispose exec dispose runnable if table null for iterator i table values iterator i has next entry entry entry i next if entry image null manager destroy image entry descriptor table null display null canceldisposeexec disposerunnable hasnext destroyimage private runnable dispose runnable new runnable public void run dispose disposerunnable private device original display public original image descriptor image original device original display this original original this original display original display originaldisplay originalimagedescriptor originaldisplay originaldisplay originaldisplay public object create resource device device throws device resource exception if device original display ref count return original return super create resource device createresource deviceresourceexception originaldisplay refcount createresource public void destroy resource object to dispose if original to dispose ref count if ref count 0 original dispose original null else super destroy resource to dispose destroyresource todispose todispose refcount refcount destroyresource todispose see org eclipse jface resource image descriptor get image data public image data get image data return original get image data imagedescriptor getimagedata imagedata getimagedata getimagedata creates an empty image registry p there must be an swt display created in the current thread before calling this method p public image registry this display get current imageregistry getcurrent creates an empty image registry using the given resource manager to allocate images param manager the resource manager used to allocate images since 3 1 public image registry resource manager manager assert is not null manager device dev manager get device if dev instanceof display this display display dev this manager manager manager dispose exec dispose runnable imageregistry resourcemanager isnotnull getdevice disposeexec disposerunnable creates an empty image registry param display this code display code must not be code null code and must not be disposed in order to use this registry public image registry display display this j face resources get resources display imageregistry jfaceresources getresources returns the image associated with the given key in this registry or code null code if none param key the key return the image or code null code if none public image get string key can be null if key null return null if display null note for backwards compatibility the following images are supported here they should never be disposed hence we explicitly return them rather then registering images that swt will dispose applications should go direclty to swt for these icons see display get system icon int id int swt key 1 if key equals dialog dlg img info swt key swt icon information if key equals dialog dlg img question swt key swt icon question if key equals dialog dlg img warning swt key swt icon warning if key equals dialog dlg img error swt key swt icon error if we actually just want to return an swt image do so without looking in the registry if swt key 1 final image image new image 1 final int id swt key display sync exec new runnable public void run image 0 display get system image id return image 0 entry entry get entry key if entry null return null if entry image null entry image manager create image with default entry descriptor return entry image getsystemicon swtkey dlg_img_info swtkey icon_information dlg_img_question swtkey icon_question dlg_img_warning swtkey icon_warning dlg_img_error swtkey icon_error swtkey swtkey syncexec getsystemimage getentry createimagewithdefault returns the descriptor associated with the given key in this registry or code null code if none param key the key return the descriptor or code null code if none since 2 1 public image descriptor get descriptor string key entry entry get entry key if entry null return null return entry descriptor imagedescriptor getdescriptor getentry adds or replaces an image descriptor to this registry the first time this new entry is retrieved the image descriptor s image will be computed via code image descriptor create image code and remembered this method replaces an existing image descriptor associated with the given key but fails if there is a real image associated with it param key the key param descriptor the image descriptor exception illegal argument exception if the key already exists public void put string key image descriptor descriptor entry entry get entry key if entry null entry new entry get table put key entry if entry image null throw new illegal argument exception image registry key already in use key non nls 1 entry descriptor descriptor imagedescriptor createimage imagedescriptor illegalargumentexception imagedescriptor getentry gettable illegalargumentexception imageregistry adds an image to this registry this method fails if there is already an image or descriptor for the given key p note that an image registry owns all of the image objects registered with it and automatically disposes of them when the swt display is disposed because of this clients must not register an image object that is managed by another object p param key the key param image the image exception illegal argument exception if the key already exists public void put string key image image entry entry get entry key if entry null entry new entry put entry key entry if entry image null entry descriptor null throw new illegal argument exception image registry key already in use key non nls 1 entry image image entry descriptor new original image descriptor image manager get device try manager create entry descriptor catch device resource exception e illegalargumentexception getentry putentry illegalargumentexception imageregistry originalimagedescriptor getdevice deviceresourceexception removes an image from this registry if an swt image was allocated it is disposed this method has no effect if there is no image or descriptor for the given key param key the key public void remove string key image descriptor descriptor get descriptor key if descriptor null manager destroy descriptor get table remove key imagedescriptor getdescriptor gettable private entry get entry string key return entry get table get key getentry gettable private void put entry string key entry entry get table put key entry putentry gettable private map get table if table null table new hash map 10 return table gettable hashmap disposes this image registry disposing any images that were allocated for it and clearing its entries since 3 1 public void dispose manager cancel dispose exec dispose runnable if table null for iterator i table values iterator i has next entry entry entry i next if entry image null manager destroy image entry descriptor table null display null canceldisposeexec disposerunnable hasnext destroyimage private runnable dispose runnable new runnable public void run dispose disposerunnable private device original display public original image descriptor image original device original display this original original this original display original display originaldisplay originalimagedescriptor originaldisplay originaldisplay originaldisplay public object create resource device device throws device resource exception if device original display ref count return original return super create resource device createresource deviceresourceexception originaldisplay refcount createresource public void destroy resource object to dispose if original to dispose ref count if ref count 0 original dispose original null else super destroy resource to dispose destroyresource todispose todispose refcount refcount destroyresource todispose see org eclipse jface resource image descriptor get image data public image data get image data return original get image data imagedescriptor getimagedata imagedata getimagedata getimagedata creates an empty image registry p there must be an swt display created in the current thread before calling this method p public image registry this display get current imageregistry getcurrent creates an empty image registry using the given resource manager to allocate images param manager the resource manager used to allocate images since 3 1 public image registry resource manager manager assert is not null manager device dev manager get device if dev instanceof display this display display dev this manager manager manager dispose exec dispose runnable imageregistry resourcemanager isnotnull getdevice disposeexec disposerunnable creates an empty image registry param display this code display code must not be code null code and must not be disposed in order to use this registry public image registry display display this j face resources get resources display imageregistry jfaceresources getresources returns the image associated with the given key in this registry or code null code if none param key the key return the image or code null code if none public image get string key can be null if key null return null if display null note for backwards compatibility the following images are supported here they should never be disposed hence we explicitly return them rather then registering images that swt will dispose applications should go direclty to swt for these icons see display get system icon int id int swt key 1 if key equals dialog dlg img info swt key swt icon information if key equals dialog dlg img question swt key swt icon question if key equals dialog dlg img warning swt key swt icon warning if key equals dialog dlg img error swt key swt icon error if we actually just want to return an swt image do so without looking in the registry if swt key 1 final image image new image 1 final int id swt key display sync exec new runnable public void run image 0 display get system image id return image 0 entry entry get entry key if entry null return null if entry image null entry image manager create image with default entry descriptor return entry image getsystemicon swtkey dlg_img_info swtkey icon_information dlg_img_question swtkey icon_question dlg_img_warning swtkey icon_warning dlg_img_error swtkey icon_error swtkey swtkey syncexec getsystemimage getentry createimagewithdefault final int id swt key display sync exec new runnable public void run image 0 display get system image id swtkey syncexec getsystemimage returns the descriptor associated with the given key in this registry or code null code if none param key the key return the descriptor or code null code if none since 2 1 public image descriptor get descriptor string key entry entry get entry key if entry null return null return entry descriptor imagedescriptor getdescriptor getentry adds or replaces an image descriptor to this registry the first time this new entry is retrieved the image descriptor s image will be computed via code image descriptor create image code and remembered this method replaces an existing image descriptor associated with the given key but fails if there is a real image associated with it param key the key param descriptor the image descriptor exception illegal argument exception if the key already exists public void put string key image descriptor descriptor entry entry get entry key if entry null entry new entry get table put key entry if entry image null throw new illegal argument exception image registry key already in use key non nls 1 entry descriptor descriptor imagedescriptor createimage imagedescriptor illegalargumentexception imagedescriptor getentry gettable illegalargumentexception imageregistry adds an image to this registry this method fails if there is already an image or descriptor for the given key p note that an image registry owns all of the image objects registered with it and automatically disposes of them when the swt display is disposed because of this clients must not register an image object that is managed by another object p param key the key param image the image exception illegal argument exception if the key already exists public void put string key image image entry entry get entry key if entry null entry new entry put entry key entry if entry image null entry descriptor null throw new illegal argument exception image registry key already in use key non nls 1 entry image image entry descriptor new original image descriptor image manager get device try manager create entry descriptor catch device resource exception e illegalargumentexception getentry putentry illegalargumentexception imageregistry originalimagedescriptor getdevice deviceresourceexception removes an image from this registry if an swt image was allocated it is disposed this method has no effect if there is no image or descriptor for the given key param key the key public void remove string key image descriptor descriptor get descriptor key if descriptor null manager destroy descriptor get table remove key imagedescriptor getdescriptor gettable private entry get entry string key return entry get table get key getentry gettable private void put entry string key entry entry get table put key entry putentry gettable private map get table if table null table new hash map 10 return table gettable hashmap disposes this image registry disposing any images that were allocated for it and clearing its entries since 3 1 public void dispose manager cancel dispose exec dispose runnable if table null for iterator i table values iterator i has next entry entry entry i next if entry image null manager destroy image entry descriptor table null display null canceldisposeexec disposerunnable hasnext destroyimage private runnable dispose runnable new runnable public void run dispose disposerunnable private device original display public original image descriptor image original device original display this original original this original display original display originaldisplay originalimagedescriptor originaldisplay originaldisplay originaldisplay public object create resource device device throws device resource exception if device original display ref count return original return super create resource device createresource deviceresourceexception originaldisplay refcount createresource public void destroy resource object to dispose if original to dispose ref count if ref count 0 original dispose original null else super destroy resource to dispose destroyresource todispose todispose refcount refcount destroyresource todispose see org eclipse jface resource image descriptor get image data public image data get image data return original get image data imagedescriptor getimagedata imagedata getimagedata getimagedata creates an empty image registry p there must be an swt display created in the current thread before calling this method p public image registry this display get current imageregistry getcurrent creates an empty image registry using the given resource manager to allocate images param manager the resource manager used to allocate images since 3 1 public image registry resource manager manager assert is not null manager device dev manager get device if dev instanceof display this display display dev this manager manager manager dispose exec dispose runnable imageregistry resourcemanager isnotnull getdevice disposeexec disposerunnable creates an empty image registry param display this code display code must not be code null code and must not be disposed in order to use this registry public image registry display display this j face resources get resources display imageregistry jfaceresources getresources returns the image associated with the given key in this registry or code null code if none param key the key return the image or code null code if none public image get string key can be null if key null return null if display null note for backwards compatibility the following images are supported here they should never be disposed hence we explicitly return them rather then registering images that swt will dispose applications should go direclty to swt for these icons see display get system icon int id int swt key 1 if key equals dialog dlg img info swt key swt icon information if key equals dialog dlg img question swt key swt icon question if key equals dialog dlg img warning swt key swt icon warning if key equals dialog dlg img error swt key swt icon error if we actually just want to return an swt image do so without looking in the registry if swt key 1 final image image new image 1 final int id swt key display sync exec new runnable public void run image 0 display get system image id return image 0 entry entry get entry key if entry null return null if entry image null entry image manager create image with default entry descriptor return entry image getsystemicon swtkey dlg_img_info swtkey icon_information dlg_img_question swtkey icon_question dlg_img_warning swtkey icon_warning dlg_img_error swtkey icon_error swtkey swtkey syncexec getsystemimage getentry createimagewithdefault returns the descriptor associated with the given key in this registry or code null code if none param key the key return the descriptor or code null code if none since 2 1 public image descriptor get descriptor string key entry entry get entry key if entry null return null return entry descriptor imagedescriptor getdescriptor getentry adds or replaces an image descriptor to this registry the first time this new entry is retrieved the image descriptor s image will be computed via code image descriptor create image code and remembered this method replaces an existing image descriptor associated with the given key but fails if there is a real image associated with it param key the key param descriptor the image descriptor exception illegal argument exception if the key already exists public void put string key image descriptor descriptor entry entry get entry key if entry null entry new entry get table put key entry if entry image null throw new illegal argument exception image registry key already in use key non nls 1 entry descriptor descriptor imagedescriptor createimage imagedescriptor illegalargumentexception imagedescriptor getentry gettable illegalargumentexception imageregistry adds an image to this registry this method fails if there is already an image or descriptor for the given key p note that an image registry owns all of the image objects registered with it and automatically disposes of them when the swt display is disposed because of this clients must not register an image object that is managed by another object p param key the key param image the image exception illegal argument exception if the key already exists public void put string key image image entry entry get entry key if entry null entry new entry put entry key entry if entry image null entry descriptor null throw new illegal argument exception image registry key already in use key non nls 1 entry image image entry descriptor new original image descriptor image manager get device try manager create entry descriptor catch device resource exception e illegalargumentexception getentry putentry illegalargumentexception imageregistry originalimagedescriptor getdevice deviceresourceexception removes an image from this registry if an swt image was allocated it is disposed this method has no effect if there is no image or descriptor for the given key param key the key public void remove string key image descriptor descriptor get descriptor key if descriptor null manager destroy descriptor get table remove key imagedescriptor getdescriptor gettable private entry get entry string key return entry get table get key getentry gettable private void put entry string key entry entry get table put key entry putentry gettable private map get table if table null table new hash map 10 return table gettable hashmap disposes this image registry disposing any images that were allocated for it and clearing its entries since 3 1 public void dispose manager cancel dispose exec dispose runnable if table null for iterator i table values iterator i has next entry entry entry i next if entry image null manager destroy image entry descriptor table null display null canceldisposeexec disposerunnable hasnext destroyimage private runnable dispose runnable new runnable public void run dispose disposerunnable private device original display public original image descriptor image original device original display this original original this original display original display originaldisplay originalimagedescriptor originaldisplay originaldisplay originaldisplay public object create resource device device throws device resource exception if device original display ref count return original return super create resource device createresource deviceresourceexception originaldisplay refcount createresource public void destroy resource object to dispose if original to dispose ref count if ref count 0 original dispose original null else super destroy resource to dispose destroyresource todispose todispose refcount refcount destroyresource todispose see org eclipse jface resource image descriptor get image data public image data get image data return original get image data imagedescriptor getimagedata imagedata getimagedata getimagedata creates an empty image registry p there must be an swt display created in the current thread before calling this method p public image registry this display get current imageregistry getcurrent creates an empty image registry using the given resource manager to allocate images param manager the resource manager used to allocate images since 3 1 public image registry resource manager manager assert is not null manager device dev manager get device if dev instanceof display this display display dev this manager manager manager dispose exec dispose runnable imageregistry resourcemanager isnotnull getdevice disposeexec disposerunnable creates an empty image registry param display this code display code must not be code null code and must not be disposed in order to use this registry public image registry display display this j face resources get resources display imageregistry jfaceresources getresources returns the image associated with the given key in this registry or code null code if none param key the key return the image or code null code if none public image get string key can be null if key null return null if display null note for backwards compatibility the following images are supported here they should never be disposed hence we explicitly return them rather then registering images that swt will dispose applications should go direclty to swt for these icons see display get system icon int id int swt key 1 if key equals dialog dlg img info swt key swt icon information if key equals dialog dlg img question swt key swt icon question if key equals dialog dlg img warning swt key swt icon warning if key equals dialog dlg img error swt key swt icon error if we actually just want to return an swt image do so without looking in the registry if swt key 1 final image image new image 1 final int id swt key display sync exec new runnable public void run image 0 display get system image id return image 0 entry entry get entry key if entry null return null if entry image null entry image manager create image with default entry descriptor return entry image getsystemicon swtkey dlg_img_info swtkey icon_information dlg_img_question swtkey icon_question dlg_img_warning swtkey icon_warning dlg_img_error swtkey icon_error swtkey swtkey syncexec getsystemimage getentry createimagewithdefault returns the descriptor associated with the given key in this registry or code null code if none param key the key return the descriptor or code null code if none since 2 1 public image descriptor get descriptor string key entry entry get entry key if entry null return null return entry descriptor imagedescriptor getdescriptor getentry adds or replaces an image descriptor to this registry the first time this new entry is retrieved the image descriptor s image will be computed via code image descriptor create image code and remembered this method replaces an existing image descriptor associated with the given key but fails if there is a real image associated with it param key the key param descriptor the image descriptor exception illegal argument exception if the key already exists public void put string key image descriptor descriptor entry entry get entry key if entry null entry new entry get table put key entry if entry image null throw new illegal argument exception image registry key already in use key non nls 1 entry descriptor descriptor imagedescriptor createimage imagedescriptor illegalargumentexception imagedescriptor getentry gettable illegalargumentexception imageregistry adds an image to this registry this method fails if there is already an image or descriptor for the given key p note that an image registry owns all of the image objects registered with it and automatically disposes of them when the swt display is disposed because of this clients must not register an image object that is managed by another object p param key the key param image the image exception illegal argument exception if the key already exists public void put string key image image entry entry get entry key if entry null entry new entry put entry key entry if entry image null entry descriptor null throw new illegal argument exception image registry key already in use key non nls 1 entry image image entry descriptor new original image descriptor image manager get device try manager create entry descriptor catch device resource exception e illegalargumentexception getentry putentry illegalargumentexception imageregistry originalimagedescriptor getdevice deviceresourceexception removes an image from this registry if an swt image was allocated it is disposed this method has no effect if there is no image or descriptor for the given key param key the key public void remove string key image descriptor descriptor get descriptor key if descriptor null manager destroy descriptor get table remove key imagedescriptor getdescriptor gettable private entry get entry string key return entry get table get key getentry gettable private void put entry string key entry entry get table put key entry putentry gettable private map get table if table null table new hash map 10 return table gettable hashmap disposes this image registry disposing any images that were allocated for it and clearing its entries since 3 1 public void dispose manager cancel dispose exec dispose runnable if table null for iterator i table values iterator i has next entry entry entry i next if entry image null manager destroy image entry descriptor table null display null canceldisposeexec disposerunnable hasnext destroyimage private runnable dispose runnable new runnable public void run dispose disposerunnable private device original display public original image descriptor image original device original display this original original this original display original display originaldisplay originalimagedescriptor originaldisplay originaldisplay originaldisplay public object create resource device device throws device resource exception if device original display ref count return original return super create resource device createresource deviceresourceexception originaldisplay refcount createresource public void destroy resource object to dispose if original to dispose ref count if ref count 0 original dispose original null else super destroy resource to dispose destroyresource todispose todispose refcount refcount destroyresource todispose see org eclipse jface resource image descriptor get image data public image data get image data return original get image data imagedescriptor getimagedata imagedata getimagedata getimagedata creates an empty image registry p there must be an swt display created in the current thread before calling this method p public image registry this display get current imageregistry getcurrent creates an empty image registry using the given resource manager to allocate images param manager the resource manager used to allocate images since 3 1 public image registry resource manager manager assert is not null manager device dev manager get device if dev instanceof display this display display dev this manager manager manager dispose exec dispose runnable imageregistry resourcemanager isnotnull getdevice disposeexec disposerunnable creates an empty image registry param display this code display code must not be code null code and must not be disposed in order to use this registry public image registry display display this j face resources get resources display imageregistry jfaceresources getresources returns the image associated with the given key in this registry or code null code if none param key the key return the image or code null code if none public image get string key can be null if key null return null if display null note for backwards compatibility the following images are supported here they should never be disposed hence we explicitly return them rather then registering images that swt will dispose applications should go direclty to swt for these icons see display get system icon int id int swt key 1 if key equals dialog dlg img info swt key swt icon information if key equals dialog dlg img question swt key swt icon question if key equals dialog dlg img warning swt key swt icon warning if key equals dialog dlg img error swt key swt icon error if we actually just want to return an swt image do so without looking in the registry if swt key 1 final image image new image 1 final int id swt key display sync exec new runnable public void run image 0 display get system image id return image 0 entry entry get entry key if entry null return null if entry image null entry image manager create image with default entry descriptor return entry image getsystemicon swtkey dlg_img_info swtkey icon_information dlg_img_question swtkey icon_question dlg_img_warning swtkey icon_warning dlg_img_error swtkey icon_error swtkey swtkey syncexec getsystemimage getentry createimagewithdefault final int id swt key display sync exec new runnable public void run image 0 display get system image id swtkey syncexec getsystemimage returns the descriptor associated with the given key in this registry or code null code if none param key the key return the descriptor or code null code if none since 2 1 public image descriptor get descriptor string key entry entry get entry key if entry null return null return entry descriptor imagedescriptor getdescriptor getentry adds or replaces an image descriptor to this registry the first time this new entry is retrieved the image descriptor s image will be computed via code image descriptor create image code and remembered this method replaces an existing image descriptor associated with the given key but fails if there is a real image associated with it param key the key param descriptor the image descriptor exception illegal argument exception if the key already exists public void put string key image descriptor descriptor entry entry get entry key if entry null entry new entry get table put key entry if entry image null throw new illegal argument exception image registry key already in use key non nls 1 entry descriptor descriptor imagedescriptor createimage imagedescriptor illegalargumentexception imagedescriptor getentry gettable illegalargumentexception imageregistry adds an image to this registry this method fails if there is already an image or descriptor for the given key p note that an image registry owns all of the image objects registered with it and automatically disposes of them when the swt display is disposed because of this clients must not register an image object that is managed by another object p param key the key param image the image exception illegal argument exception if the key already exists public void put string key image image entry entry get entry key if entry null entry new entry put entry key entry if entry image null entry descriptor null throw new illegal argument exception image registry key already in use key non nls 1 entry image image entry descriptor new original image descriptor image manager get device try manager create entry descriptor catch device resource exception e illegalargumentexception getentry putentry illegalargumentexception imageregistry originalimagedescriptor getdevice deviceresourceexception removes an image from this registry if an swt image was allocated it is disposed this method has no effect if there is no image or descriptor for the given key param key the key public void remove string key image descriptor descriptor get descriptor key if descriptor null manager destroy descriptor get table remove key imagedescriptor getdescriptor gettable private entry get entry string key return entry get table get key getentry gettable private void put entry string key entry entry get table put key entry putentry gettable private map get table if table null table new hash map 10 return table gettable hashmap disposes this image registry disposing any images that were allocated for it and clearing its entries since 3 1 public void dispose manager cancel dispose exec dispose runnable if table null for iterator i table values iterator i has next entry entry entry i next if entry image null manager destroy image entry descriptor table null display null canceldisposeexec disposerunnable hasnext destroyimage private runnable dispose runnable new runnable public void run dispose disposerunnable private device original display public original image descriptor image original device original display this original original this original display original display originaldisplay originalimagedescriptor originaldisplay originaldisplay originaldisplay public object create resource device device throws device resource exception if device original display ref count return original return super create resource device createresource deviceresourceexception originaldisplay refcount createresource public void destroy resource object to dispose if original to dispose ref count if ref count 0 original dispose original null else super destroy resource to dispose destroyresource todispose todispose refcount refcount destroyresource todispose see org eclipse jface resource image descriptor get image data public image data get image data return original get image data imagedescriptor getimagedata imagedata getimagedata getimagedata creates an empty image registry p there must be an swt display created in the current thread before calling this method p public image registry this display get current imageregistry getcurrent creates an empty image registry using the given resource manager to allocate images param manager the resource manager used to allocate images since 3 1 public image registry resource manager manager assert is not null manager device dev manager get device if dev instanceof display this display display dev this manager manager manager dispose exec dispose runnable imageregistry resourcemanager isnotnull getdevice disposeexec disposerunnable creates an empty image registry param display this code display code must not be code null code and must not be disposed in order to use this registry public image registry display display this j face resources get resources display imageregistry jfaceresources getresources returns the image associated with the given key in this registry or code null code if none param key the key return the image or code null code if none public image get string key can be null if key null return null if display null note for backwards compatibility the following images are supported here they should never be disposed hence we explicitly return them rather then registering images that swt will dispose applications should go direclty to swt for these icons see display get system icon int id int swt key 1 if key equals dialog dlg img info swt key swt icon information if key equals dialog dlg img question swt key swt icon question if key equals dialog dlg img warning swt key swt icon warning if key equals dialog dlg img error swt key swt icon error if we actually just want to return an swt image do so without looking in the registry if swt key 1 final image image new image 1 final int id swt key display sync exec new runnable public void run image 0 display get system image id return image 0 entry entry get entry key if entry null return null if entry image null entry image manager create image with default entry descriptor return entry image getsystemicon swtkey dlg_img_info swtkey icon_information dlg_img_question swtkey icon_question dlg_img_warning swtkey icon_warning dlg_img_error swtkey icon_error swtkey swtkey syncexec getsystemimage getentry createimagewithdefault returns the descriptor associated with the given key in this registry or code null code if none param key the key return the descriptor or code null code if none since 2 1 public image descriptor get descriptor string key entry entry get entry key if entry null return null return entry descriptor imagedescriptor getdescriptor getentry adds or replaces an image descriptor to this registry the first time this new entry is retrieved the image descriptor s image will be computed via code image descriptor create image code and remembered this method replaces an existing image descriptor associated with the given key but fails if there is a real image associated with it param key the key param descriptor the image descriptor exception illegal argument exception if the key already exists public void put string key image descriptor descriptor entry entry get entry key if entry null entry new entry get table put key entry if entry image null throw new illegal argument exception image registry key already in use key non nls 1 entry descriptor descriptor imagedescriptor createimage imagedescriptor illegalargumentexception imagedescriptor getentry gettable illegalargumentexception imageregistry adds an image to this registry this method fails if there is already an image or descriptor for the given key p note that an image registry owns all of the image objects registered with it and automatically disposes of them when the swt display is disposed because of this clients must not register an image object that is managed by another object p param key the key param image the image exception illegal argument exception if the key already exists public void put string key image image entry entry get entry key if entry null entry new entry put entry key entry if entry image null entry descriptor null throw new illegal argument exception image registry key already in use key non nls 1 entry image image entry descriptor new original image descriptor image manager get device try manager create entry descriptor catch device resource exception e illegalargumentexception getentry putentry illegalargumentexception imageregistry originalimagedescriptor getdevice deviceresourceexception removes an image from this registry if an swt image was allocated it is disposed this method has no effect if there is no image or descriptor for the given key param key the key public void remove string key image descriptor descriptor get descriptor key if descriptor null manager destroy descriptor get table remove key imagedescriptor getdescriptor gettable private entry get entry string key return entry get table get key getentry gettable private void put entry string key entry entry get table put key entry putentry gettable private map get table if table null table new hash map 10 return table gettable hashmap disposes this image registry disposing any images that were allocated for it and clearing its entries since 3 1 public void dispose manager cancel dispose exec dispose runnable if table null for iterator i table values iterator i has next entry entry entry i next if entry image null manager destroy image entry descriptor table null display null canceldisposeexec disposerunnable hasnext destroyimage private runnable dispose runnable new runnable public void run dispose disposerunnable private device original display public original image descriptor image original device original display this original original this original display original display originaldisplay originalimagedescriptor originaldisplay originaldisplay originaldisplay public object create resource device device throws device resource exception if device original display ref count return original return super create resource device createresource deviceresourceexception originaldisplay refcount createresource public void destroy resource object to dispose if original to dispose ref count if ref count 0 original dispose original null else super destroy resource to dispose destroyresource todispose todispose refcount refcount destroyresource todispose see org eclipse jface resource image descriptor get image data public image data get image data return original get image data imagedescriptor getimagedata imagedata getimagedata getimagedata creates an empty image registry p there must be an swt display created in the current thread before calling this method p public image registry this display get current imageregistry getcurrent creates an empty image registry using the given resource manager to allocate images param manager the resource manager used to allocate images since 3 1 public image registry resource manager manager assert is not null manager device dev manager get device if dev instanceof display this display display dev this manager manager manager dispose exec dispose runnable imageregistry resourcemanager isnotnull getdevice disposeexec disposerunnable creates an empty image registry param display this code display code must not be code null code and must not be disposed in order to use this registry public image registry display display this j face resources get resources display imageregistry jfaceresources getresources returns the image associated with the given key in this registry or code null code if none param key the key return the image or code null code if none public image get string key can be null if key null return null if display null note for backwards compatibility the following images are supported here they should never be disposed hence we explicitly return them rather then registering images that swt will dispose applications should go direclty to swt for these icons see display get system icon int id int swt key 1 if key equals dialog dlg img info swt key swt icon information if key equals dialog dlg img question swt key swt icon question if key equals dialog dlg img warning swt key swt icon warning if key equals dialog dlg img error swt key swt icon error if we actually just want to return an swt image do so without looking in the registry if swt key 1 final image image new image 1 final int id swt key display sync exec new runnable public void run image 0 display get system image id return image 0 entry entry get entry key if entry null return null if entry image null entry image manager create image with default entry descriptor return entry image getsystemicon swtkey dlg_img_info swtkey icon_information dlg_img_question swtkey icon_question dlg_img_warning swtkey icon_warning dlg_img_error swtkey icon_error swtkey swtkey syncexec getsystemimage getentry createimagewithdefault returns the descriptor associated with the given key in this registry or code null code if none param key the key return the descriptor or code null code if none since 2 1 public image descriptor get descriptor string key entry entry get entry key if entry null return null return entry descriptor imagedescriptor getdescriptor getentry adds or replaces an image descriptor to this registry the first time this new entry is retrieved the image descriptor s image will be computed via code image descriptor create image code and remembered this method replaces an existing image descriptor associated with the given key but fails if there is a real image associated with it param key the key param descriptor the image descriptor exception illegal argument exception if the key already exists public void put string key image descriptor descriptor entry entry get entry key if entry null entry new entry get table put key entry if entry image null throw new illegal argument exception image registry key already in use key non nls 1 entry descriptor descriptor imagedescriptor createimage imagedescriptor illegalargumentexception imagedescriptor getentry gettable illegalargumentexception imageregistry adds an image to this registry this method fails if there is already an image or descriptor for the given key p note that an image registry owns all of the image objects registered with it and automatically disposes of them when the swt display is disposed because of this clients must not register an image object that is managed by another object p param key the key param image the image exception illegal argument exception if the key already exists public void put string key image image entry entry get entry key if entry null entry new entry put entry key entry if entry image null entry descriptor null throw new illegal argument exception image registry key already in use key non nls 1 entry image image entry descriptor new original image descriptor image manager get device try manager create entry descriptor catch device resource exception e illegalargumentexception getentry putentry illegalargumentexception imageregistry originalimagedescriptor getdevice deviceresourceexception removes an image from this registry if an swt image was allocated it is disposed this method has no effect if there is no image or descriptor for the given key param key the key public void remove string key image descriptor descriptor get descriptor key if descriptor null manager destroy descriptor get table remove key imagedescriptor getdescriptor gettable private entry get entry string key return entry get table get key getentry gettable private void put entry string key entry entry get table put key entry putentry gettable private map get table if table null table new hash map 10 return table gettable hashmap disposes this image registry disposing any images that were allocated for it and clearing its entries since 3 1 public void dispose manager cancel dispose exec dispose runnable if table null for iterator i table values iterator i has next entry entry entry i next if entry image null manager destroy image entry descriptor table null display null canceldisposeexec disposerunnable hasnext destroyimage private runnable dispose runnable new runnable public void run dispose disposerunnable private device original display public original image descriptor image original device original display this original original this original display original display originaldisplay originalimagedescriptor originaldisplay originaldisplay originaldisplay public object create resource device device throws device resource exception if device original display ref count return original return super create resource device createresource deviceresourceexception originaldisplay refcount createresource public void destroy resource object to dispose if original to dispose ref count if ref count 0 original dispose original null else super destroy resource to dispose destroyresource todispose todispose refcount refcount destroyresource todispose see org eclipse jface resource image descriptor get image data public image data get image data return original get image data imagedescriptor getimagedata imagedata getimagedata getimagedata creates an empty image registry p there must be an swt display created in the current thread before calling this method p public image registry this display get current imageregistry getcurrent creates an empty image registry using the given resource manager to allocate images param manager the resource manager used to allocate images since 3 1 public image registry resource manager manager assert is not null manager device dev manager get device if dev instanceof display this display display dev this manager manager manager dispose exec dispose runnable imageregistry resourcemanager isnotnull getdevice disposeexec disposerunnable creates an empty image registry param display this code display code must not be code null code and must not be disposed in order to use this registry public image registry display display this j face resources get resources display imageregistry jfaceresources getresources returns the image associated with the given key in this registry or code null code if none param key the key return the image or code null code if none public image get string key can be null if key null return null if display null note for backwards compatibility the following images are supported here they should never be disposed hence we explicitly return them rather then registering images that swt will dispose applications should go direclty to swt for these icons see display get system icon int id int swt key 1 if key equals dialog dlg img info swt key swt icon information if key equals dialog dlg img question swt key swt icon question if key equals dialog dlg img warning swt key swt icon warning if key equals dialog dlg img error swt key swt icon error if we actually just want to return an swt image do so without looking in the registry if swt key 1 final image image new image 1 final int id swt key display sync exec new runnable public void run image 0 display get system image id return image 0 entry entry get entry key if entry null return null if entry image null entry image manager create image with default entry descriptor return entry image getsystemicon swtkey dlg_img_info swtkey icon_information dlg_img_question swtkey icon_question dlg_img_warning swtkey icon_warning dlg_img_error swtkey icon_error swtkey swtkey syncexec getsystemimage getentry createimagewithdefault final int id swt key display sync exec new runnable public void run image 0 display get system image id swtkey syncexec getsystemimage returns the descriptor associated with the given key in this registry or code null code if none param key the key return the descriptor or code null code if none since 2 1 public image descriptor get descriptor string key entry entry get entry key if entry null return null return entry descriptor imagedescriptor getdescriptor getentry adds or replaces an image descriptor to this registry the first time this new entry is retrieved the image descriptor s image will be computed via code image descriptor create image code and remembered this method replaces an existing image descriptor associated with the given key but fails if there is a real image associated with it param key the key param descriptor the image descriptor exception illegal argument exception if the key already exists public void put string key image descriptor descriptor entry entry get entry key if entry null entry new entry get table put key entry if entry image null throw new illegal argument exception image registry key already in use key non nls 1 entry descriptor descriptor imagedescriptor createimage imagedescriptor illegalargumentexception imagedescriptor getentry gettable illegalargumentexception imageregistry adds an image to this registry this method fails if there is already an image or descriptor for the given key p note that an image registry owns all of the image objects registered with it and automatically disposes of them when the swt display is disposed because of this clients must not register an image object that is managed by another object p param key the key param image the image exception illegal argument exception if the key already exists public void put string key image image entry entry get entry key if entry null entry new entry put entry key entry if entry image null entry descriptor null throw new illegal argument exception image registry key already in use key non nls 1 entry image image entry descriptor new original image descriptor image manager get device try manager create entry descriptor catch device resource exception e illegalargumentexception getentry putentry illegalargumentexception imageregistry originalimagedescriptor getdevice deviceresourceexception removes an image from this registry if an swt image was allocated it is disposed this method has no effect if there is no image or descriptor for the given key param key the key public void remove string key image descriptor descriptor get descriptor key if descriptor null manager destroy descriptor get table remove key imagedescriptor getdescriptor gettable private entry get entry string key return entry get table get key getentry gettable private void put entry string key entry entry get table put key entry putentry gettable private map get table if table null table new hash map 10 return table gettable hashmap disposes this image registry disposing any images that were allocated for it and clearing its entries since 3 1 public void dispose manager cancel dispose exec dispose runnable if table null for iterator i table values iterator i has next entry entry entry i next if entry image null manager destroy image entry descriptor table null display null canceldisposeexec disposerunnable hasnext destroyimage creates an abstract ui plug in runtime object for the given plug in descriptor p note that instances of plug in runtime classes are automatically created by the platform in the course of plug in activation p param descriptor the plug in descriptor see plugin plugin org eclipse core runtime i plugin descriptor descriptor deprecated in eclipse 3 0 this constructor has been replaced by link abstractui plugin implementations of code my plugin i plugin descriptor descriptor code should be changed to code my plugin code and call code super code instead of code super descriptor code the code my plugin i plugin descriptor descriptor code constructor is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in or as in this case subclasses which might public abstractui plugin i plugin descriptor descriptor super descriptor iplugindescriptor abstractuiplugin myplugin iplugindescriptor myplugin myplugin iplugindescriptor abstractuiplugin iplugindescriptor creates an abstract ui plug in runtime object p plug in runtime classes are code bundle activators code and so must have an default constructor this method is called by the runtime when the associated bundle is being activated p for more details see code plugin code s default constructor see plugin plugin since 3 0 public abstractui plugin super bundleactivators abstractuiplugin returns a new image registry for this plugin in the registry will be used to manage images which are frequently used by the plugin in p the default implementation of this method creates an empty registry subclasses may override this method if needed p return image registry the resulting registry see get image registry protected image registry create image registry if we are in the ui thread use that if display get current null return new image registry display get current if platformui is workbench running return new image registry platformui get workbench get display invalid thread access if it is not the ui thread and the workbench is not created throw new swt error swt error thread invalid access imageregistry getimageregistry imageregistry createimageregistry getcurrent imageregistry getcurrent isworkbenchrunning imageregistry getworkbench getdisplay swterror error_thread_invalid_access returns the dialog settings for this ui plug in the dialog settings is used to hold persistent state data for the various wizards and dialogs of this plug in in the context of a workbench p if an error occurs reading the dialog store an empty one is quietly created and returned p p subclasses may override this method but are not expected to p return the dialog settings public i dialog settings get dialog settings if dialog settings null load dialog settings return dialog settings idialogsettings getdialogsettings dialogsettings loaddialogsettings dialogsettings returns the image registry for this ui plug in p the image registry contains the images used by this plug in that are very frequently used and so need to be globally shared within the plug in since many o ss have a severe limit on the number of images that can be in memory at any given time a plug in should only keep a small number of images in their registry p subclasses should reimplement code initialize image registry code if they have custom graphic images to load p p subclasses may override this method but are not expected to p return the image registry public image registry get image registry if image registry null image registry create image registry initialize image registry image registry return image registry oss initializeimageregistry imageregistry getimageregistry imageregistry imageregistry createimageregistry initializeimageregistry imageregistry imageregistry returns the preference store for this ui plug in this preference store is used to hold persistent settings for this plug in in the context of a workbench some of these settings will be user controlled whereas others may be internal setting that are never exposed to the user p if an error occurs reading the preference store an empty preference store is quietly created initialized with defaults and returned p p strong note strong as of eclipse 3 1 this method is no longer referring to the core runtime compatibility layer and so plug ins relying on plugin initialize default preferences will have to access the compatibility layer themselves p return the preference store public i preference store get preference store create the preference store lazily if preference store null preference store new scoped preference store new instance scope get bundle get symbolic name return preference store initializedefaultpreferences ipreferencestore getpreferencestore preferencestore preferencestore scopedpreferencestore instancescope getbundle getsymbolicname preferencestore returns the platform ui workbench p this method exists as a convenience for plugin implementors the workbench can also be accessed by invoking code platformui get workbench code p return i workbench the workbench for this plug in public i workbench get workbench return platformui get workbench getworkbench iworkbench iworkbench getworkbench getworkbench initializes a preference store with default preference values for this plug in p this method is called after the preference store is initially loaded default values are never stored in preference stores p p the default implementation of this method does nothing subclasses should reimplement this method if the plug in has any preferences p p a subclass may reimplement this method to set default values for the preference store using j face api this is the older way of initializing default values if this method is reimplemented do not override code initialize default plugin preferences code p param store the preference store to fill deprecated this is only called if the runtime compatibility layer is present see link initialize default plugin preferences protected void initialize default preferences i preference store store spec ed to do nothing jface initializedefaultpluginpreferences initializedefaultpluginpreferences initializedefaultpreferences ipreferencestore the code abstractui plugin code implementation of this code plugin code method forwards to code initialize default preferences i preference store code p a subclass may reimplement this method to set default values for the core runtime preference store in the standard way this is the recommended way to do this the older code initialize default preferences i preference store code method serves a similar purpose if this method is reimplemented do not send super and do not override code initialize default preferences i preference store code p deprecated this is only called if the runtime compatibility layer is present see the deprecated comment in link plugin initialize default plugin preferences see initialize default preferences since 2 0 protected void initialize default plugin preferences n b by the time this method is called the plug in has a core runtime preference store no default values call load preference store only for backwards compatibility with eclipse 1 0 load preference store call initialize default preferences only for backwards compatibility with eclipse 1 0 initialize default preferences get preference store abstractuiplugin initializedefaultpreferences ipreferencestore initializedefaultpreferences ipreferencestore initializedefaultpreferences ipreferencestore initializedefaultpluginpreferences initializedefaultpreferences initializedefaultpluginpreferences loadpreferencestore loadpreferencestore initializedefaultpreferences initializedefaultpreferences getpreferencestore initializes an image registry with images which are frequently used by the plugin p the image registry contains the images used by this plug in that are very frequently used and so need to be globally shared within the plug in since many o ss have a severe limit on the number of images that can be in memory at any given time each plug in should only keep a small number of images in its registry p p implementors should create a j face image descriptor for each frequently used image the descriptors describe how to create find the image should it be needed the image described by the descriptor is not actually allocated until someone retrieves it p p subclasses may override this method to fill the image registry p param reg the registry to initalize see get image registry protected void initialize image registry image registry reg spec ed to do nothing oss jface getimageregistry initializeimageregistry imageregistry loads the dialog settings for this plug in the default implementation first looks for a standard named file in the plug in s read write state area if no such file exists the plug in s install directory is checked to see if one was installed with some default settings if no file is found in either place a new empty dialog settings is created if a problem occurs an empty settings is silently used p this framework method may be overridden although this is typically unnecessary p protected void load dialog settings dialog settings new dialog settings workbench non nls 1 bug 69387 the instance area should not be created in the call to get state location if data none or data no default was used i path data location get state location or null if data location null try r w state area in the local file system string read write path data location append fn dialog settings toos string file settings file new file read write path if settings file exists try dialog settings load read write path catch io exception e load failed so ensure we have an empty settings dialog settings new dialog settings workbench non nls 1 return otherwise look for bundle specific dialog settings url dsurl bundle utility find get bundle fn dialog settings if dsurl null return input stream is null try is dsurl open stream buffered reader reader new buffered reader new input stream reader is utf 8 non nls 1 dialog settings load reader catch io exception e load failed so ensure we have an empty settings dialog settings new dialog settings workbench non nls 1 finally try if is null is close catch io exception e do nothing loaddialogsettings dialogsettings dialogsettings getstatelocation nodefault ipath datalocation getstatelocationornull datalocation readwritepath datalocation fn_dialog_settings toosstring settingsfile readwritepath settingsfile dialogsettings readwritepath ioexception dialogsettings dialogsettings bundleutility getbundle fn_dialog_settings inputstream openstream bufferedreader bufferedreader inputstreamreader dialogsettings ioexception dialogsettings dialogsettings ioexception loads the preference store for this plug in the default implementation looks for a standard named file in the plug in s read write state area if no file is found or a problem occurs a new empty preference store is silently created p this framework method may be overridden although this is typically unnecessary p deprecated as of eclipse 2 0 a basic preference store exists for all plug ins this method now exists only for backwards compatibility it is called as the plug in s preference store is being initialized the plug ins preferences are loaded from the file regardless of what this method does protected void load preference store do nothing by default loadpreferencestore refreshes the actions for the plugin this method is called from code startup code p this framework method may be overridden although this is typically unnecessary p protected void refresh plugin actions if the workbench is not started yet or is no longer running do nothing if platformui is workbench running return startup is not guaranteed to be called in the ui thread but refresh plugin actions must run in the ui thread so use async exec see bug 6623 for more details display get default async exec new runnable public void run w win plugin action refresh action list refreshpluginactions isworkbenchrunning refreshpluginactions asyncexec getdefault asyncexec wwinpluginaction refreshactionlist so use async exec see bug 6623 for more details display get default async exec new runnable public void run w win plugin action refresh action list asyncexec getdefault asyncexec wwinpluginaction refreshactionlist saves this plug in s dialog settings any problems which arise are silently ignored protected void save dialog settings if dialog settings null return try i path path get state location or null if path null return string read write path path append fn dialog settings toos string dialog settings save read write path catch io exception e spec ed to ignore problems catch illegal state exception e spec ed to ignore problems savedialogsettings dialogsettings ipath getstatelocationornull readwritepath fn_dialog_settings toosstring dialogsettings readwritepath ioexception illegalstateexception saves this plug in s preference store any problems which arise are silently ignored see plugin save plugin preferences deprecated as of eclipse 2 0 preferences exist for all plug ins the equivalent of this method is code plugin save plugin preferences code this method now calls code save plugin preferences code and exists only for backwards compatibility protected void save preference store save plugin preferences savepluginpreferences savepluginpreferences savepluginpreferences savepreferencestore savepluginpreferences the code abstractui plugin code implementation of this code plugin code method does nothing subclasses may extend this method but must send super first p warning plug ins may not be started in the ui thread the code startup code method should not assume that its code runs in the ui thread otherwise swt thread exceptions may occur on startup deprecated in eclipse 3 0 code startup code has been replaced by link plugin start bundle context context implementations of code startup code should be changed to extend code start bundle context context code and call code super start context code instead of code super startup code like code super startup code code super stop context code must be called as the very first thing the code startup code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in in contrast the code start code method is always called public void startup throws core exception this method no longer does anything the code that used to be here in 2 1 has moved to start bundle context super startup abstractuiplugin bundlecontext bundlecontext coreexception bundlecontext the code abstractui plugin code implementation of this code plugin code method does nothing subclasses may extend this method but must send super first deprecated in eclipse 3 0 code shutdown code has been replaced by link plugin stop bundle context context implementations of code shutdown code should be changed to extend code stop bundle context context code and call code super stop context code instead of code super shutdown code unlike code super shutdown code code super stop context code must be called as the very b last b thing rather than as the very first thing the code shutdown code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in in contrast the code stop code method is always called public void shutdown throws core exception this method no longer does anything interesting the code that used to be here in 2 1 has moved to stop bundle context which is called regardless of whether the plug in being instantiated requires org eclipse core runtime compatibility super shutdown abstractuiplugin bundlecontext bundlecontext coreexception bundlecontext the code abstractui plugin code implementation of this code plugin code method refreshes the plug in actions subclasses may extend this method but must send super b first b inherit doc since 3 0 public void start bundle context context throws exception super start context final bundle context fc context should only attempt refresh plugin actions once the bundle has been fully started otherwise action delegates can be created while in the process of creating a triggering action delegate if ui events are processed during startup also if the start throws an exception the bundle will be shut down we don t want to have created any delegates if this happens see bug 63324 for more details bundle listener new bundle listener public void bundle changed bundle event event if event get bundle get bundle if event get type bundle event started we re getting notified that the bundle has been started make sure it s still active it may have been shut down between the time this event was queued and now if get bundle get state bundle active refresh plugin actions fc remove bundle listener this context add bundle listener bundle listener bundle listener is removed in stop bundle context abstractuiplugin inheritdoc bundlecontext bundlecontext refreshpluginactions bundlelistener bundlelistener bundlechanged bundleevent getbundle getbundle gettype bundleevent getbundle getstate refreshpluginactions removebundlelistener addbundlelistener bundlelistener bundlelistener bundlecontext bundle listener new bundle listener public void bundle changed bundle event event if event get bundle get bundle if event get type bundle event started we re getting notified that the bundle has been started make sure it s still active it may have been shut down between the time this event was queued and now if get bundle get state bundle active refresh plugin actions fc remove bundle listener this bundlelistener bundlelistener bundlechanged bundleevent getbundle getbundle gettype bundleevent getbundle getstate refreshpluginactions removebundlelistener the code abstractui plugin code implementation of this code plugin code method saves this plug in s preference and dialog stores and shuts down its image registry if they are in use subclasses may extend this method but must send super b last b a try finally statement should be used where necessary to ensure that code super shutdown code is always done inherit doc since 3 0 public void stop bundle context context throws exception try if bundle listener null context remove bundle listener bundle listener save dialog settings save preference store preference store null image registry null finally super stop context abstractuiplugin inheritdoc bundlecontext bundlelistener removebundlelistener bundlelistener savedialogsettings savepreferencestore preferencestore imageregistry creates and returns a new image descriptor for an image file located within the specified plug in p this is a convenience method that simply locates the image file in within the plug in no image registries are involved the path is relative to the root of the plug in and takes into account files coming from plug in fragments the path may include arg elements however the path must not have a leading or path separator clients should use a path like icons mysample gif rather than icons mysample gif or icons mysample gif p param plugin id the id of the plug in containing the image file code null code is returned if the plug in does not exist param image file path the relative path of the image file relative to the root of the plug in the path must be legal return an image descriptor or code null code if no image could be found since 3 0 public static image descriptor image descriptor from plugin string plugin id string image file path if plugin id null image file path null throw new illegal argument exception if the bundle is not ready then there is no image bundle bundle platform get bundle plugin id if bundle utility is ready bundle return null look for the image this will check both the plugin and fragment folders url full path string bundle utility find bundle image file path if full path string null try full path string new url image file path catch malformedurl exception e return null if full path string null return null return image descriptor create fromurl full path string pluginid imagefilepath imagedescriptor imagedescriptorfromplugin pluginid imagefilepath pluginid imagefilepath illegalargumentexception getbundle pluginid bundleutility isready fullpathstring bundleutility imagefilepath fullpathstring fullpathstring imagefilepath malformedurlexception fullpathstring imagedescriptor createfromurl fullpathstring for internal workbench use only returns the path to a location in the file system that can be used to persist restore state between workbench invocations if the location did not exist prior to this call it will be created returns code null code if no such location is available return path to a location in the file system where this plug in can persist data between sessions or code null code if no such location is available since 3 1 private i path get state location or null try return get state location catch illegal state exception e this occurs if data none is explicitly specified so ignore this silently is this ok see bug 85071 return null ipath getstatelocationornull getstatelocation illegalstateexception creates an abstract ui plug in runtime object for the given plug in descriptor p note that instances of plug in runtime classes are automatically created by the platform in the course of plug in activation p param descriptor the plug in descriptor see plugin plugin org eclipse core runtime i plugin descriptor descriptor deprecated in eclipse 3 0 this constructor has been replaced by link abstractui plugin implementations of code my plugin i plugin descriptor descriptor code should be changed to code my plugin code and call code super code instead of code super descriptor code the code my plugin i plugin descriptor descriptor code constructor is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in or as in this case subclasses which might public abstractui plugin i plugin descriptor descriptor super descriptor iplugindescriptor abstractuiplugin myplugin iplugindescriptor myplugin myplugin iplugindescriptor abstractuiplugin iplugindescriptor creates an abstract ui plug in runtime object p plug in runtime classes are code bundle activators code and so must have an default constructor this method is called by the runtime when the associated bundle is being activated p for more details see code plugin code s default constructor see plugin plugin since 3 0 public abstractui plugin super bundleactivators abstractuiplugin returns a new image registry for this plugin in the registry will be used to manage images which are frequently used by the plugin in p the default implementation of this method creates an empty registry subclasses may override this method if needed p return image registry the resulting registry see get image registry protected image registry create image registry if we are in the ui thread use that if display get current null return new image registry display get current if platformui is workbench running return new image registry platformui get workbench get display invalid thread access if it is not the ui thread and the workbench is not created throw new swt error swt error thread invalid access imageregistry getimageregistry imageregistry createimageregistry getcurrent imageregistry getcurrent isworkbenchrunning imageregistry getworkbench getdisplay swterror error_thread_invalid_access returns the dialog settings for this ui plug in the dialog settings is used to hold persistent state data for the various wizards and dialogs of this plug in in the context of a workbench p if an error occurs reading the dialog store an empty one is quietly created and returned p p subclasses may override this method but are not expected to p return the dialog settings public i dialog settings get dialog settings if dialog settings null load dialog settings return dialog settings idialogsettings getdialogsettings dialogsettings loaddialogsettings dialogsettings returns the image registry for this ui plug in p the image registry contains the images used by this plug in that are very frequently used and so need to be globally shared within the plug in since many o ss have a severe limit on the number of images that can be in memory at any given time a plug in should only keep a small number of images in their registry p subclasses should reimplement code initialize image registry code if they have custom graphic images to load p p subclasses may override this method but are not expected to p return the image registry public image registry get image registry if image registry null image registry create image registry initialize image registry image registry return image registry oss initializeimageregistry imageregistry getimageregistry imageregistry imageregistry createimageregistry initializeimageregistry imageregistry imageregistry returns the preference store for this ui plug in this preference store is used to hold persistent settings for this plug in in the context of a workbench some of these settings will be user controlled whereas others may be internal setting that are never exposed to the user p if an error occurs reading the preference store an empty preference store is quietly created initialized with defaults and returned p p strong note strong as of eclipse 3 1 this method is no longer referring to the core runtime compatibility layer and so plug ins relying on plugin initialize default preferences will have to access the compatibility layer themselves p return the preference store public i preference store get preference store create the preference store lazily if preference store null preference store new scoped preference store new instance scope get bundle get symbolic name return preference store initializedefaultpreferences ipreferencestore getpreferencestore preferencestore preferencestore scopedpreferencestore instancescope getbundle getsymbolicname preferencestore returns the platform ui workbench p this method exists as a convenience for plugin implementors the workbench can also be accessed by invoking code platformui get workbench code p return i workbench the workbench for this plug in public i workbench get workbench return platformui get workbench getworkbench iworkbench iworkbench getworkbench getworkbench initializes a preference store with default preference values for this plug in p this method is called after the preference store is initially loaded default values are never stored in preference stores p p the default implementation of this method does nothing subclasses should reimplement this method if the plug in has any preferences p p a subclass may reimplement this method to set default values for the preference store using j face api this is the older way of initializing default values if this method is reimplemented do not override code initialize default plugin preferences code p param store the preference store to fill deprecated this is only called if the runtime compatibility layer is present see link initialize default plugin preferences protected void initialize default preferences i preference store store spec ed to do nothing jface initializedefaultpluginpreferences initializedefaultpluginpreferences initializedefaultpreferences ipreferencestore the code abstractui plugin code implementation of this code plugin code method forwards to code initialize default preferences i preference store code p a subclass may reimplement this method to set default values for the core runtime preference store in the standard way this is the recommended way to do this the older code initialize default preferences i preference store code method serves a similar purpose if this method is reimplemented do not send super and do not override code initialize default preferences i preference store code p deprecated this is only called if the runtime compatibility layer is present see the deprecated comment in link plugin initialize default plugin preferences see initialize default preferences since 2 0 protected void initialize default plugin preferences n b by the time this method is called the plug in has a core runtime preference store no default values call load preference store only for backwards compatibility with eclipse 1 0 load preference store call initialize default preferences only for backwards compatibility with eclipse 1 0 initialize default preferences get preference store abstractuiplugin initializedefaultpreferences ipreferencestore initializedefaultpreferences ipreferencestore initializedefaultpreferences ipreferencestore initializedefaultpluginpreferences initializedefaultpreferences initializedefaultpluginpreferences loadpreferencestore loadpreferencestore initializedefaultpreferences initializedefaultpreferences getpreferencestore initializes an image registry with images which are frequently used by the plugin p the image registry contains the images used by this plug in that are very frequently used and so need to be globally shared within the plug in since many o ss have a severe limit on the number of images that can be in memory at any given time each plug in should only keep a small number of images in its registry p p implementors should create a j face image descriptor for each frequently used image the descriptors describe how to create find the image should it be needed the image described by the descriptor is not actually allocated until someone retrieves it p p subclasses may override this method to fill the image registry p param reg the registry to initalize see get image registry protected void initialize image registry image registry reg spec ed to do nothing oss jface getimageregistry initializeimageregistry imageregistry loads the dialog settings for this plug in the default implementation first looks for a standard named file in the plug in s read write state area if no such file exists the plug in s install directory is checked to see if one was installed with some default settings if no file is found in either place a new empty dialog settings is created if a problem occurs an empty settings is silently used p this framework method may be overridden although this is typically unnecessary p protected void load dialog settings dialog settings new dialog settings workbench non nls 1 bug 69387 the instance area should not be created in the call to get state location if data none or data no default was used i path data location get state location or null if data location null try r w state area in the local file system string read write path data location append fn dialog settings toos string file settings file new file read write path if settings file exists try dialog settings load read write path catch io exception e load failed so ensure we have an empty settings dialog settings new dialog settings workbench non nls 1 return otherwise look for bundle specific dialog settings url dsurl bundle utility find get bundle fn dialog settings if dsurl null return input stream is null try is dsurl open stream buffered reader reader new buffered reader new input stream reader is utf 8 non nls 1 dialog settings load reader catch io exception e load failed so ensure we have an empty settings dialog settings new dialog settings workbench non nls 1 finally try if is null is close catch io exception e do nothing loaddialogsettings dialogsettings dialogsettings getstatelocation nodefault ipath datalocation getstatelocationornull datalocation readwritepath datalocation fn_dialog_settings toosstring settingsfile readwritepath settingsfile dialogsettings readwritepath ioexception dialogsettings dialogsettings bundleutility getbundle fn_dialog_settings inputstream openstream bufferedreader bufferedreader inputstreamreader dialogsettings ioexception dialogsettings dialogsettings ioexception loads the preference store for this plug in the default implementation looks for a standard named file in the plug in s read write state area if no file is found or a problem occurs a new empty preference store is silently created p this framework method may be overridden although this is typically unnecessary p deprecated as of eclipse 2 0 a basic preference store exists for all plug ins this method now exists only for backwards compatibility it is called as the plug in s preference store is being initialized the plug ins preferences are loaded from the file regardless of what this method does protected void load preference store do nothing by default loadpreferencestore refreshes the actions for the plugin this method is called from code startup code p this framework method may be overridden although this is typically unnecessary p protected void refresh plugin actions if the workbench is not started yet or is no longer running do nothing if platformui is workbench running return startup is not guaranteed to be called in the ui thread but refresh plugin actions must run in the ui thread so use async exec see bug 6623 for more details display get default async exec new runnable public void run w win plugin action refresh action list refreshpluginactions isworkbenchrunning refreshpluginactions asyncexec getdefault asyncexec wwinpluginaction refreshactionlist so use async exec see bug 6623 for more details display get default async exec new runnable public void run w win plugin action refresh action list asyncexec getdefault asyncexec wwinpluginaction refreshactionlist saves this plug in s dialog settings any problems which arise are silently ignored protected void save dialog settings if dialog settings null return try i path path get state location or null if path null return string read write path path append fn dialog settings toos string dialog settings save read write path catch io exception e spec ed to ignore problems catch illegal state exception e spec ed to ignore problems savedialogsettings dialogsettings ipath getstatelocationornull readwritepath fn_dialog_settings toosstring dialogsettings readwritepath ioexception illegalstateexception saves this plug in s preference store any problems which arise are silently ignored see plugin save plugin preferences deprecated as of eclipse 2 0 preferences exist for all plug ins the equivalent of this method is code plugin save plugin preferences code this method now calls code save plugin preferences code and exists only for backwards compatibility protected void save preference store save plugin preferences savepluginpreferences savepluginpreferences savepluginpreferences savepreferencestore savepluginpreferences the code abstractui plugin code implementation of this code plugin code method does nothing subclasses may extend this method but must send super first p warning plug ins may not be started in the ui thread the code startup code method should not assume that its code runs in the ui thread otherwise swt thread exceptions may occur on startup deprecated in eclipse 3 0 code startup code has been replaced by link plugin start bundle context context implementations of code startup code should be changed to extend code start bundle context context code and call code super start context code instead of code super startup code like code super startup code code super stop context code must be called as the very first thing the code startup code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in in contrast the code start code method is always called public void startup throws core exception this method no longer does anything the code that used to be here in 2 1 has moved to start bundle context super startup abstractuiplugin bundlecontext bundlecontext coreexception bundlecontext the code abstractui plugin code implementation of this code plugin code method does nothing subclasses may extend this method but must send super first deprecated in eclipse 3 0 code shutdown code has been replaced by link plugin stop bundle context context implementations of code shutdown code should be changed to extend code stop bundle context context code and call code super stop context code instead of code super shutdown code unlike code super shutdown code code super stop context code must be called as the very b last b thing rather than as the very first thing the code shutdown code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in in contrast the code stop code method is always called public void shutdown throws core exception this method no longer does anything interesting the code that used to be here in 2 1 has moved to stop bundle context which is called regardless of whether the plug in being instantiated requires org eclipse core runtime compatibility super shutdown abstractuiplugin bundlecontext bundlecontext coreexception bundlecontext the code abstractui plugin code implementation of this code plugin code method refreshes the plug in actions subclasses may extend this method but must send super b first b inherit doc since 3 0 public void start bundle context context throws exception super start context final bundle context fc context should only attempt refresh plugin actions once the bundle has been fully started otherwise action delegates can be created while in the process of creating a triggering action delegate if ui events are processed during startup also if the start throws an exception the bundle will be shut down we don t want to have created any delegates if this happens see bug 63324 for more details bundle listener new bundle listener public void bundle changed bundle event event if event get bundle get bundle if event get type bundle event started we re getting notified that the bundle has been started make sure it s still active it may have been shut down between the time this event was queued and now if get bundle get state bundle active refresh plugin actions fc remove bundle listener this context add bundle listener bundle listener bundle listener is removed in stop bundle context abstractuiplugin inheritdoc bundlecontext bundlecontext refreshpluginactions bundlelistener bundlelistener bundlechanged bundleevent getbundle getbundle gettype bundleevent getbundle getstate refreshpluginactions removebundlelistener addbundlelistener bundlelistener bundlelistener bundlecontext bundle listener new bundle listener public void bundle changed bundle event event if event get bundle get bundle if event get type bundle event started we re getting notified that the bundle has been started make sure it s still active it may have been shut down between the time this event was queued and now if get bundle get state bundle active refresh plugin actions fc remove bundle listener this bundlelistener bundlelistener bundlechanged bundleevent getbundle getbundle gettype bundleevent getbundle getstate refreshpluginactions removebundlelistener the code abstractui plugin code implementation of this code plugin code method saves this plug in s preference and dialog stores and shuts down its image registry if they are in use subclasses may extend this method but must send super b last b a try finally statement should be used where necessary to ensure that code super shutdown code is always done inherit doc since 3 0 public void stop bundle context context throws exception try if bundle listener null context remove bundle listener bundle listener save dialog settings save preference store preference store null image registry null finally super stop context abstractuiplugin inheritdoc bundlecontext bundlelistener removebundlelistener bundlelistener savedialogsettings savepreferencestore preferencestore imageregistry creates and returns a new image descriptor for an image file located within the specified plug in p this is a convenience method that simply locates the image file in within the plug in no image registries are involved the path is relative to the root of the plug in and takes into account files coming from plug in fragments the path may include arg elements however the path must not have a leading or path separator clients should use a path like icons mysample gif rather than icons mysample gif or icons mysample gif p param plugin id the id of the plug in containing the image file code null code is returned if the plug in does not exist param image file path the relative path of the image file relative to the root of the plug in the path must be legal return an image descriptor or code null code if no image could be found since 3 0 public static image descriptor image descriptor from plugin string plugin id string image file path if plugin id null image file path null throw new illegal argument exception if the bundle is not ready then there is no image bundle bundle platform get bundle plugin id if bundle utility is ready bundle return null look for the image this will check both the plugin and fragment folders url full path string bundle utility find bundle image file path if full path string null try full path string new url image file path catch malformedurl exception e return null if full path string null return null return image descriptor create fromurl full path string pluginid imagefilepath imagedescriptor imagedescriptorfromplugin pluginid imagefilepath pluginid imagefilepath illegalargumentexception getbundle pluginid bundleutility isready fullpathstring bundleutility imagefilepath fullpathstring fullpathstring imagefilepath malformedurlexception fullpathstring imagedescriptor createfromurl fullpathstring for internal workbench use only returns the path to a location in the file system that can be used to persist restore state between workbench invocations if the location did not exist prior to this call it will be created returns code null code if no such location is available return path to a location in the file system where this plug in can persist data between sessions or code null code if no such location is available since 3 1 private i path get state location or null try return get state location catch illegal state exception e this occurs if data none is explicitly specified so ignore this silently is this ok see bug 85071 return null ipath getstatelocationornull getstatelocation illegalstateexception creates an abstract ui plug in runtime object for the given plug in descriptor p note that instances of plug in runtime classes are automatically created by the platform in the course of plug in activation p param descriptor the plug in descriptor see plugin plugin org eclipse core runtime i plugin descriptor descriptor deprecated in eclipse 3 0 this constructor has been replaced by link abstractui plugin implementations of code my plugin i plugin descriptor descriptor code should be changed to code my plugin code and call code super code instead of code super descriptor code the code my plugin i plugin descriptor descriptor code constructor is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in or as in this case subclasses which might public abstractui plugin i plugin descriptor descriptor super descriptor iplugindescriptor abstractuiplugin myplugin iplugindescriptor myplugin myplugin iplugindescriptor abstractuiplugin iplugindescriptor creates an abstract ui plug in runtime object p plug in runtime classes are code bundle activators code and so must have an default constructor this method is called by the runtime when the associated bundle is being activated p for more details see code plugin code s default constructor see plugin plugin since 3 0 public abstractui plugin super bundleactivators abstractuiplugin returns a new image registry for this plugin in the registry will be used to manage images which are frequently used by the plugin in p the default implementation of this method creates an empty registry subclasses may override this method if needed p return image registry the resulting registry see get image registry protected image registry create image registry if we are in the ui thread use that if display get current null return new image registry display get current if platformui is workbench running return new image registry platformui get workbench get display invalid thread access if it is not the ui thread and the workbench is not created throw new swt error swt error thread invalid access imageregistry getimageregistry imageregistry createimageregistry getcurrent imageregistry getcurrent isworkbenchrunning imageregistry getworkbench getdisplay swterror error_thread_invalid_access returns the dialog settings for this ui plug in the dialog settings is used to hold persistent state data for the various wizards and dialogs of this plug in in the context of a workbench p if an error occurs reading the dialog store an empty one is quietly created and returned p p subclasses may override this method but are not expected to p return the dialog settings public i dialog settings get dialog settings if dialog settings null load dialog settings return dialog settings idialogsettings getdialogsettings dialogsettings loaddialogsettings dialogsettings returns the image registry for this ui plug in p the image registry contains the images used by this plug in that are very frequently used and so need to be globally shared within the plug in since many o ss have a severe limit on the number of images that can be in memory at any given time a plug in should only keep a small number of images in their registry p subclasses should reimplement code initialize image registry code if they have custom graphic images to load p p subclasses may override this method but are not expected to p return the image registry public image registry get image registry if image registry null image registry create image registry initialize image registry image registry return image registry oss initializeimageregistry imageregistry getimageregistry imageregistry imageregistry createimageregistry initializeimageregistry imageregistry imageregistry returns the preference store for this ui plug in this preference store is used to hold persistent settings for this plug in in the context of a workbench some of these settings will be user controlled whereas others may be internal setting that are never exposed to the user p if an error occurs reading the preference store an empty preference store is quietly created initialized with defaults and returned p p strong note strong as of eclipse 3 1 this method is no longer referring to the core runtime compatibility layer and so plug ins relying on plugin initialize default preferences will have to access the compatibility layer themselves p return the preference store public i preference store get preference store create the preference store lazily if preference store null preference store new scoped preference store new instance scope get bundle get symbolic name return preference store initializedefaultpreferences ipreferencestore getpreferencestore preferencestore preferencestore scopedpreferencestore instancescope getbundle getsymbolicname preferencestore returns the platform ui workbench p this method exists as a convenience for plugin implementors the workbench can also be accessed by invoking code platformui get workbench code p return i workbench the workbench for this plug in public i workbench get workbench return platformui get workbench getworkbench iworkbench iworkbench getworkbench getworkbench initializes a preference store with default preference values for this plug in p this method is called after the preference store is initially loaded default values are never stored in preference stores p p the default implementation of this method does nothing subclasses should reimplement this method if the plug in has any preferences p p a subclass may reimplement this method to set default values for the preference store using j face api this is the older way of initializing default values if this method is reimplemented do not override code initialize default plugin preferences code p param store the preference store to fill deprecated this is only called if the runtime compatibility layer is present see link initialize default plugin preferences protected void initialize default preferences i preference store store spec ed to do nothing jface initializedefaultpluginpreferences initializedefaultpluginpreferences initializedefaultpreferences ipreferencestore the code abstractui plugin code implementation of this code plugin code method forwards to code initialize default preferences i preference store code p a subclass may reimplement this method to set default values for the core runtime preference store in the standard way this is the recommended way to do this the older code initialize default preferences i preference store code method serves a similar purpose if this method is reimplemented do not send super and do not override code initialize default preferences i preference store code p deprecated this is only called if the runtime compatibility layer is present see the deprecated comment in link plugin initialize default plugin preferences see initialize default preferences since 2 0 protected void initialize default plugin preferences n b by the time this method is called the plug in has a core runtime preference store no default values call load preference store only for backwards compatibility with eclipse 1 0 load preference store call initialize default preferences only for backwards compatibility with eclipse 1 0 initialize default preferences get preference store abstractuiplugin initializedefaultpreferences ipreferencestore initializedefaultpreferences ipreferencestore initializedefaultpreferences ipreferencestore initializedefaultpluginpreferences initializedefaultpreferences initializedefaultpluginpreferences loadpreferencestore loadpreferencestore initializedefaultpreferences initializedefaultpreferences getpreferencestore initializes an image registry with images which are frequently used by the plugin p the image registry contains the images used by this plug in that are very frequently used and so need to be globally shared within the plug in since many o ss have a severe limit on the number of images that can be in memory at any given time each plug in should only keep a small number of images in its registry p p implementors should create a j face image descriptor for each frequently used image the descriptors describe how to create find the image should it be needed the image described by the descriptor is not actually allocated until someone retrieves it p p subclasses may override this method to fill the image registry p param reg the registry to initalize see get image registry protected void initialize image registry image registry reg spec ed to do nothing oss jface getimageregistry initializeimageregistry imageregistry loads the dialog settings for this plug in the default implementation first looks for a standard named file in the plug in s read write state area if no such file exists the plug in s install directory is checked to see if one was installed with some default settings if no file is found in either place a new empty dialog settings is created if a problem occurs an empty settings is silently used p this framework method may be overridden although this is typically unnecessary p protected void load dialog settings dialog settings new dialog settings workbench non nls 1 bug 69387 the instance area should not be created in the call to get state location if data none or data no default was used i path data location get state location or null if data location null try r w state area in the local file system string read write path data location append fn dialog settings toos string file settings file new file read write path if settings file exists try dialog settings load read write path catch io exception e load failed so ensure we have an empty settings dialog settings new dialog settings workbench non nls 1 return otherwise look for bundle specific dialog settings url dsurl bundle utility find get bundle fn dialog settings if dsurl null return input stream is null try is dsurl open stream buffered reader reader new buffered reader new input stream reader is utf 8 non nls 1 dialog settings load reader catch io exception e load failed so ensure we have an empty settings dialog settings new dialog settings workbench non nls 1 finally try if is null is close catch io exception e do nothing loaddialogsettings dialogsettings dialogsettings getstatelocation nodefault ipath datalocation getstatelocationornull datalocation readwritepath datalocation fn_dialog_settings toosstring settingsfile readwritepath settingsfile dialogsettings readwritepath ioexception dialogsettings dialogsettings bundleutility getbundle fn_dialog_settings inputstream openstream bufferedreader bufferedreader inputstreamreader dialogsettings ioexception dialogsettings dialogsettings ioexception loads the preference store for this plug in the default implementation looks for a standard named file in the plug in s read write state area if no file is found or a problem occurs a new empty preference store is silently created p this framework method may be overridden although this is typically unnecessary p deprecated as of eclipse 2 0 a basic preference store exists for all plug ins this method now exists only for backwards compatibility it is called as the plug in s preference store is being initialized the plug ins preferences are loaded from the file regardless of what this method does protected void load preference store do nothing by default loadpreferencestore refreshes the actions for the plugin this method is called from code startup code p this framework method may be overridden although this is typically unnecessary p protected void refresh plugin actions if the workbench is not started yet or is no longer running do nothing if platformui is workbench running return startup is not guaranteed to be called in the ui thread but refresh plugin actions must run in the ui thread so use async exec see bug 6623 for more details display get default async exec new runnable public void run w win plugin action refresh action list refreshpluginactions isworkbenchrunning refreshpluginactions asyncexec getdefault asyncexec wwinpluginaction refreshactionlist so use async exec see bug 6623 for more details display get default async exec new runnable public void run w win plugin action refresh action list asyncexec getdefault asyncexec wwinpluginaction refreshactionlist saves this plug in s dialog settings any problems which arise are silently ignored protected void save dialog settings if dialog settings null return try i path path get state location or null if path null return string read write path path append fn dialog settings toos string dialog settings save read write path catch io exception e spec ed to ignore problems catch illegal state exception e spec ed to ignore problems savedialogsettings dialogsettings ipath getstatelocationornull readwritepath fn_dialog_settings toosstring dialogsettings readwritepath ioexception illegalstateexception saves this plug in s preference store any problems which arise are silently ignored see plugin save plugin preferences deprecated as of eclipse 2 0 preferences exist for all plug ins the equivalent of this method is code plugin save plugin preferences code this method now calls code save plugin preferences code and exists only for backwards compatibility protected void save preference store save plugin preferences savepluginpreferences savepluginpreferences savepluginpreferences savepreferencestore savepluginpreferences the code abstractui plugin code implementation of this code plugin code method does nothing subclasses may extend this method but must send super first p warning plug ins may not be started in the ui thread the code startup code method should not assume that its code runs in the ui thread otherwise swt thread exceptions may occur on startup deprecated in eclipse 3 0 code startup code has been replaced by link plugin start bundle context context implementations of code startup code should be changed to extend code start bundle context context code and call code super start context code instead of code super startup code like code super startup code code super stop context code must be called as the very first thing the code startup code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in in contrast the code start code method is always called public void startup throws core exception this method no longer does anything the code that used to be here in 2 1 has moved to start bundle context super startup abstractuiplugin bundlecontext bundlecontext coreexception bundlecontext the code abstractui plugin code implementation of this code plugin code method does nothing subclasses may extend this method but must send super first deprecated in eclipse 3 0 code shutdown code has been replaced by link plugin stop bundle context context implementations of code shutdown code should be changed to extend code stop bundle context context code and call code super stop context code instead of code super shutdown code unlike code super shutdown code code super stop context code must be called as the very b last b thing rather than as the very first thing the code shutdown code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in in contrast the code stop code method is always called public void shutdown throws core exception this method no longer does anything interesting the code that used to be here in 2 1 has moved to stop bundle context which is called regardless of whether the plug in being instantiated requires org eclipse core runtime compatibility super shutdown abstractuiplugin bundlecontext bundlecontext coreexception bundlecontext the code abstractui plugin code implementation of this code plugin code method refreshes the plug in actions subclasses may extend this method but must send super b first b inherit doc since 3 0 public void start bundle context context throws exception super start context final bundle context fc context should only attempt refresh plugin actions once the bundle has been fully started otherwise action delegates can be created while in the process of creating a triggering action delegate if ui events are processed during startup also if the start throws an exception the bundle will be shut down we don t want to have created any delegates if this happens see bug 63324 for more details bundle listener new bundle listener public void bundle changed bundle event event if event get bundle get bundle if event get type bundle event started we re getting notified that the bundle has been started make sure it s still active it may have been shut down between the time this event was queued and now if get bundle get state bundle active refresh plugin actions fc remove bundle listener this context add bundle listener bundle listener bundle listener is removed in stop bundle context abstractuiplugin inheritdoc bundlecontext bundlecontext refreshpluginactions bundlelistener bundlelistener bundlechanged bundleevent getbundle getbundle gettype bundleevent getbundle getstate refreshpluginactions removebundlelistener addbundlelistener bundlelistener bundlelistener bundlecontext bundle listener new bundle listener public void bundle changed bundle event event if event get bundle get bundle if event get type bundle event started we re getting notified that the bundle has been started make sure it s still active it may have been shut down between the time this event was queued and now if get bundle get state bundle active refresh plugin actions fc remove bundle listener this bundlelistener bundlelistener bundlechanged bundleevent getbundle getbundle gettype bundleevent getbundle getstate refreshpluginactions removebundlelistener the code abstractui plugin code implementation of this code plugin code method saves this plug in s preference and dialog stores and shuts down its image registry if they are in use subclasses may extend this method but must send super b last b a try finally statement should be used where necessary to ensure that code super shutdown code is always done inherit doc since 3 0 public void stop bundle context context throws exception try if bundle listener null context remove bundle listener bundle listener save dialog settings save preference store preference store null image registry null finally super stop context abstractuiplugin inheritdoc bundlecontext bundlelistener removebundlelistener bundlelistener savedialogsettings savepreferencestore preferencestore imageregistry creates and returns a new image descriptor for an image file located within the specified plug in p this is a convenience method that simply locates the image file in within the plug in no image registries are involved the path is relative to the root of the plug in and takes into account files coming from plug in fragments the path may include arg elements however the path must not have a leading or path separator clients should use a path like icons mysample gif rather than icons mysample gif or icons mysample gif p param plugin id the id of the plug in containing the image file code null code is returned if the plug in does not exist param image file path the relative path of the image file relative to the root of the plug in the path must be legal return an image descriptor or code null code if no image could be found since 3 0 public static image descriptor image descriptor from plugin string plugin id string image file path if plugin id null image file path null throw new illegal argument exception if the bundle is not ready then there is no image bundle bundle platform get bundle plugin id if bundle utility is ready bundle return null look for the image this will check both the plugin and fragment folders url full path string bundle utility find bundle image file path if full path string null try full path string new url image file path catch malformedurl exception e return null if full path string null return null return image descriptor create fromurl full path string pluginid imagefilepath imagedescriptor imagedescriptorfromplugin pluginid imagefilepath pluginid imagefilepath illegalargumentexception getbundle pluginid bundleutility isready fullpathstring bundleutility imagefilepath fullpathstring fullpathstring imagefilepath malformedurlexception fullpathstring imagedescriptor createfromurl fullpathstring for internal workbench use only returns the path to a location in the file system that can be used to persist restore state between workbench invocations if the location did not exist prior to this call it will be created returns code null code if no such location is available return path to a location in the file system where this plug in can persist data between sessions or code null code if no such location is available since 3 1 private i path get state location or null try return get state location catch illegal state exception e this occurs if data none is explicitly specified so ignore this silently is this ok see bug 85071 return null ipath getstatelocationornull getstatelocation illegalstateexception creates an abstract ui plug in runtime object for the given plug in descriptor p note that instances of plug in runtime classes are automatically created by the platform in the course of plug in activation p param descriptor the plug in descriptor see plugin plugin org eclipse core runtime i plugin descriptor descriptor deprecated in eclipse 3 0 this constructor has been replaced by link abstractui plugin implementations of code my plugin i plugin descriptor descriptor code should be changed to code my plugin code and call code super code instead of code super descriptor code the code my plugin i plugin descriptor descriptor code constructor is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in or as in this case subclasses which might public abstractui plugin i plugin descriptor descriptor super descriptor iplugindescriptor abstractuiplugin myplugin iplugindescriptor myplugin myplugin iplugindescriptor abstractuiplugin iplugindescriptor creates an abstract ui plug in runtime object p plug in runtime classes are code bundle activators code and so must have an default constructor this method is called by the runtime when the associated bundle is being activated p for more details see code plugin code s default constructor see plugin plugin since 3 0 public abstractui plugin super bundleactivators abstractuiplugin returns a new image registry for this plugin in the registry will be used to manage images which are frequently used by the plugin in p the default implementation of this method creates an empty registry subclasses may override this method if needed p return image registry the resulting registry see get image registry protected image registry create image registry if we are in the ui thread use that if display get current null return new image registry display get current if platformui is workbench running return new image registry platformui get workbench get display invalid thread access if it is not the ui thread and the workbench is not created throw new swt error swt error thread invalid access imageregistry getimageregistry imageregistry createimageregistry getcurrent imageregistry getcurrent isworkbenchrunning imageregistry getworkbench getdisplay swterror error_thread_invalid_access returns the dialog settings for this ui plug in the dialog settings is used to hold persistent state data for the various wizards and dialogs of this plug in in the context of a workbench p if an error occurs reading the dialog store an empty one is quietly created and returned p p subclasses may override this method but are not expected to p return the dialog settings public i dialog settings get dialog settings if dialog settings null load dialog settings return dialog settings idialogsettings getdialogsettings dialogsettings loaddialogsettings dialogsettings returns the image registry for this ui plug in p the image registry contains the images used by this plug in that are very frequently used and so need to be globally shared within the plug in since many o ss have a severe limit on the number of images that can be in memory at any given time a plug in should only keep a small number of images in their registry p subclasses should reimplement code initialize image registry code if they have custom graphic images to load p p subclasses may override this method but are not expected to p return the image registry public image registry get image registry if image registry null image registry create image registry initialize image registry image registry return image registry oss initializeimageregistry imageregistry getimageregistry imageregistry imageregistry createimageregistry initializeimageregistry imageregistry imageregistry returns the preference store for this ui plug in this preference store is used to hold persistent settings for this plug in in the context of a workbench some of these settings will be user controlled whereas others may be internal setting that are never exposed to the user p if an error occurs reading the preference store an empty preference store is quietly created initialized with defaults and returned p p strong note strong as of eclipse 3 1 this method is no longer referring to the core runtime compatibility layer and so plug ins relying on plugin initialize default preferences will have to access the compatibility layer themselves p return the preference store public i preference store get preference store create the preference store lazily if preference store null preference store new scoped preference store new instance scope get bundle get symbolic name return preference store initializedefaultpreferences ipreferencestore getpreferencestore preferencestore preferencestore scopedpreferencestore instancescope getbundle getsymbolicname preferencestore returns the platform ui workbench p this method exists as a convenience for plugin implementors the workbench can also be accessed by invoking code platformui get workbench code p return i workbench the workbench for this plug in public i workbench get workbench return platformui get workbench getworkbench iworkbench iworkbench getworkbench getworkbench initializes a preference store with default preference values for this plug in p this method is called after the preference store is initially loaded default values are never stored in preference stores p p the default implementation of this method does nothing subclasses should reimplement this method if the plug in has any preferences p p a subclass may reimplement this method to set default values for the preference store using j face api this is the older way of initializing default values if this method is reimplemented do not override code initialize default plugin preferences code p param store the preference store to fill deprecated this is only called if the runtime compatibility layer is present see link initialize default plugin preferences protected void initialize default preferences i preference store store spec ed to do nothing jface initializedefaultpluginpreferences initializedefaultpluginpreferences initializedefaultpreferences ipreferencestore the code abstractui plugin code implementation of this code plugin code method forwards to code initialize default preferences i preference store code p a subclass may reimplement this method to set default values for the core runtime preference store in the standard way this is the recommended way to do this the older code initialize default preferences i preference store code method serves a similar purpose if this method is reimplemented do not send super and do not override code initialize default preferences i preference store code p deprecated this is only called if the runtime compatibility layer is present see the deprecated comment in link plugin initialize default plugin preferences see initialize default preferences since 2 0 protected void initialize default plugin preferences n b by the time this method is called the plug in has a core runtime preference store no default values call load preference store only for backwards compatibility with eclipse 1 0 load preference store call initialize default preferences only for backwards compatibility with eclipse 1 0 initialize default preferences get preference store abstractuiplugin initializedefaultpreferences ipreferencestore initializedefaultpreferences ipreferencestore initializedefaultpreferences ipreferencestore initializedefaultpluginpreferences initializedefaultpreferences initializedefaultpluginpreferences loadpreferencestore loadpreferencestore initializedefaultpreferences initializedefaultpreferences getpreferencestore initializes an image registry with images which are frequently used by the plugin p the image registry contains the images used by this plug in that are very frequently used and so need to be globally shared within the plug in since many o ss have a severe limit on the number of images that can be in memory at any given time each plug in should only keep a small number of images in its registry p p implementors should create a j face image descriptor for each frequently used image the descriptors describe how to create find the image should it be needed the image described by the descriptor is not actually allocated until someone retrieves it p p subclasses may override this method to fill the image registry p param reg the registry to initalize see get image registry protected void initialize image registry image registry reg spec ed to do nothing oss jface getimageregistry initializeimageregistry imageregistry loads the dialog settings for this plug in the default implementation first looks for a standard named file in the plug in s read write state area if no such file exists the plug in s install directory is checked to see if one was installed with some default settings if no file is found in either place a new empty dialog settings is created if a problem occurs an empty settings is silently used p this framework method may be overridden although this is typically unnecessary p protected void load dialog settings dialog settings new dialog settings workbench non nls 1 bug 69387 the instance area should not be created in the call to get state location if data none or data no default was used i path data location get state location or null if data location null try r w state area in the local file system string read write path data location append fn dialog settings toos string file settings file new file read write path if settings file exists try dialog settings load read write path catch io exception e load failed so ensure we have an empty settings dialog settings new dialog settings workbench non nls 1 return otherwise look for bundle specific dialog settings url dsurl bundle utility find get bundle fn dialog settings if dsurl null return input stream is null try is dsurl open stream buffered reader reader new buffered reader new input stream reader is utf 8 non nls 1 dialog settings load reader catch io exception e load failed so ensure we have an empty settings dialog settings new dialog settings workbench non nls 1 finally try if is null is close catch io exception e do nothing loaddialogsettings dialogsettings dialogsettings getstatelocation nodefault ipath datalocation getstatelocationornull datalocation readwritepath datalocation fn_dialog_settings toosstring settingsfile readwritepath settingsfile dialogsettings readwritepath ioexception dialogsettings dialogsettings bundleutility getbundle fn_dialog_settings inputstream openstream bufferedreader bufferedreader inputstreamreader dialogsettings ioexception dialogsettings dialogsettings ioexception loads the preference store for this plug in the default implementation looks for a standard named file in the plug in s read write state area if no file is found or a problem occurs a new empty preference store is silently created p this framework method may be overridden although this is typically unnecessary p deprecated as of eclipse 2 0 a basic preference store exists for all plug ins this method now exists only for backwards compatibility it is called as the plug in s preference store is being initialized the plug ins preferences are loaded from the file regardless of what this method does protected void load preference store do nothing by default loadpreferencestore refreshes the actions for the plugin this method is called from code startup code p this framework method may be overridden although this is typically unnecessary p protected void refresh plugin actions if the workbench is not started yet or is no longer running do nothing if platformui is workbench running return startup is not guaranteed to be called in the ui thread but refresh plugin actions must run in the ui thread so use async exec see bug 6623 for more details display get default async exec new runnable public void run w win plugin action refresh action list refreshpluginactions isworkbenchrunning refreshpluginactions asyncexec getdefault asyncexec wwinpluginaction refreshactionlist so use async exec see bug 6623 for more details display get default async exec new runnable public void run w win plugin action refresh action list asyncexec getdefault asyncexec wwinpluginaction refreshactionlist saves this plug in s dialog settings any problems which arise are silently ignored protected void save dialog settings if dialog settings null return try i path path get state location or null if path null return string read write path path append fn dialog settings toos string dialog settings save read write path catch io exception e spec ed to ignore problems catch illegal state exception e spec ed to ignore problems savedialogsettings dialogsettings ipath getstatelocationornull readwritepath fn_dialog_settings toosstring dialogsettings readwritepath ioexception illegalstateexception saves this plug in s preference store any problems which arise are silently ignored see plugin save plugin preferences deprecated as of eclipse 2 0 preferences exist for all plug ins the equivalent of this method is code plugin save plugin preferences code this method now calls code save plugin preferences code and exists only for backwards compatibility protected void save preference store save plugin preferences savepluginpreferences savepluginpreferences savepluginpreferences savepreferencestore savepluginpreferences the code abstractui plugin code implementation of this code plugin code method does nothing subclasses may extend this method but must send super first p warning plug ins may not be started in the ui thread the code startup code method should not assume that its code runs in the ui thread otherwise swt thread exceptions may occur on startup deprecated in eclipse 3 0 code startup code has been replaced by link plugin start bundle context context implementations of code startup code should be changed to extend code start bundle context context code and call code super start context code instead of code super startup code like code super startup code code super stop context code must be called as the very first thing the code startup code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in in contrast the code start code method is always called public void startup throws core exception this method no longer does anything the code that used to be here in 2 1 has moved to start bundle context super startup abstractuiplugin bundlecontext bundlecontext coreexception bundlecontext the code abstractui plugin code implementation of this code plugin code method does nothing subclasses may extend this method but must send super first deprecated in eclipse 3 0 code shutdown code has been replaced by link plugin stop bundle context context implementations of code shutdown code should be changed to extend code stop bundle context context code and call code super stop context code instead of code super shutdown code unlike code super shutdown code code super stop context code must be called as the very b last b thing rather than as the very first thing the code shutdown code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in in contrast the code stop code method is always called public void shutdown throws core exception this method no longer does anything interesting the code that used to be here in 2 1 has moved to stop bundle context which is called regardless of whether the plug in being instantiated requires org eclipse core runtime compatibility super shutdown abstractuiplugin bundlecontext bundlecontext coreexception bundlecontext the code abstractui plugin code implementation of this code plugin code method refreshes the plug in actions subclasses may extend this method but must send super b first b inherit doc since 3 0 public void start bundle context context throws exception super start context final bundle context fc context should only attempt refresh plugin actions once the bundle has been fully started otherwise action delegates can be created while in the process of creating a triggering action delegate if ui events are processed during startup also if the start throws an exception the bundle will be shut down we don t want to have created any delegates if this happens see bug 63324 for more details bundle listener new bundle listener public void bundle changed bundle event event if event get bundle get bundle if event get type bundle event started we re getting notified that the bundle has been started make sure it s still active it may have been shut down between the time this event was queued and now if get bundle get state bundle active refresh plugin actions fc remove bundle listener this context add bundle listener bundle listener bundle listener is removed in stop bundle context abstractuiplugin inheritdoc bundlecontext bundlecontext refreshpluginactions bundlelistener bundlelistener bundlechanged bundleevent getbundle getbundle gettype bundleevent getbundle getstate refreshpluginactions removebundlelistener addbundlelistener bundlelistener bundlelistener bundlecontext bundle listener new bundle listener public void bundle changed bundle event event if event get bundle get bundle if event get type bundle event started we re getting notified that the bundle has been started make sure it s still active it may have been shut down between the time this event was queued and now if get bundle get state bundle active refresh plugin actions fc remove bundle listener this bundlelistener bundlelistener bundlechanged bundleevent getbundle getbundle gettype bundleevent getbundle getstate refreshpluginactions removebundlelistener the code abstractui plugin code implementation of this code plugin code method saves this plug in s preference and dialog stores and shuts down its image registry if they are in use subclasses may extend this method but must send super b last b a try finally statement should be used where necessary to ensure that code super shutdown code is always done inherit doc since 3 0 public void stop bundle context context throws exception try if bundle listener null context remove bundle listener bundle listener save dialog settings save preference store preference store null image registry null finally super stop context abstractuiplugin inheritdoc bundlecontext bundlelistener removebundlelistener bundlelistener savedialogsettings savepreferencestore preferencestore imageregistry creates and returns a new image descriptor for an image file located within the specified plug in p this is a convenience method that simply locates the image file in within the plug in no image registries are involved the path is relative to the root of the plug in and takes into account files coming from plug in fragments the path may include arg elements however the path must not have a leading or path separator clients should use a path like icons mysample gif rather than icons mysample gif or icons mysample gif p param plugin id the id of the plug in containing the image file code null code is returned if the plug in does not exist param image file path the relative path of the image file relative to the root of the plug in the path must be legal return an image descriptor or code null code if no image could be found since 3 0 public static image descriptor image descriptor from plugin string plugin id string image file path if plugin id null image file path null throw new illegal argument exception if the bundle is not ready then there is no image bundle bundle platform get bundle plugin id if bundle utility is ready bundle return null look for the image this will check both the plugin and fragment folders url full path string bundle utility find bundle image file path if full path string null try full path string new url image file path catch malformedurl exception e return null if full path string null return null return image descriptor create fromurl full path string pluginid imagefilepath imagedescriptor imagedescriptorfromplugin pluginid imagefilepath pluginid imagefilepath illegalargumentexception getbundle pluginid bundleutility isready fullpathstring bundleutility imagefilepath fullpathstring fullpathstring imagefilepath malformedurlexception fullpathstring imagedescriptor createfromurl fullpathstring for internal workbench use only returns the path to a location in the file system that can be used to persist restore state between workbench invocations if the location did not exist prior to this call it will be created returns code null code if no such location is available return path to a location in the file system where this plug in can persist data between sessions or code null code if no such location is available since 3 1 private i path get state location or null try return get state location catch illegal state exception e this occurs if data none is explicitly specified so ignore this silently is this ok see bug 85071 return null ipath getstatelocationornull getstatelocation illegalstateexception creates an abstract ui plug in runtime object for the given plug in descriptor p note that instances of plug in runtime classes are automatically created by the platform in the course of plug in activation p param descriptor the plug in descriptor see plugin plugin org eclipse core runtime i plugin descriptor descriptor deprecated in eclipse 3 0 this constructor has been replaced by link abstractui plugin implementations of code my plugin i plugin descriptor descriptor code should be changed to code my plugin code and call code super code instead of code super descriptor code the code my plugin i plugin descriptor descriptor code constructor is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in or as in this case subclasses which might public abstractui plugin i plugin descriptor descriptor super descriptor iplugindescriptor abstractuiplugin myplugin iplugindescriptor myplugin myplugin iplugindescriptor abstractuiplugin iplugindescriptor creates an abstract ui plug in runtime object p plug in runtime classes are code bundle activators code and so must have an default constructor this method is called by the runtime when the associated bundle is being activated p for more details see code plugin code s default constructor see plugin plugin since 3 0 public abstractui plugin super bundleactivators abstractuiplugin returns a new image registry for this plugin in the registry will be used to manage images which are frequently used by the plugin in p the default implementation of this method creates an empty registry subclasses may override this method if needed p return image registry the resulting registry see get image registry protected image registry create image registry if we are in the ui thread use that if display get current null return new image registry display get current if platformui is workbench running return new image registry platformui get workbench get display invalid thread access if it is not the ui thread and the workbench is not created throw new swt error swt error thread invalid access imageregistry getimageregistry imageregistry createimageregistry getcurrent imageregistry getcurrent isworkbenchrunning imageregistry getworkbench getdisplay swterror error_thread_invalid_access returns the dialog settings for this ui plug in the dialog settings is used to hold persistent state data for the various wizards and dialogs of this plug in in the context of a workbench p if an error occurs reading the dialog store an empty one is quietly created and returned p p subclasses may override this method but are not expected to p return the dialog settings public i dialog settings get dialog settings if dialog settings null load dialog settings return dialog settings idialogsettings getdialogsettings dialogsettings loaddialogsettings dialogsettings returns the image registry for this ui plug in p the image registry contains the images used by this plug in that are very frequently used and so need to be globally shared within the plug in since many o ss have a severe limit on the number of images that can be in memory at any given time a plug in should only keep a small number of images in their registry p subclasses should reimplement code initialize image registry code if they have custom graphic images to load p p subclasses may override this method but are not expected to p return the image registry public image registry get image registry if image registry null image registry create image registry initialize image registry image registry return image registry oss initializeimageregistry imageregistry getimageregistry imageregistry imageregistry createimageregistry initializeimageregistry imageregistry imageregistry returns the preference store for this ui plug in this preference store is used to hold persistent settings for this plug in in the context of a workbench some of these settings will be user controlled whereas others may be internal setting that are never exposed to the user p if an error occurs reading the preference store an empty preference store is quietly created initialized with defaults and returned p p strong note strong as of eclipse 3 1 this method is no longer referring to the core runtime compatibility layer and so plug ins relying on plugin initialize default preferences will have to access the compatibility layer themselves p return the preference store public i preference store get preference store create the preference store lazily if preference store null preference store new scoped preference store new instance scope get bundle get symbolic name return preference store initializedefaultpreferences ipreferencestore getpreferencestore preferencestore preferencestore scopedpreferencestore instancescope getbundle getsymbolicname preferencestore returns the platform ui workbench p this method exists as a convenience for plugin implementors the workbench can also be accessed by invoking code platformui get workbench code p return i workbench the workbench for this plug in public i workbench get workbench return platformui get workbench getworkbench iworkbench iworkbench getworkbench getworkbench initializes a preference store with default preference values for this plug in p this method is called after the preference store is initially loaded default values are never stored in preference stores p p the default implementation of this method does nothing subclasses should reimplement this method if the plug in has any preferences p p a subclass may reimplement this method to set default values for the preference store using j face api this is the older way of initializing default values if this method is reimplemented do not override code initialize default plugin preferences code p param store the preference store to fill deprecated this is only called if the runtime compatibility layer is present see link initialize default plugin preferences protected void initialize default preferences i preference store store spec ed to do nothing jface initializedefaultpluginpreferences initializedefaultpluginpreferences initializedefaultpreferences ipreferencestore the code abstractui plugin code implementation of this code plugin code method forwards to code initialize default preferences i preference store code p a subclass may reimplement this method to set default values for the core runtime preference store in the standard way this is the recommended way to do this the older code initialize default preferences i preference store code method serves a similar purpose if this method is reimplemented do not send super and do not override code initialize default preferences i preference store code p deprecated this is only called if the runtime compatibility layer is present see the deprecated comment in link plugin initialize default plugin preferences see initialize default preferences since 2 0 protected void initialize default plugin preferences n b by the time this method is called the plug in has a core runtime preference store no default values call load preference store only for backwards compatibility with eclipse 1 0 load preference store call initialize default preferences only for backwards compatibility with eclipse 1 0 initialize default preferences get preference store abstractuiplugin initializedefaultpreferences ipreferencestore initializedefaultpreferences ipreferencestore initializedefaultpreferences ipreferencestore initializedefaultpluginpreferences initializedefaultpreferences initializedefaultpluginpreferences loadpreferencestore loadpreferencestore initializedefaultpreferences initializedefaultpreferences getpreferencestore initializes an image registry with images which are frequently used by the plugin p the image registry contains the images used by this plug in that are very frequently used and so need to be globally shared within the plug in since many o ss have a severe limit on the number of images that can be in memory at any given time each plug in should only keep a small number of images in its registry p p implementors should create a j face image descriptor for each frequently used image the descriptors describe how to create find the image should it be needed the image described by the descriptor is not actually allocated until someone retrieves it p p subclasses may override this method to fill the image registry p param reg the registry to initalize see get image registry protected void initialize image registry image registry reg spec ed to do nothing oss jface getimageregistry initializeimageregistry imageregistry loads the dialog settings for this plug in the default implementation first looks for a standard named file in the plug in s read write state area if no such file exists the plug in s install directory is checked to see if one was installed with some default settings if no file is found in either place a new empty dialog settings is created if a problem occurs an empty settings is silently used p this framework method may be overridden although this is typically unnecessary p protected void load dialog settings dialog settings new dialog settings workbench non nls 1 bug 69387 the instance area should not be created in the call to get state location if data none or data no default was used i path data location get state location or null if data location null try r w state area in the local file system string read write path data location append fn dialog settings toos string file settings file new file read write path if settings file exists try dialog settings load read write path catch io exception e load failed so ensure we have an empty settings dialog settings new dialog settings workbench non nls 1 return otherwise look for bundle specific dialog settings url dsurl bundle utility find get bundle fn dialog settings if dsurl null return input stream is null try is dsurl open stream buffered reader reader new buffered reader new input stream reader is utf 8 non nls 1 dialog settings load reader catch io exception e load failed so ensure we have an empty settings dialog settings new dialog settings workbench non nls 1 finally try if is null is close catch io exception e do nothing loaddialogsettings dialogsettings dialogsettings getstatelocation nodefault ipath datalocation getstatelocationornull datalocation readwritepath datalocation fn_dialog_settings toosstring settingsfile readwritepath settingsfile dialogsettings readwritepath ioexception dialogsettings dialogsettings bundleutility getbundle fn_dialog_settings inputstream openstream bufferedreader bufferedreader inputstreamreader dialogsettings ioexception dialogsettings dialogsettings ioexception loads the preference store for this plug in the default implementation looks for a standard named file in the plug in s read write state area if no file is found or a problem occurs a new empty preference store is silently created p this framework method may be overridden although this is typically unnecessary p deprecated as of eclipse 2 0 a basic preference store exists for all plug ins this method now exists only for backwards compatibility it is called as the plug in s preference store is being initialized the plug ins preferences are loaded from the file regardless of what this method does protected void load preference store do nothing by default loadpreferencestore refreshes the actions for the plugin this method is called from code startup code p this framework method may be overridden although this is typically unnecessary p protected void refresh plugin actions if the workbench is not started yet or is no longer running do nothing if platformui is workbench running return startup is not guaranteed to be called in the ui thread but refresh plugin actions must run in the ui thread so use async exec see bug 6623 for more details display get default async exec new runnable public void run w win plugin action refresh action list refreshpluginactions isworkbenchrunning refreshpluginactions asyncexec getdefault asyncexec wwinpluginaction refreshactionlist so use async exec see bug 6623 for more details display get default async exec new runnable public void run w win plugin action refresh action list asyncexec getdefault asyncexec wwinpluginaction refreshactionlist saves this plug in s dialog settings any problems which arise are silently ignored protected void save dialog settings if dialog settings null return try i path path get state location or null if path null return string read write path path append fn dialog settings toos string dialog settings save read write path catch io exception e spec ed to ignore problems catch illegal state exception e spec ed to ignore problems savedialogsettings dialogsettings ipath getstatelocationornull readwritepath fn_dialog_settings toosstring dialogsettings readwritepath ioexception illegalstateexception saves this plug in s preference store any problems which arise are silently ignored see plugin save plugin preferences deprecated as of eclipse 2 0 preferences exist for all plug ins the equivalent of this method is code plugin save plugin preferences code this method now calls code save plugin preferences code and exists only for backwards compatibility protected void save preference store save plugin preferences savepluginpreferences savepluginpreferences savepluginpreferences savepreferencestore savepluginpreferences the code abstractui plugin code implementation of this code plugin code method does nothing subclasses may extend this method but must send super first p warning plug ins may not be started in the ui thread the code startup code method should not assume that its code runs in the ui thread otherwise swt thread exceptions may occur on startup deprecated in eclipse 3 0 code startup code has been replaced by link plugin start bundle context context implementations of code startup code should be changed to extend code start bundle context context code and call code super start context code instead of code super startup code like code super startup code code super stop context code must be called as the very first thing the code startup code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in in contrast the code start code method is always called public void startup throws core exception this method no longer does anything the code that used to be here in 2 1 has moved to start bundle context super startup abstractuiplugin bundlecontext bundlecontext coreexception bundlecontext the code abstractui plugin code implementation of this code plugin code method does nothing subclasses may extend this method but must send super first deprecated in eclipse 3 0 code shutdown code has been replaced by link plugin stop bundle context context implementations of code shutdown code should be changed to extend code stop bundle context context code and call code super stop context code instead of code super shutdown code unlike code super shutdown code code super stop context code must be called as the very b last b thing rather than as the very first thing the code shutdown code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in in contrast the code stop code method is always called public void shutdown throws core exception this method no longer does anything interesting the code that used to be here in 2 1 has moved to stop bundle context which is called regardless of whether the plug in being instantiated requires org eclipse core runtime compatibility super shutdown abstractuiplugin bundlecontext bundlecontext coreexception bundlecontext the code abstractui plugin code implementation of this code plugin code method refreshes the plug in actions subclasses may extend this method but must send super b first b inherit doc since 3 0 public void start bundle context context throws exception super start context final bundle context fc context should only attempt refresh plugin actions once the bundle has been fully started otherwise action delegates can be created while in the process of creating a triggering action delegate if ui events are processed during startup also if the start throws an exception the bundle will be shut down we don t want to have created any delegates if this happens see bug 63324 for more details bundle listener new bundle listener public void bundle changed bundle event event if event get bundle get bundle if event get type bundle event started we re getting notified that the bundle has been started make sure it s still active it may have been shut down between the time this event was queued and now if get bundle get state bundle active refresh plugin actions fc remove bundle listener this context add bundle listener bundle listener bundle listener is removed in stop bundle context abstractuiplugin inheritdoc bundlecontext bundlecontext refreshpluginactions bundlelistener bundlelistener bundlechanged bundleevent getbundle getbundle gettype bundleevent getbundle getstate refreshpluginactions removebundlelistener addbundlelistener bundlelistener bundlelistener bundlecontext bundle listener new bundle listener public void bundle changed bundle event event if event get bundle get bundle if event get type bundle event started we re getting notified that the bundle has been started make sure it s still active it may have been shut down between the time this event was queued and now if get bundle get state bundle active refresh plugin actions fc remove bundle listener this bundlelistener bundlelistener bundlechanged bundleevent getbundle getbundle gettype bundleevent getbundle getstate refreshpluginactions removebundlelistener the code abstractui plugin code implementation of this code plugin code method saves this plug in s preference and dialog stores and shuts down its image registry if they are in use subclasses may extend this method but must send super b last b a try finally statement should be used where necessary to ensure that code super shutdown code is always done inherit doc since 3 0 public void stop bundle context context throws exception try if bundle listener null context remove bundle listener bundle listener save dialog settings save preference store preference store null image registry null finally super stop context abstractuiplugin inheritdoc bundlecontext bundlelistener removebundlelistener bundlelistener savedialogsettings savepreferencestore preferencestore imageregistry creates and returns a new image descriptor for an image file located within the specified plug in p this is a convenience method that simply locates the image file in within the plug in no image registries are involved the path is relative to the root of the plug in and takes into account files coming from plug in fragments the path may include arg elements however the path must not have a leading or path separator clients should use a path like icons mysample gif rather than icons mysample gif or icons mysample gif p param plugin id the id of the plug in containing the image file code null code is returned if the plug in does not exist param image file path the relative path of the image file relative to the root of the plug in the path must be legal return an image descriptor or code null code if no image could be found since 3 0 public static image descriptor image descriptor from plugin string plugin id string image file path if plugin id null image file path null throw new illegal argument exception if the bundle is not ready then there is no image bundle bundle platform get bundle plugin id if bundle utility is ready bundle return null look for the image this will check both the plugin and fragment folders url full path string bundle utility find bundle image file path if full path string null try full path string new url image file path catch malformedurl exception e return null if full path string null return null return image descriptor create fromurl full path string pluginid imagefilepath imagedescriptor imagedescriptorfromplugin pluginid imagefilepath pluginid imagefilepath illegalargumentexception getbundle pluginid bundleutility isready fullpathstring bundleutility imagefilepath fullpathstring fullpathstring imagefilepath malformedurlexception fullpathstring imagedescriptor createfromurl fullpathstring for internal workbench use only returns the path to a location in the file system that can be used to persist restore state between workbench invocations if the location did not exist prior to this call it will be created returns code null code if no such location is available return path to a location in the file system where this plug in can persist data between sessions or code null code if no such location is available since 3 1 private i path get state location or null try return get state location catch illegal state exception e this occurs if data none is explicitly specified so ignore this silently is this ok see bug 85071 return null ipath getstatelocationornull getstatelocation illegalstateexception creates an abstract ui plug in runtime object for the given plug in descriptor p note that instances of plug in runtime classes are automatically created by the platform in the course of plug in activation p param descriptor the plug in descriptor see plugin plugin org eclipse core runtime i plugin descriptor descriptor deprecated in eclipse 3 0 this constructor has been replaced by link abstractui plugin implementations of code my plugin i plugin descriptor descriptor code should be changed to code my plugin code and call code super code instead of code super descriptor code the code my plugin i plugin descriptor descriptor code constructor is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in or as in this case subclasses which might public abstractui plugin i plugin descriptor descriptor super descriptor iplugindescriptor abstractuiplugin myplugin iplugindescriptor myplugin myplugin iplugindescriptor abstractuiplugin iplugindescriptor creates an abstract ui plug in runtime object p plug in runtime classes are code bundle activators code and so must have an default constructor this method is called by the runtime when the associated bundle is being activated p for more details see code plugin code s default constructor see plugin plugin since 3 0 public abstractui plugin super bundleactivators abstractuiplugin returns a new image registry for this plugin in the registry will be used to manage images which are frequently used by the plugin in p the default implementation of this method creates an empty registry subclasses may override this method if needed p return image registry the resulting registry see get image registry protected image registry create image registry if we are in the ui thread use that if display get current null return new image registry display get current if platformui is workbench running return new image registry platformui get workbench get display invalid thread access if it is not the ui thread and the workbench is not created throw new swt error swt error thread invalid access imageregistry getimageregistry imageregistry createimageregistry getcurrent imageregistry getcurrent isworkbenchrunning imageregistry getworkbench getdisplay swterror error_thread_invalid_access returns the dialog settings for this ui plug in the dialog settings is used to hold persistent state data for the various wizards and dialogs of this plug in in the context of a workbench p if an error occurs reading the dialog store an empty one is quietly created and returned p p subclasses may override this method but are not expected to p return the dialog settings public i dialog settings get dialog settings if dialog settings null load dialog settings return dialog settings idialogsettings getdialogsettings dialogsettings loaddialogsettings dialogsettings returns the image registry for this ui plug in p the image registry contains the images used by this plug in that are very frequently used and so need to be globally shared within the plug in since many o ss have a severe limit on the number of images that can be in memory at any given time a plug in should only keep a small number of images in their registry p subclasses should reimplement code initialize image registry code if they have custom graphic images to load p p subclasses may override this method but are not expected to p return the image registry public image registry get image registry if image registry null image registry create image registry initialize image registry image registry return image registry oss initializeimageregistry imageregistry getimageregistry imageregistry imageregistry createimageregistry initializeimageregistry imageregistry imageregistry returns the preference store for this ui plug in this preference store is used to hold persistent settings for this plug in in the context of a workbench some of these settings will be user controlled whereas others may be internal setting that are never exposed to the user p if an error occurs reading the preference store an empty preference store is quietly created initialized with defaults and returned p p strong note strong as of eclipse 3 1 this method is no longer referring to the core runtime compatibility layer and so plug ins relying on plugin initialize default preferences will have to access the compatibility layer themselves p return the preference store public i preference store get preference store create the preference store lazily if preference store null preference store new scoped preference store new instance scope get bundle get symbolic name return preference store initializedefaultpreferences ipreferencestore getpreferencestore preferencestore preferencestore scopedpreferencestore instancescope getbundle getsymbolicname preferencestore returns the platform ui workbench p this method exists as a convenience for plugin implementors the workbench can also be accessed by invoking code platformui get workbench code p return i workbench the workbench for this plug in public i workbench get workbench return platformui get workbench getworkbench iworkbench iworkbench getworkbench getworkbench initializes a preference store with default preference values for this plug in p this method is called after the preference store is initially loaded default values are never stored in preference stores p p the default implementation of this method does nothing subclasses should reimplement this method if the plug in has any preferences p p a subclass may reimplement this method to set default values for the preference store using j face api this is the older way of initializing default values if this method is reimplemented do not override code initialize default plugin preferences code p param store the preference store to fill deprecated this is only called if the runtime compatibility layer is present see link initialize default plugin preferences protected void initialize default preferences i preference store store spec ed to do nothing jface initializedefaultpluginpreferences initializedefaultpluginpreferences initializedefaultpreferences ipreferencestore the code abstractui plugin code implementation of this code plugin code method forwards to code initialize default preferences i preference store code p a subclass may reimplement this method to set default values for the core runtime preference store in the standard way this is the recommended way to do this the older code initialize default preferences i preference store code method serves a similar purpose if this method is reimplemented do not send super and do not override code initialize default preferences i preference store code p deprecated this is only called if the runtime compatibility layer is present see the deprecated comment in link plugin initialize default plugin preferences see initialize default preferences since 2 0 protected void initialize default plugin preferences n b by the time this method is called the plug in has a core runtime preference store no default values call load preference store only for backwards compatibility with eclipse 1 0 load preference store call initialize default preferences only for backwards compatibility with eclipse 1 0 initialize default preferences get preference store abstractuiplugin initializedefaultpreferences ipreferencestore initializedefaultpreferences ipreferencestore initializedefaultpreferences ipreferencestore initializedefaultpluginpreferences initializedefaultpreferences initializedefaultpluginpreferences loadpreferencestore loadpreferencestore initializedefaultpreferences initializedefaultpreferences getpreferencestore initializes an image registry with images which are frequently used by the plugin p the image registry contains the images used by this plug in that are very frequently used and so need to be globally shared within the plug in since many o ss have a severe limit on the number of images that can be in memory at any given time each plug in should only keep a small number of images in its registry p p implementors should create a j face image descriptor for each frequently used image the descriptors describe how to create find the image should it be needed the image described by the descriptor is not actually allocated until someone retrieves it p p subclasses may override this method to fill the image registry p param reg the registry to initalize see get image registry protected void initialize image registry image registry reg spec ed to do nothing oss jface getimageregistry initializeimageregistry imageregistry loads the dialog settings for this plug in the default implementation first looks for a standard named file in the plug in s read write state area if no such file exists the plug in s install directory is checked to see if one was installed with some default settings if no file is found in either place a new empty dialog settings is created if a problem occurs an empty settings is silently used p this framework method may be overridden although this is typically unnecessary p protected void load dialog settings dialog settings new dialog settings workbench non nls 1 bug 69387 the instance area should not be created in the call to get state location if data none or data no default was used i path data location get state location or null if data location null try r w state area in the local file system string read write path data location append fn dialog settings toos string file settings file new file read write path if settings file exists try dialog settings load read write path catch io exception e load failed so ensure we have an empty settings dialog settings new dialog settings workbench non nls 1 return otherwise look for bundle specific dialog settings url dsurl bundle utility find get bundle fn dialog settings if dsurl null return input stream is null try is dsurl open stream buffered reader reader new buffered reader new input stream reader is utf 8 non nls 1 dialog settings load reader catch io exception e load failed so ensure we have an empty settings dialog settings new dialog settings workbench non nls 1 finally try if is null is close catch io exception e do nothing loaddialogsettings dialogsettings dialogsettings getstatelocation nodefault ipath datalocation getstatelocationornull datalocation readwritepath datalocation fn_dialog_settings toosstring settingsfile readwritepath settingsfile dialogsettings readwritepath ioexception dialogsettings dialogsettings bundleutility getbundle fn_dialog_settings inputstream openstream bufferedreader bufferedreader inputstreamreader dialogsettings ioexception dialogsettings dialogsettings ioexception loads the preference store for this plug in the default implementation looks for a standard named file in the plug in s read write state area if no file is found or a problem occurs a new empty preference store is silently created p this framework method may be overridden although this is typically unnecessary p deprecated as of eclipse 2 0 a basic preference store exists for all plug ins this method now exists only for backwards compatibility it is called as the plug in s preference store is being initialized the plug ins preferences are loaded from the file regardless of what this method does protected void load preference store do nothing by default loadpreferencestore refreshes the actions for the plugin this method is called from code startup code p this framework method may be overridden although this is typically unnecessary p protected void refresh plugin actions if the workbench is not started yet or is no longer running do nothing if platformui is workbench running return startup is not guaranteed to be called in the ui thread but refresh plugin actions must run in the ui thread so use async exec see bug 6623 for more details display get default async exec new runnable public void run w win plugin action refresh action list refreshpluginactions isworkbenchrunning refreshpluginactions asyncexec getdefault asyncexec wwinpluginaction refreshactionlist so use async exec see bug 6623 for more details display get default async exec new runnable public void run w win plugin action refresh action list asyncexec getdefault asyncexec wwinpluginaction refreshactionlist saves this plug in s dialog settings any problems which arise are silently ignored protected void save dialog settings if dialog settings null return try i path path get state location or null if path null return string read write path path append fn dialog settings toos string dialog settings save read write path catch io exception e spec ed to ignore problems catch illegal state exception e spec ed to ignore problems savedialogsettings dialogsettings ipath getstatelocationornull readwritepath fn_dialog_settings toosstring dialogsettings readwritepath ioexception illegalstateexception saves this plug in s preference store any problems which arise are silently ignored see plugin save plugin preferences deprecated as of eclipse 2 0 preferences exist for all plug ins the equivalent of this method is code plugin save plugin preferences code this method now calls code save plugin preferences code and exists only for backwards compatibility protected void save preference store save plugin preferences savepluginpreferences savepluginpreferences savepluginpreferences savepreferencestore savepluginpreferences the code abstractui plugin code implementation of this code plugin code method does nothing subclasses may extend this method but must send super first p warning plug ins may not be started in the ui thread the code startup code method should not assume that its code runs in the ui thread otherwise swt thread exceptions may occur on startup deprecated in eclipse 3 0 code startup code has been replaced by link plugin start bundle context context implementations of code startup code should be changed to extend code start bundle context context code and call code super start context code instead of code super startup code like code super startup code code super stop context code must be called as the very first thing the code startup code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in in contrast the code start code method is always called public void startup throws core exception this method no longer does anything the code that used to be here in 2 1 has moved to start bundle context super startup abstractuiplugin bundlecontext bundlecontext coreexception bundlecontext the code abstractui plugin code implementation of this code plugin code method does nothing subclasses may extend this method but must send super first deprecated in eclipse 3 0 code shutdown code has been replaced by link plugin stop bundle context context implementations of code shutdown code should be changed to extend code stop bundle context context code and call code super stop context code instead of code super shutdown code unlike code super shutdown code code super stop context code must be called as the very b last b thing rather than as the very first thing the code shutdown code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in in contrast the code stop code method is always called public void shutdown throws core exception this method no longer does anything interesting the code that used to be here in 2 1 has moved to stop bundle context which is called regardless of whether the plug in being instantiated requires org eclipse core runtime compatibility super shutdown abstractuiplugin bundlecontext bundlecontext coreexception bundlecontext the code abstractui plugin code implementation of this code plugin code method refreshes the plug in actions subclasses may extend this method but must send super b first b inherit doc since 3 0 public void start bundle context context throws exception super start context final bundle context fc context should only attempt refresh plugin actions once the bundle has been fully started otherwise action delegates can be created while in the process of creating a triggering action delegate if ui events are processed during startup also if the start throws an exception the bundle will be shut down we don t want to have created any delegates if this happens see bug 63324 for more details bundle listener new bundle listener public void bundle changed bundle event event if event get bundle get bundle if event get type bundle event started we re getting notified that the bundle has been started make sure it s still active it may have been shut down between the time this event was queued and now if get bundle get state bundle active refresh plugin actions fc remove bundle listener this context add bundle listener bundle listener bundle listener is removed in stop bundle context abstractuiplugin inheritdoc bundlecontext bundlecontext refreshpluginactions bundlelistener bundlelistener bundlechanged bundleevent getbundle getbundle gettype bundleevent getbundle getstate refreshpluginactions removebundlelistener addbundlelistener bundlelistener bundlelistener bundlecontext bundle listener new bundle listener public void bundle changed bundle event event if event get bundle get bundle if event get type bundle event started we re getting notified that the bundle has been started make sure it s still active it may have been shut down between the time this event was queued and now if get bundle get state bundle active refresh plugin actions fc remove bundle listener this bundlelistener bundlelistener bundlechanged bundleevent getbundle getbundle gettype bundleevent getbundle getstate refreshpluginactions removebundlelistener the code abstractui plugin code implementation of this code plugin code method saves this plug in s preference and dialog stores and shuts down its image registry if they are in use subclasses may extend this method but must send super b last b a try finally statement should be used where necessary to ensure that code super shutdown code is always done inherit doc since 3 0 public void stop bundle context context throws exception try if bundle listener null context remove bundle listener bundle listener save dialog settings save preference store preference store null image registry null finally super stop context abstractuiplugin inheritdoc bundlecontext bundlelistener removebundlelistener bundlelistener savedialogsettings savepreferencestore preferencestore imageregistry creates and returns a new image descriptor for an image file located within the specified plug in p this is a convenience method that simply locates the image file in within the plug in no image registries are involved the path is relative to the root of the plug in and takes into account files coming from plug in fragments the path may include arg elements however the path must not have a leading or path separator clients should use a path like icons mysample gif rather than icons mysample gif or icons mysample gif p param plugin id the id of the plug in containing the image file code null code is returned if the plug in does not exist param image file path the relative path of the image file relative to the root of the plug in the path must be legal return an image descriptor or code null code if no image could be found since 3 0 public static image descriptor image descriptor from plugin string plugin id string image file path if plugin id null image file path null throw new illegal argument exception if the bundle is not ready then there is no image bundle bundle platform get bundle plugin id if bundle utility is ready bundle return null look for the image this will check both the plugin and fragment folders url full path string bundle utility find bundle image file path if full path string null try full path string new url image file path catch malformedurl exception e return null if full path string null return null return image descriptor create fromurl full path string pluginid imagefilepath imagedescriptor imagedescriptorfromplugin pluginid imagefilepath pluginid imagefilepath illegalargumentexception getbundle pluginid bundleutility isready fullpathstring bundleutility imagefilepath fullpathstring fullpathstring imagefilepath malformedurlexception fullpathstring imagedescriptor createfromurl fullpathstring for internal workbench use only returns the path to a location in the file system that can be used to persist restore state between workbench invocations if the location did not exist prior to this call it will be created returns code null code if no such location is available return path to a location in the file system where this plug in can persist data between sessions or code null code if no such location is available since 3 1 private i path get state location or null try return get state location catch illegal state exception e this occurs if data none is explicitly specified so ignore this silently is this ok see bug 85071 return null ipath getstatelocationornull getstatelocation illegalstateexception creates an abstract ui plug in runtime object for the given plug in descriptor p note that instances of plug in runtime classes are automatically created by the platform in the course of plug in activation p param descriptor the plug in descriptor see plugin plugin org eclipse core runtime i plugin descriptor descriptor deprecated in eclipse 3 0 this constructor has been replaced by link abstractui plugin implementations of code my plugin i plugin descriptor descriptor code should be changed to code my plugin code and call code super code instead of code super descriptor code the code my plugin i plugin descriptor descriptor code constructor is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in or as in this case subclasses which might public abstractui plugin i plugin descriptor descriptor super descriptor iplugindescriptor abstractuiplugin myplugin iplugindescriptor myplugin myplugin iplugindescriptor abstractuiplugin iplugindescriptor creates an abstract ui plug in runtime object p plug in runtime classes are code bundle activators code and so must have an default constructor this method is called by the runtime when the associated bundle is being activated p for more details see code plugin code s default constructor see plugin plugin since 3 0 public abstractui plugin super bundleactivators abstractuiplugin returns a new image registry for this plugin in the registry will be used to manage images which are frequently used by the plugin in p the default implementation of this method creates an empty registry subclasses may override this method if needed p return image registry the resulting registry see get image registry protected image registry create image registry if we are in the ui thread use that if display get current null return new image registry display get current if platformui is workbench running return new image registry platformui get workbench get display invalid thread access if it is not the ui thread and the workbench is not created throw new swt error swt error thread invalid access imageregistry getimageregistry imageregistry createimageregistry getcurrent imageregistry getcurrent isworkbenchrunning imageregistry getworkbench getdisplay swterror error_thread_invalid_access returns the dialog settings for this ui plug in the dialog settings is used to hold persistent state data for the various wizards and dialogs of this plug in in the context of a workbench p if an error occurs reading the dialog store an empty one is quietly created and returned p p subclasses may override this method but are not expected to p return the dialog settings public i dialog settings get dialog settings if dialog settings null load dialog settings return dialog settings idialogsettings getdialogsettings dialogsettings loaddialogsettings dialogsettings returns the image registry for this ui plug in p the image registry contains the images used by this plug in that are very frequently used and so need to be globally shared within the plug in since many o ss have a severe limit on the number of images that can be in memory at any given time a plug in should only keep a small number of images in their registry p subclasses should reimplement code initialize image registry code if they have custom graphic images to load p p subclasses may override this method but are not expected to p return the image registry public image registry get image registry if image registry null image registry create image registry initialize image registry image registry return image registry oss initializeimageregistry imageregistry getimageregistry imageregistry imageregistry createimageregistry initializeimageregistry imageregistry imageregistry returns the preference store for this ui plug in this preference store is used to hold persistent settings for this plug in in the context of a workbench some of these settings will be user controlled whereas others may be internal setting that are never exposed to the user p if an error occurs reading the preference store an empty preference store is quietly created initialized with defaults and returned p p strong note strong as of eclipse 3 1 this method is no longer referring to the core runtime compatibility layer and so plug ins relying on plugin initialize default preferences will have to access the compatibility layer themselves p return the preference store public i preference store get preference store create the preference store lazily if preference store null preference store new scoped preference store new instance scope get bundle get symbolic name return preference store initializedefaultpreferences ipreferencestore getpreferencestore preferencestore preferencestore scopedpreferencestore instancescope getbundle getsymbolicname preferencestore returns the platform ui workbench p this method exists as a convenience for plugin implementors the workbench can also be accessed by invoking code platformui get workbench code p return i workbench the workbench for this plug in public i workbench get workbench return platformui get workbench getworkbench iworkbench iworkbench getworkbench getworkbench initializes a preference store with default preference values for this plug in p this method is called after the preference store is initially loaded default values are never stored in preference stores p p the default implementation of this method does nothing subclasses should reimplement this method if the plug in has any preferences p p a subclass may reimplement this method to set default values for the preference store using j face api this is the older way of initializing default values if this method is reimplemented do not override code initialize default plugin preferences code p param store the preference store to fill deprecated this is only called if the runtime compatibility layer is present see link initialize default plugin preferences protected void initialize default preferences i preference store store spec ed to do nothing jface initializedefaultpluginpreferences initializedefaultpluginpreferences initializedefaultpreferences ipreferencestore the code abstractui plugin code implementation of this code plugin code method forwards to code initialize default preferences i preference store code p a subclass may reimplement this method to set default values for the core runtime preference store in the standard way this is the recommended way to do this the older code initialize default preferences i preference store code method serves a similar purpose if this method is reimplemented do not send super and do not override code initialize default preferences i preference store code p deprecated this is only called if the runtime compatibility layer is present see the deprecated comment in link plugin initialize default plugin preferences see initialize default preferences since 2 0 protected void initialize default plugin preferences n b by the time this method is called the plug in has a core runtime preference store no default values call load preference store only for backwards compatibility with eclipse 1 0 load preference store call initialize default preferences only for backwards compatibility with eclipse 1 0 initialize default preferences get preference store abstractuiplugin initializedefaultpreferences ipreferencestore initializedefaultpreferences ipreferencestore initializedefaultpreferences ipreferencestore initializedefaultpluginpreferences initializedefaultpreferences initializedefaultpluginpreferences loadpreferencestore loadpreferencestore initializedefaultpreferences initializedefaultpreferences getpreferencestore initializes an image registry with images which are frequently used by the plugin p the image registry contains the images used by this plug in that are very frequently used and so need to be globally shared within the plug in since many o ss have a severe limit on the number of images that can be in memory at any given time each plug in should only keep a small number of images in its registry p p implementors should create a j face image descriptor for each frequently used image the descriptors describe how to create find the image should it be needed the image described by the descriptor is not actually allocated until someone retrieves it p p subclasses may override this method to fill the image registry p param reg the registry to initalize see get image registry protected void initialize image registry image registry reg spec ed to do nothing oss jface getimageregistry initializeimageregistry imageregistry loads the dialog settings for this plug in the default implementation first looks for a standard named file in the plug in s read write state area if no such file exists the plug in s install directory is checked to see if one was installed with some default settings if no file is found in either place a new empty dialog settings is created if a problem occurs an empty settings is silently used p this framework method may be overridden although this is typically unnecessary p protected void load dialog settings dialog settings new dialog settings workbench non nls 1 bug 69387 the instance area should not be created in the call to get state location if data none or data no default was used i path data location get state location or null if data location null try r w state area in the local file system string read write path data location append fn dialog settings toos string file settings file new file read write path if settings file exists try dialog settings load read write path catch io exception e load failed so ensure we have an empty settings dialog settings new dialog settings workbench non nls 1 return otherwise look for bundle specific dialog settings url dsurl bundle utility find get bundle fn dialog settings if dsurl null return input stream is null try is dsurl open stream buffered reader reader new buffered reader new input stream reader is utf 8 non nls 1 dialog settings load reader catch io exception e load failed so ensure we have an empty settings dialog settings new dialog settings workbench non nls 1 finally try if is null is close catch io exception e do nothing loaddialogsettings dialogsettings dialogsettings getstatelocation nodefault ipath datalocation getstatelocationornull datalocation readwritepath datalocation fn_dialog_settings toosstring settingsfile readwritepath settingsfile dialogsettings readwritepath ioexception dialogsettings dialogsettings bundleutility getbundle fn_dialog_settings inputstream openstream bufferedreader bufferedreader inputstreamreader dialogsettings ioexception dialogsettings dialogsettings ioexception loads the preference store for this plug in the default implementation looks for a standard named file in the plug in s read write state area if no file is found or a problem occurs a new empty preference store is silently created p this framework method may be overridden although this is typically unnecessary p deprecated as of eclipse 2 0 a basic preference store exists for all plug ins this method now exists only for backwards compatibility it is called as the plug in s preference store is being initialized the plug ins preferences are loaded from the file regardless of what this method does protected void load preference store do nothing by default loadpreferencestore refreshes the actions for the plugin this method is called from code startup code p this framework method may be overridden although this is typically unnecessary p protected void refresh plugin actions if the workbench is not started yet or is no longer running do nothing if platformui is workbench running return startup is not guaranteed to be called in the ui thread but refresh plugin actions must run in the ui thread so use async exec see bug 6623 for more details display get default async exec new runnable public void run w win plugin action refresh action list refreshpluginactions isworkbenchrunning refreshpluginactions asyncexec getdefault asyncexec wwinpluginaction refreshactionlist so use async exec see bug 6623 for more details display get default async exec new runnable public void run w win plugin action refresh action list asyncexec getdefault asyncexec wwinpluginaction refreshactionlist saves this plug in s dialog settings any problems which arise are silently ignored protected void save dialog settings if dialog settings null return try i path path get state location or null if path null return string read write path path append fn dialog settings toos string dialog settings save read write path catch io exception e spec ed to ignore problems catch illegal state exception e spec ed to ignore problems savedialogsettings dialogsettings ipath getstatelocationornull readwritepath fn_dialog_settings toosstring dialogsettings readwritepath ioexception illegalstateexception saves this plug in s preference store any problems which arise are silently ignored see plugin save plugin preferences deprecated as of eclipse 2 0 preferences exist for all plug ins the equivalent of this method is code plugin save plugin preferences code this method now calls code save plugin preferences code and exists only for backwards compatibility protected void save preference store save plugin preferences savepluginpreferences savepluginpreferences savepluginpreferences savepreferencestore savepluginpreferences the code abstractui plugin code implementation of this code plugin code method does nothing subclasses may extend this method but must send super first p warning plug ins may not be started in the ui thread the code startup code method should not assume that its code runs in the ui thread otherwise swt thread exceptions may occur on startup deprecated in eclipse 3 0 code startup code has been replaced by link plugin start bundle context context implementations of code startup code should be changed to extend code start bundle context context code and call code super start context code instead of code super startup code like code super startup code code super stop context code must be called as the very first thing the code startup code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in in contrast the code start code method is always called public void startup throws core exception this method no longer does anything the code that used to be here in 2 1 has moved to start bundle context super startup abstractuiplugin bundlecontext bundlecontext coreexception bundlecontext the code abstractui plugin code implementation of this code plugin code method does nothing subclasses may extend this method but must send super first deprecated in eclipse 3 0 code shutdown code has been replaced by link plugin stop bundle context context implementations of code shutdown code should be changed to extend code stop bundle context context code and call code super stop context code instead of code super shutdown code unlike code super shutdown code code super stop context code must be called as the very b last b thing rather than as the very first thing the code shutdown code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in in contrast the code stop code method is always called public void shutdown throws core exception this method no longer does anything interesting the code that used to be here in 2 1 has moved to stop bundle context which is called regardless of whether the plug in being instantiated requires org eclipse core runtime compatibility super shutdown abstractuiplugin bundlecontext bundlecontext coreexception bundlecontext the code abstractui plugin code implementation of this code plugin code method refreshes the plug in actions subclasses may extend this method but must send super b first b inherit doc since 3 0 public void start bundle context context throws exception super start context final bundle context fc context should only attempt refresh plugin actions once the bundle has been fully started otherwise action delegates can be created while in the process of creating a triggering action delegate if ui events are processed during startup also if the start throws an exception the bundle will be shut down we don t want to have created any delegates if this happens see bug 63324 for more details bundle listener new bundle listener public void bundle changed bundle event event if event get bundle get bundle if event get type bundle event started we re getting notified that the bundle has been started make sure it s still active it may have been shut down between the time this event was queued and now if get bundle get state bundle active refresh plugin actions fc remove bundle listener this context add bundle listener bundle listener bundle listener is removed in stop bundle context abstractuiplugin inheritdoc bundlecontext bundlecontext refreshpluginactions bundlelistener bundlelistener bundlechanged bundleevent getbundle getbundle gettype bundleevent getbundle getstate refreshpluginactions removebundlelistener addbundlelistener bundlelistener bundlelistener bundlecontext bundle listener new bundle listener public void bundle changed bundle event event if event get bundle get bundle if event get type bundle event started we re getting notified that the bundle has been started make sure it s still active it may have been shut down between the time this event was queued and now if get bundle get state bundle active refresh plugin actions fc remove bundle listener this bundlelistener bundlelistener bundlechanged bundleevent getbundle getbundle gettype bundleevent getbundle getstate refreshpluginactions removebundlelistener the code abstractui plugin code implementation of this code plugin code method saves this plug in s preference and dialog stores and shuts down its image registry if they are in use subclasses may extend this method but must send super b last b a try finally statement should be used where necessary to ensure that code super shutdown code is always done inherit doc since 3 0 public void stop bundle context context throws exception try if bundle listener null context remove bundle listener bundle listener save dialog settings save preference store preference store null image registry null finally super stop context abstractuiplugin inheritdoc bundlecontext bundlelistener removebundlelistener bundlelistener savedialogsettings savepreferencestore preferencestore imageregistry creates and returns a new image descriptor for an image file located within the specified plug in p this is a convenience method that simply locates the image file in within the plug in no image registries are involved the path is relative to the root of the plug in and takes into account files coming from plug in fragments the path may include arg elements however the path must not have a leading or path separator clients should use a path like icons mysample gif rather than icons mysample gif or icons mysample gif p param plugin id the id of the plug in containing the image file code null code is returned if the plug in does not exist param image file path the relative path of the image file relative to the root of the plug in the path must be legal return an image descriptor or code null code if no image could be found since 3 0 public static image descriptor image descriptor from plugin string plugin id string image file path if plugin id null image file path null throw new illegal argument exception if the bundle is not ready then there is no image bundle bundle platform get bundle plugin id if bundle utility is ready bundle return null look for the image this will check both the plugin and fragment folders url full path string bundle utility find bundle image file path if full path string null try full path string new url image file path catch malformedurl exception e return null if full path string null return null return image descriptor create fromurl full path string pluginid imagefilepath imagedescriptor imagedescriptorfromplugin pluginid imagefilepath pluginid imagefilepath illegalargumentexception getbundle pluginid bundleutility isready fullpathstring bundleutility imagefilepath fullpathstring fullpathstring imagefilepath malformedurlexception fullpathstring imagedescriptor createfromurl fullpathstring for internal workbench use only returns the path to a location in the file system that can be used to persist restore state between workbench invocations if the location did not exist prior to this call it will be created returns code null code if no such location is available return path to a location in the file system where this plug in can persist data between sessions or code null code if no such location is available since 3 1 private i path get state location or null try return get state location catch illegal state exception e this occurs if data none is explicitly specified so ignore this silently is this ok see bug 85071 return null ipath getstatelocationornull getstatelocation illegalstateexception creates an abstract ui plug in runtime object for the given plug in descriptor p note that instances of plug in runtime classes are automatically created by the platform in the course of plug in activation p param descriptor the plug in descriptor see plugin plugin org eclipse core runtime i plugin descriptor descriptor deprecated in eclipse 3 0 this constructor has been replaced by link abstractui plugin implementations of code my plugin i plugin descriptor descriptor code should be changed to code my plugin code and call code super code instead of code super descriptor code the code my plugin i plugin descriptor descriptor code constructor is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in or as in this case subclasses which might public abstractui plugin i plugin descriptor descriptor super descriptor iplugindescriptor abstractuiplugin myplugin iplugindescriptor myplugin myplugin iplugindescriptor abstractuiplugin iplugindescriptor creates an abstract ui plug in runtime object p plug in runtime classes are code bundle activators code and so must have an default constructor this method is called by the runtime when the associated bundle is being activated p for more details see code plugin code s default constructor see plugin plugin since 3 0 public abstractui plugin super bundleactivators abstractuiplugin returns a new image registry for this plugin in the registry will be used to manage images which are frequently used by the plugin in p the default implementation of this method creates an empty registry subclasses may override this method if needed p return image registry the resulting registry see get image registry protected image registry create image registry if we are in the ui thread use that if display get current null return new image registry display get current if platformui is workbench running return new image registry platformui get workbench get display invalid thread access if it is not the ui thread and the workbench is not created throw new swt error swt error thread invalid access imageregistry getimageregistry imageregistry createimageregistry getcurrent imageregistry getcurrent isworkbenchrunning imageregistry getworkbench getdisplay swterror error_thread_invalid_access returns the dialog settings for this ui plug in the dialog settings is used to hold persistent state data for the various wizards and dialogs of this plug in in the context of a workbench p if an error occurs reading the dialog store an empty one is quietly created and returned p p subclasses may override this method but are not expected to p return the dialog settings public i dialog settings get dialog settings if dialog settings null load dialog settings return dialog settings idialogsettings getdialogsettings dialogsettings loaddialogsettings dialogsettings returns the image registry for this ui plug in p the image registry contains the images used by this plug in that are very frequently used and so need to be globally shared within the plug in since many o ss have a severe limit on the number of images that can be in memory at any given time a plug in should only keep a small number of images in their registry p subclasses should reimplement code initialize image registry code if they have custom graphic images to load p p subclasses may override this method but are not expected to p return the image registry public image registry get image registry if image registry null image registry create image registry initialize image registry image registry return image registry oss initializeimageregistry imageregistry getimageregistry imageregistry imageregistry createimageregistry initializeimageregistry imageregistry imageregistry returns the preference store for this ui plug in this preference store is used to hold persistent settings for this plug in in the context of a workbench some of these settings will be user controlled whereas others may be internal setting that are never exposed to the user p if an error occurs reading the preference store an empty preference store is quietly created initialized with defaults and returned p p strong note strong as of eclipse 3 1 this method is no longer referring to the core runtime compatibility layer and so plug ins relying on plugin initialize default preferences will have to access the compatibility layer themselves p return the preference store public i preference store get preference store create the preference store lazily if preference store null preference store new scoped preference store new instance scope get bundle get symbolic name return preference store initializedefaultpreferences ipreferencestore getpreferencestore preferencestore preferencestore scopedpreferencestore instancescope getbundle getsymbolicname preferencestore returns the platform ui workbench p this method exists as a convenience for plugin implementors the workbench can also be accessed by invoking code platformui get workbench code p return i workbench the workbench for this plug in public i workbench get workbench return platformui get workbench getworkbench iworkbench iworkbench getworkbench getworkbench initializes a preference store with default preference values for this plug in p this method is called after the preference store is initially loaded default values are never stored in preference stores p p the default implementation of this method does nothing subclasses should reimplement this method if the plug in has any preferences p p a subclass may reimplement this method to set default values for the preference store using j face api this is the older way of initializing default values if this method is reimplemented do not override code initialize default plugin preferences code p param store the preference store to fill deprecated this is only called if the runtime compatibility layer is present see link initialize default plugin preferences protected void initialize default preferences i preference store store spec ed to do nothing jface initializedefaultpluginpreferences initializedefaultpluginpreferences initializedefaultpreferences ipreferencestore the code abstractui plugin code implementation of this code plugin code method forwards to code initialize default preferences i preference store code p a subclass may reimplement this method to set default values for the core runtime preference store in the standard way this is the recommended way to do this the older code initialize default preferences i preference store code method serves a similar purpose if this method is reimplemented do not send super and do not override code initialize default preferences i preference store code p deprecated this is only called if the runtime compatibility layer is present see the deprecated comment in link plugin initialize default plugin preferences see initialize default preferences since 2 0 protected void initialize default plugin preferences n b by the time this method is called the plug in has a core runtime preference store no default values call load preference store only for backwards compatibility with eclipse 1 0 load preference store call initialize default preferences only for backwards compatibility with eclipse 1 0 initialize default preferences get preference store abstractuiplugin initializedefaultpreferences ipreferencestore initializedefaultpreferences ipreferencestore initializedefaultpreferences ipreferencestore initializedefaultpluginpreferences initializedefaultpreferences initializedefaultpluginpreferences loadpreferencestore loadpreferencestore initializedefaultpreferences initializedefaultpreferences getpreferencestore initializes an image registry with images which are frequently used by the plugin p the image registry contains the images used by this plug in that are very frequently used and so need to be globally shared within the plug in since many o ss have a severe limit on the number of images that can be in memory at any given time each plug in should only keep a small number of images in its registry p p implementors should create a j face image descriptor for each frequently used image the descriptors describe how to create find the image should it be needed the image described by the descriptor is not actually allocated until someone retrieves it p p subclasses may override this method to fill the image registry p param reg the registry to initalize see get image registry protected void initialize image registry image registry reg spec ed to do nothing oss jface getimageregistry initializeimageregistry imageregistry loads the dialog settings for this plug in the default implementation first looks for a standard named file in the plug in s read write state area if no such file exists the plug in s install directory is checked to see if one was installed with some default settings if no file is found in either place a new empty dialog settings is created if a problem occurs an empty settings is silently used p this framework method may be overridden although this is typically unnecessary p protected void load dialog settings dialog settings new dialog settings workbench non nls 1 bug 69387 the instance area should not be created in the call to get state location if data none or data no default was used i path data location get state location or null if data location null try r w state area in the local file system string read write path data location append fn dialog settings toos string file settings file new file read write path if settings file exists try dialog settings load read write path catch io exception e load failed so ensure we have an empty settings dialog settings new dialog settings workbench non nls 1 return otherwise look for bundle specific dialog settings url dsurl bundle utility find get bundle fn dialog settings if dsurl null return input stream is null try is dsurl open stream buffered reader reader new buffered reader new input stream reader is utf 8 non nls 1 dialog settings load reader catch io exception e load failed so ensure we have an empty settings dialog settings new dialog settings workbench non nls 1 finally try if is null is close catch io exception e do nothing loaddialogsettings dialogsettings dialogsettings getstatelocation nodefault ipath datalocation getstatelocationornull datalocation readwritepath datalocation fn_dialog_settings toosstring settingsfile readwritepath settingsfile dialogsettings readwritepath ioexception dialogsettings dialogsettings bundleutility getbundle fn_dialog_settings inputstream openstream bufferedreader bufferedreader inputstreamreader dialogsettings ioexception dialogsettings dialogsettings ioexception loads the preference store for this plug in the default implementation looks for a standard named file in the plug in s read write state area if no file is found or a problem occurs a new empty preference store is silently created p this framework method may be overridden although this is typically unnecessary p deprecated as of eclipse 2 0 a basic preference store exists for all plug ins this method now exists only for backwards compatibility it is called as the plug in s preference store is being initialized the plug ins preferences are loaded from the file regardless of what this method does protected void load preference store do nothing by default loadpreferencestore refreshes the actions for the plugin this method is called from code startup code p this framework method may be overridden although this is typically unnecessary p protected void refresh plugin actions if the workbench is not started yet or is no longer running do nothing if platformui is workbench running return startup is not guaranteed to be called in the ui thread but refresh plugin actions must run in the ui thread so use async exec see bug 6623 for more details display get default async exec new runnable public void run w win plugin action refresh action list refreshpluginactions isworkbenchrunning refreshpluginactions asyncexec getdefault asyncexec wwinpluginaction refreshactionlist so use async exec see bug 6623 for more details display get default async exec new runnable public void run w win plugin action refresh action list asyncexec getdefault asyncexec wwinpluginaction refreshactionlist saves this plug in s dialog settings any problems which arise are silently ignored protected void save dialog settings if dialog settings null return try i path path get state location or null if path null return string read write path path append fn dialog settings toos string dialog settings save read write path catch io exception e spec ed to ignore problems catch illegal state exception e spec ed to ignore problems savedialogsettings dialogsettings ipath getstatelocationornull readwritepath fn_dialog_settings toosstring dialogsettings readwritepath ioexception illegalstateexception saves this plug in s preference store any problems which arise are silently ignored see plugin save plugin preferences deprecated as of eclipse 2 0 preferences exist for all plug ins the equivalent of this method is code plugin save plugin preferences code this method now calls code save plugin preferences code and exists only for backwards compatibility protected void save preference store save plugin preferences savepluginpreferences savepluginpreferences savepluginpreferences savepreferencestore savepluginpreferences the code abstractui plugin code implementation of this code plugin code method does nothing subclasses may extend this method but must send super first p warning plug ins may not be started in the ui thread the code startup code method should not assume that its code runs in the ui thread otherwise swt thread exceptions may occur on startup deprecated in eclipse 3 0 code startup code has been replaced by link plugin start bundle context context implementations of code startup code should be changed to extend code start bundle context context code and call code super start context code instead of code super startup code like code super startup code code super stop context code must be called as the very first thing the code startup code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in in contrast the code start code method is always called public void startup throws core exception this method no longer does anything the code that used to be here in 2 1 has moved to start bundle context super startup abstractuiplugin bundlecontext bundlecontext coreexception bundlecontext the code abstractui plugin code implementation of this code plugin code method does nothing subclasses may extend this method but must send super first deprecated in eclipse 3 0 code shutdown code has been replaced by link plugin stop bundle context context implementations of code shutdown code should be changed to extend code stop bundle context context code and call code super stop context code instead of code super shutdown code unlike code super shutdown code code super stop context code must be called as the very b last b thing rather than as the very first thing the code shutdown code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in in contrast the code stop code method is always called public void shutdown throws core exception this method no longer does anything interesting the code that used to be here in 2 1 has moved to stop bundle context which is called regardless of whether the plug in being instantiated requires org eclipse core runtime compatibility super shutdown abstractuiplugin bundlecontext bundlecontext coreexception bundlecontext the code abstractui plugin code implementation of this code plugin code method refreshes the plug in actions subclasses may extend this method but must send super b first b inherit doc since 3 0 public void start bundle context context throws exception super start context final bundle context fc context should only attempt refresh plugin actions once the bundle has been fully started otherwise action delegates can be created while in the process of creating a triggering action delegate if ui events are processed during startup also if the start throws an exception the bundle will be shut down we don t want to have created any delegates if this happens see bug 63324 for more details bundle listener new bundle listener public void bundle changed bundle event event if event get bundle get bundle if event get type bundle event started we re getting notified that the bundle has been started make sure it s still active it may have been shut down between the time this event was queued and now if get bundle get state bundle active refresh plugin actions fc remove bundle listener this context add bundle listener bundle listener bundle listener is removed in stop bundle context abstractuiplugin inheritdoc bundlecontext bundlecontext refreshpluginactions bundlelistener bundlelistener bundlechanged bundleevent getbundle getbundle gettype bundleevent getbundle getstate refreshpluginactions removebundlelistener addbundlelistener bundlelistener bundlelistener bundlecontext bundle listener new bundle listener public void bundle changed bundle event event if event get bundle get bundle if event get type bundle event started we re getting notified that the bundle has been started make sure it s still active it may have been shut down between the time this event was queued and now if get bundle get state bundle active refresh plugin actions fc remove bundle listener this bundlelistener bundlelistener bundlechanged bundleevent getbundle getbundle gettype bundleevent getbundle getstate refreshpluginactions removebundlelistener the code abstractui plugin code implementation of this code plugin code method saves this plug in s preference and dialog stores and shuts down its image registry if they are in use subclasses may extend this method but must send super b last b a try finally statement should be used where necessary to ensure that code super shutdown code is always done inherit doc since 3 0 public void stop bundle context context throws exception try if bundle listener null context remove bundle listener bundle listener save dialog settings save preference store preference store null image registry null finally super stop context abstractuiplugin inheritdoc bundlecontext bundlelistener removebundlelistener bundlelistener savedialogsettings savepreferencestore preferencestore imageregistry creates and returns a new image descriptor for an image file located within the specified plug in p this is a convenience method that simply locates the image file in within the plug in no image registries are involved the path is relative to the root of the plug in and takes into account files coming from plug in fragments the path may include arg elements however the path must not have a leading or path separator clients should use a path like icons mysample gif rather than icons mysample gif or icons mysample gif p param plugin id the id of the plug in containing the image file code null code is returned if the plug in does not exist param image file path the relative path of the image file relative to the root of the plug in the path must be legal return an image descriptor or code null code if no image could be found since 3 0 public static image descriptor image descriptor from plugin string plugin id string image file path if plugin id null image file path null throw new illegal argument exception if the bundle is not ready then there is no image bundle bundle platform get bundle plugin id if bundle utility is ready bundle return null look for the image this will check both the plugin and fragment folders url full path string bundle utility find bundle image file path if full path string null try full path string new url image file path catch malformedurl exception e return null if full path string null return null return image descriptor create fromurl full path string pluginid imagefilepath imagedescriptor imagedescriptorfromplugin pluginid imagefilepath pluginid imagefilepath illegalargumentexception getbundle pluginid bundleutility isready fullpathstring bundleutility imagefilepath fullpathstring fullpathstring imagefilepath malformedurlexception fullpathstring imagedescriptor createfromurl fullpathstring for internal workbench use only returns the path to a location in the file system that can be used to persist restore state between workbench invocations if the location did not exist prior to this call it will be created returns code null code if no such location is available return path to a location in the file system where this plug in can persist data between sessions or code null code if no such location is available since 3 1 private i path get state location or null try return get state location catch illegal state exception e this occurs if data none is explicitly specified so ignore this silently is this ok see bug 85071 return null ipath getstatelocationornull getstatelocation illegalstateexception creates an abstract ui plug in runtime object for the given plug in descriptor p note that instances of plug in runtime classes are automatically created by the platform in the course of plug in activation p param descriptor the plug in descriptor see plugin plugin org eclipse core runtime i plugin descriptor descriptor deprecated in eclipse 3 0 this constructor has been replaced by link abstractui plugin implementations of code my plugin i plugin descriptor descriptor code should be changed to code my plugin code and call code super code instead of code super descriptor code the code my plugin i plugin descriptor descriptor code constructor is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in or as in this case subclasses which might public abstractui plugin i plugin descriptor descriptor super descriptor iplugindescriptor abstractuiplugin myplugin iplugindescriptor myplugin myplugin iplugindescriptor abstractuiplugin iplugindescriptor creates an abstract ui plug in runtime object p plug in runtime classes are code bundle activators code and so must have an default constructor this method is called by the runtime when the associated bundle is being activated p for more details see code plugin code s default constructor see plugin plugin since 3 0 public abstractui plugin super bundleactivators abstractuiplugin returns a new image registry for this plugin in the registry will be used to manage images which are frequently used by the plugin in p the default implementation of this method creates an empty registry subclasses may override this method if needed p return image registry the resulting registry see get image registry protected image registry create image registry if we are in the ui thread use that if display get current null return new image registry display get current if platformui is workbench running return new image registry platformui get workbench get display invalid thread access if it is not the ui thread and the workbench is not created throw new swt error swt error thread invalid access imageregistry getimageregistry imageregistry createimageregistry getcurrent imageregistry getcurrent isworkbenchrunning imageregistry getworkbench getdisplay swterror error_thread_invalid_access returns the dialog settings for this ui plug in the dialog settings is used to hold persistent state data for the various wizards and dialogs of this plug in in the context of a workbench p if an error occurs reading the dialog store an empty one is quietly created and returned p p subclasses may override this method but are not expected to p return the dialog settings public i dialog settings get dialog settings if dialog settings null load dialog settings return dialog settings idialogsettings getdialogsettings dialogsettings loaddialogsettings dialogsettings returns the image registry for this ui plug in p the image registry contains the images used by this plug in that are very frequently used and so need to be globally shared within the plug in since many o ss have a severe limit on the number of images that can be in memory at any given time a plug in should only keep a small number of images in their registry p subclasses should reimplement code initialize image registry code if they have custom graphic images to load p p subclasses may override this method but are not expected to p return the image registry public image registry get image registry if image registry null image registry create image registry initialize image registry image registry return image registry oss initializeimageregistry imageregistry getimageregistry imageregistry imageregistry createimageregistry initializeimageregistry imageregistry imageregistry returns the preference store for this ui plug in this preference store is used to hold persistent settings for this plug in in the context of a workbench some of these settings will be user controlled whereas others may be internal setting that are never exposed to the user p if an error occurs reading the preference store an empty preference store is quietly created initialized with defaults and returned p p strong note strong as of eclipse 3 1 this method is no longer referring to the core runtime compatibility layer and so plug ins relying on plugin initialize default preferences will have to access the compatibility layer themselves p return the preference store public i preference store get preference store create the preference store lazily if preference store null preference store new scoped preference store new instance scope get bundle get symbolic name return preference store initializedefaultpreferences ipreferencestore getpreferencestore preferencestore preferencestore scopedpreferencestore instancescope getbundle getsymbolicname preferencestore returns the platform ui workbench p this method exists as a convenience for plugin implementors the workbench can also be accessed by invoking code platformui get workbench code p return i workbench the workbench for this plug in public i workbench get workbench return platformui get workbench getworkbench iworkbench iworkbench getworkbench getworkbench initializes a preference store with default preference values for this plug in p this method is called after the preference store is initially loaded default values are never stored in preference stores p p the default implementation of this method does nothing subclasses should reimplement this method if the plug in has any preferences p p a subclass may reimplement this method to set default values for the preference store using j face api this is the older way of initializing default values if this method is reimplemented do not override code initialize default plugin preferences code p param store the preference store to fill deprecated this is only called if the runtime compatibility layer is present see link initialize default plugin preferences protected void initialize default preferences i preference store store spec ed to do nothing jface initializedefaultpluginpreferences initializedefaultpluginpreferences initializedefaultpreferences ipreferencestore the code abstractui plugin code implementation of this code plugin code method forwards to code initialize default preferences i preference store code p a subclass may reimplement this method to set default values for the core runtime preference store in the standard way this is the recommended way to do this the older code initialize default preferences i preference store code method serves a similar purpose if this method is reimplemented do not send super and do not override code initialize default preferences i preference store code p deprecated this is only called if the runtime compatibility layer is present see the deprecated comment in link plugin initialize default plugin preferences see initialize default preferences since 2 0 protected void initialize default plugin preferences n b by the time this method is called the plug in has a core runtime preference store no default values call load preference store only for backwards compatibility with eclipse 1 0 load preference store call initialize default preferences only for backwards compatibility with eclipse 1 0 initialize default preferences get preference store abstractuiplugin initializedefaultpreferences ipreferencestore initializedefaultpreferences ipreferencestore initializedefaultpreferences ipreferencestore initializedefaultpluginpreferences initializedefaultpreferences initializedefaultpluginpreferences loadpreferencestore loadpreferencestore initializedefaultpreferences initializedefaultpreferences getpreferencestore initializes an image registry with images which are frequently used by the plugin p the image registry contains the images used by this plug in that are very frequently used and so need to be globally shared within the plug in since many o ss have a severe limit on the number of images that can be in memory at any given time each plug in should only keep a small number of images in its registry p p implementors should create a j face image descriptor for each frequently used image the descriptors describe how to create find the image should it be needed the image described by the descriptor is not actually allocated until someone retrieves it p p subclasses may override this method to fill the image registry p param reg the registry to initalize see get image registry protected void initialize image registry image registry reg spec ed to do nothing oss jface getimageregistry initializeimageregistry imageregistry loads the dialog settings for this plug in the default implementation first looks for a standard named file in the plug in s read write state area if no such file exists the plug in s install directory is checked to see if one was installed with some default settings if no file is found in either place a new empty dialog settings is created if a problem occurs an empty settings is silently used p this framework method may be overridden although this is typically unnecessary p protected void load dialog settings dialog settings new dialog settings workbench non nls 1 bug 69387 the instance area should not be created in the call to get state location if data none or data no default was used i path data location get state location or null if data location null try r w state area in the local file system string read write path data location append fn dialog settings toos string file settings file new file read write path if settings file exists try dialog settings load read write path catch io exception e load failed so ensure we have an empty settings dialog settings new dialog settings workbench non nls 1 return otherwise look for bundle specific dialog settings url dsurl bundle utility find get bundle fn dialog settings if dsurl null return input stream is null try is dsurl open stream buffered reader reader new buffered reader new input stream reader is utf 8 non nls 1 dialog settings load reader catch io exception e load failed so ensure we have an empty settings dialog settings new dialog settings workbench non nls 1 finally try if is null is close catch io exception e do nothing loaddialogsettings dialogsettings dialogsettings getstatelocation nodefault ipath datalocation getstatelocationornull datalocation readwritepath datalocation fn_dialog_settings toosstring settingsfile readwritepath settingsfile dialogsettings readwritepath ioexception dialogsettings dialogsettings bundleutility getbundle fn_dialog_settings inputstream openstream bufferedreader bufferedreader inputstreamreader dialogsettings ioexception dialogsettings dialogsettings ioexception loads the preference store for this plug in the default implementation looks for a standard named file in the plug in s read write state area if no file is found or a problem occurs a new empty preference store is silently created p this framework method may be overridden although this is typically unnecessary p deprecated as of eclipse 2 0 a basic preference store exists for all plug ins this method now exists only for backwards compatibility it is called as the plug in s preference store is being initialized the plug ins preferences are loaded from the file regardless of what this method does protected void load preference store do nothing by default loadpreferencestore refreshes the actions for the plugin this method is called from code startup code p this framework method may be overridden although this is typically unnecessary p protected void refresh plugin actions if the workbench is not started yet or is no longer running do nothing if platformui is workbench running return startup is not guaranteed to be called in the ui thread but refresh plugin actions must run in the ui thread so use async exec see bug 6623 for more details display get default async exec new runnable public void run w win plugin action refresh action list refreshpluginactions isworkbenchrunning refreshpluginactions asyncexec getdefault asyncexec wwinpluginaction refreshactionlist so use async exec see bug 6623 for more details display get default async exec new runnable public void run w win plugin action refresh action list asyncexec getdefault asyncexec wwinpluginaction refreshactionlist saves this plug in s dialog settings any problems which arise are silently ignored protected void save dialog settings if dialog settings null return try i path path get state location or null if path null return string read write path path append fn dialog settings toos string dialog settings save read write path catch io exception e spec ed to ignore problems catch illegal state exception e spec ed to ignore problems savedialogsettings dialogsettings ipath getstatelocationornull readwritepath fn_dialog_settings toosstring dialogsettings readwritepath ioexception illegalstateexception saves this plug in s preference store any problems which arise are silently ignored see plugin save plugin preferences deprecated as of eclipse 2 0 preferences exist for all plug ins the equivalent of this method is code plugin save plugin preferences code this method now calls code save plugin preferences code and exists only for backwards compatibility protected void save preference store save plugin preferences savepluginpreferences savepluginpreferences savepluginpreferences savepreferencestore savepluginpreferences the code abstractui plugin code implementation of this code plugin code method does nothing subclasses may extend this method but must send super first p warning plug ins may not be started in the ui thread the code startup code method should not assume that its code runs in the ui thread otherwise swt thread exceptions may occur on startup deprecated in eclipse 3 0 code startup code has been replaced by link plugin start bundle context context implementations of code startup code should be changed to extend code start bundle context context code and call code super start context code instead of code super startup code like code super startup code code super stop context code must be called as the very first thing the code startup code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in in contrast the code start code method is always called public void startup throws core exception this method no longer does anything the code that used to be here in 2 1 has moved to start bundle context super startup abstractuiplugin bundlecontext bundlecontext coreexception bundlecontext the code abstractui plugin code implementation of this code plugin code method does nothing subclasses may extend this method but must send super first deprecated in eclipse 3 0 code shutdown code has been replaced by link plugin stop bundle context context implementations of code shutdown code should be changed to extend code stop bundle context context code and call code super stop context code instead of code super shutdown code unlike code super shutdown code code super stop context code must be called as the very b last b thing rather than as the very first thing the code shutdown code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in in contrast the code stop code method is always called public void shutdown throws core exception this method no longer does anything interesting the code that used to be here in 2 1 has moved to stop bundle context which is called regardless of whether the plug in being instantiated requires org eclipse core runtime compatibility super shutdown abstractuiplugin bundlecontext bundlecontext coreexception bundlecontext the code abstractui plugin code implementation of this code plugin code method refreshes the plug in actions subclasses may extend this method but must send super b first b inherit doc since 3 0 public void start bundle context context throws exception super start context final bundle context fc context should only attempt refresh plugin actions once the bundle has been fully started otherwise action delegates can be created while in the process of creating a triggering action delegate if ui events are processed during startup also if the start throws an exception the bundle will be shut down we don t want to have created any delegates if this happens see bug 63324 for more details bundle listener new bundle listener public void bundle changed bundle event event if event get bundle get bundle if event get type bundle event started we re getting notified that the bundle has been started make sure it s still active it may have been shut down between the time this event was queued and now if get bundle get state bundle active refresh plugin actions fc remove bundle listener this context add bundle listener bundle listener bundle listener is removed in stop bundle context abstractuiplugin inheritdoc bundlecontext bundlecontext refreshpluginactions bundlelistener bundlelistener bundlechanged bundleevent getbundle getbundle gettype bundleevent getbundle getstate refreshpluginactions removebundlelistener addbundlelistener bundlelistener bundlelistener bundlecontext bundle listener new bundle listener public void bundle changed bundle event event if event get bundle get bundle if event get type bundle event started we re getting notified that the bundle has been started make sure it s still active it may have been shut down between the time this event was queued and now if get bundle get state bundle active refresh plugin actions fc remove bundle listener this bundlelistener bundlelistener bundlechanged bundleevent getbundle getbundle gettype bundleevent getbundle getstate refreshpluginactions removebundlelistener the code abstractui plugin code implementation of this code plugin code method saves this plug in s preference and dialog stores and shuts down its image registry if they are in use subclasses may extend this method but must send super b last b a try finally statement should be used where necessary to ensure that code super shutdown code is always done inherit doc since 3 0 public void stop bundle context context throws exception try if bundle listener null context remove bundle listener bundle listener save dialog settings save preference store preference store null image registry null finally super stop context abstractuiplugin inheritdoc bundlecontext bundlelistener removebundlelistener bundlelistener savedialogsettings savepreferencestore preferencestore imageregistry creates and returns a new image descriptor for an image file located within the specified plug in p this is a convenience method that simply locates the image file in within the plug in no image registries are involved the path is relative to the root of the plug in and takes into account files coming from plug in fragments the path may include arg elements however the path must not have a leading or path separator clients should use a path like icons mysample gif rather than icons mysample gif or icons mysample gif p param plugin id the id of the plug in containing the image file code null code is returned if the plug in does not exist param image file path the relative path of the image file relative to the root of the plug in the path must be legal return an image descriptor or code null code if no image could be found since 3 0 public static image descriptor image descriptor from plugin string plugin id string image file path if plugin id null image file path null throw new illegal argument exception if the bundle is not ready then there is no image bundle bundle platform get bundle plugin id if bundle utility is ready bundle return null look for the image this will check both the plugin and fragment folders url full path string bundle utility find bundle image file path if full path string null try full path string new url image file path catch malformedurl exception e return null if full path string null return null return image descriptor create fromurl full path string pluginid imagefilepath imagedescriptor imagedescriptorfromplugin pluginid imagefilepath pluginid imagefilepath illegalargumentexception getbundle pluginid bundleutility isready fullpathstring bundleutility imagefilepath fullpathstring fullpathstring imagefilepath malformedurlexception fullpathstring imagedescriptor createfromurl fullpathstring for internal workbench use only returns the path to a location in the file system that can be used to persist restore state between workbench invocations if the location did not exist prior to this call it will be created returns code null code if no such location is available return path to a location in the file system where this plug in can persist data between sessions or code null code if no such location is available since 3 1 private i path get state location or null try return get state location catch illegal state exception e this occurs if data none is explicitly specified so ignore this silently is this ok see bug 85071 return null ipath getstatelocationornull getstatelocation illegalstateexception creates an abstract ui plug in runtime object for the given plug in descriptor p note that instances of plug in runtime classes are automatically created by the platform in the course of plug in activation p param descriptor the plug in descriptor see plugin plugin org eclipse core runtime i plugin descriptor descriptor deprecated in eclipse 3 0 this constructor has been replaced by link abstractui plugin implementations of code my plugin i plugin descriptor descriptor code should be changed to code my plugin code and call code super code instead of code super descriptor code the code my plugin i plugin descriptor descriptor code constructor is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in or as in this case subclasses which might public abstractui plugin i plugin descriptor descriptor super descriptor iplugindescriptor abstractuiplugin myplugin iplugindescriptor myplugin myplugin iplugindescriptor abstractuiplugin iplugindescriptor creates an abstract ui plug in runtime object p plug in runtime classes are code bundle activators code and so must have an default constructor this method is called by the runtime when the associated bundle is being activated p for more details see code plugin code s default constructor see plugin plugin since 3 0 public abstractui plugin super bundleactivators abstractuiplugin returns a new image registry for this plugin in the registry will be used to manage images which are frequently used by the plugin in p the default implementation of this method creates an empty registry subclasses may override this method if needed p return image registry the resulting registry see get image registry protected image registry create image registry if we are in the ui thread use that if display get current null return new image registry display get current if platformui is workbench running return new image registry platformui get workbench get display invalid thread access if it is not the ui thread and the workbench is not created throw new swt error swt error thread invalid access imageregistry getimageregistry imageregistry createimageregistry getcurrent imageregistry getcurrent isworkbenchrunning imageregistry getworkbench getdisplay swterror error_thread_invalid_access returns the dialog settings for this ui plug in the dialog settings is used to hold persistent state data for the various wizards and dialogs of this plug in in the context of a workbench p if an error occurs reading the dialog store an empty one is quietly created and returned p p subclasses may override this method but are not expected to p return the dialog settings public i dialog settings get dialog settings if dialog settings null load dialog settings return dialog settings idialogsettings getdialogsettings dialogsettings loaddialogsettings dialogsettings returns the image registry for this ui plug in p the image registry contains the images used by this plug in that are very frequently used and so need to be globally shared within the plug in since many o ss have a severe limit on the number of images that can be in memory at any given time a plug in should only keep a small number of images in their registry p subclasses should reimplement code initialize image registry code if they have custom graphic images to load p p subclasses may override this method but are not expected to p return the image registry public image registry get image registry if image registry null image registry create image registry initialize image registry image registry return image registry oss initializeimageregistry imageregistry getimageregistry imageregistry imageregistry createimageregistry initializeimageregistry imageregistry imageregistry returns the preference store for this ui plug in this preference store is used to hold persistent settings for this plug in in the context of a workbench some of these settings will be user controlled whereas others may be internal setting that are never exposed to the user p if an error occurs reading the preference store an empty preference store is quietly created initialized with defaults and returned p p strong note strong as of eclipse 3 1 this method is no longer referring to the core runtime compatibility layer and so plug ins relying on plugin initialize default preferences will have to access the compatibility layer themselves p return the preference store public i preference store get preference store create the preference store lazily if preference store null preference store new scoped preference store new instance scope get bundle get symbolic name return preference store initializedefaultpreferences ipreferencestore getpreferencestore preferencestore preferencestore scopedpreferencestore instancescope getbundle getsymbolicname preferencestore returns the platform ui workbench p this method exists as a convenience for plugin implementors the workbench can also be accessed by invoking code platformui get workbench code p return i workbench the workbench for this plug in public i workbench get workbench return platformui get workbench getworkbench iworkbench iworkbench getworkbench getworkbench initializes a preference store with default preference values for this plug in p this method is called after the preference store is initially loaded default values are never stored in preference stores p p the default implementation of this method does nothing subclasses should reimplement this method if the plug in has any preferences p p a subclass may reimplement this method to set default values for the preference store using j face api this is the older way of initializing default values if this method is reimplemented do not override code initialize default plugin preferences code p param store the preference store to fill deprecated this is only called if the runtime compatibility layer is present see link initialize default plugin preferences protected void initialize default preferences i preference store store spec ed to do nothing jface initializedefaultpluginpreferences initializedefaultpluginpreferences initializedefaultpreferences ipreferencestore the code abstractui plugin code implementation of this code plugin code method forwards to code initialize default preferences i preference store code p a subclass may reimplement this method to set default values for the core runtime preference store in the standard way this is the recommended way to do this the older code initialize default preferences i preference store code method serves a similar purpose if this method is reimplemented do not send super and do not override code initialize default preferences i preference store code p deprecated this is only called if the runtime compatibility layer is present see the deprecated comment in link plugin initialize default plugin preferences see initialize default preferences since 2 0 protected void initialize default plugin preferences n b by the time this method is called the plug in has a core runtime preference store no default values call load preference store only for backwards compatibility with eclipse 1 0 load preference store call initialize default preferences only for backwards compatibility with eclipse 1 0 initialize default preferences get preference store abstractuiplugin initializedefaultpreferences ipreferencestore initializedefaultpreferences ipreferencestore initializedefaultpreferences ipreferencestore initializedefaultpluginpreferences initializedefaultpreferences initializedefaultpluginpreferences loadpreferencestore loadpreferencestore initializedefaultpreferences initializedefaultpreferences getpreferencestore initializes an image registry with images which are frequently used by the plugin p the image registry contains the images used by this plug in that are very frequently used and so need to be globally shared within the plug in since many o ss have a severe limit on the number of images that can be in memory at any given time each plug in should only keep a small number of images in its registry p p implementors should create a j face image descriptor for each frequently used image the descriptors describe how to create find the image should it be needed the image described by the descriptor is not actually allocated until someone retrieves it p p subclasses may override this method to fill the image registry p param reg the registry to initalize see get image registry protected void initialize image registry image registry reg spec ed to do nothing oss jface getimageregistry initializeimageregistry imageregistry loads the dialog settings for this plug in the default implementation first looks for a standard named file in the plug in s read write state area if no such file exists the plug in s install directory is checked to see if one was installed with some default settings if no file is found in either place a new empty dialog settings is created if a problem occurs an empty settings is silently used p this framework method may be overridden although this is typically unnecessary p protected void load dialog settings dialog settings new dialog settings workbench non nls 1 bug 69387 the instance area should not be created in the call to get state location if data none or data no default was used i path data location get state location or null if data location null try r w state area in the local file system string read write path data location append fn dialog settings toos string file settings file new file read write path if settings file exists try dialog settings load read write path catch io exception e load failed so ensure we have an empty settings dialog settings new dialog settings workbench non nls 1 return otherwise look for bundle specific dialog settings url dsurl bundle utility find get bundle fn dialog settings if dsurl null return input stream is null try is dsurl open stream buffered reader reader new buffered reader new input stream reader is utf 8 non nls 1 dialog settings load reader catch io exception e load failed so ensure we have an empty settings dialog settings new dialog settings workbench non nls 1 finally try if is null is close catch io exception e do nothing loaddialogsettings dialogsettings dialogsettings getstatelocation nodefault ipath datalocation getstatelocationornull datalocation readwritepath datalocation fn_dialog_settings toosstring settingsfile readwritepath settingsfile dialogsettings readwritepath ioexception dialogsettings dialogsettings bundleutility getbundle fn_dialog_settings inputstream openstream bufferedreader bufferedreader inputstreamreader dialogsettings ioexception dialogsettings dialogsettings ioexception loads the preference store for this plug in the default implementation looks for a standard named file in the plug in s read write state area if no file is found or a problem occurs a new empty preference store is silently created p this framework method may be overridden although this is typically unnecessary p deprecated as of eclipse 2 0 a basic preference store exists for all plug ins this method now exists only for backwards compatibility it is called as the plug in s preference store is being initialized the plug ins preferences are loaded from the file regardless of what this method does protected void load preference store do nothing by default loadpreferencestore refreshes the actions for the plugin this method is called from code startup code p this framework method may be overridden although this is typically unnecessary p protected void refresh plugin actions if the workbench is not started yet or is no longer running do nothing if platformui is workbench running return startup is not guaranteed to be called in the ui thread but refresh plugin actions must run in the ui thread so use async exec see bug 6623 for more details display get default async exec new runnable public void run w win plugin action refresh action list refreshpluginactions isworkbenchrunning refreshpluginactions asyncexec getdefault asyncexec wwinpluginaction refreshactionlist so use async exec see bug 6623 for more details display get default async exec new runnable public void run w win plugin action refresh action list asyncexec getdefault asyncexec wwinpluginaction refreshactionlist saves this plug in s dialog settings any problems which arise are silently ignored protected void save dialog settings if dialog settings null return try i path path get state location or null if path null return string read write path path append fn dialog settings toos string dialog settings save read write path catch io exception e spec ed to ignore problems catch illegal state exception e spec ed to ignore problems savedialogsettings dialogsettings ipath getstatelocationornull readwritepath fn_dialog_settings toosstring dialogsettings readwritepath ioexception illegalstateexception saves this plug in s preference store any problems which arise are silently ignored see plugin save plugin preferences deprecated as of eclipse 2 0 preferences exist for all plug ins the equivalent of this method is code plugin save plugin preferences code this method now calls code save plugin preferences code and exists only for backwards compatibility protected void save preference store save plugin preferences savepluginpreferences savepluginpreferences savepluginpreferences savepreferencestore savepluginpreferences the code abstractui plugin code implementation of this code plugin code method does nothing subclasses may extend this method but must send super first p warning plug ins may not be started in the ui thread the code startup code method should not assume that its code runs in the ui thread otherwise swt thread exceptions may occur on startup deprecated in eclipse 3 0 code startup code has been replaced by link plugin start bundle context context implementations of code startup code should be changed to extend code start bundle context context code and call code super start context code instead of code super startup code like code super startup code code super stop context code must be called as the very first thing the code startup code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in in contrast the code start code method is always called public void startup throws core exception this method no longer does anything the code that used to be here in 2 1 has moved to start bundle context super startup abstractuiplugin bundlecontext bundlecontext coreexception bundlecontext the code abstractui plugin code implementation of this code plugin code method does nothing subclasses may extend this method but must send super first deprecated in eclipse 3 0 code shutdown code has been replaced by link plugin stop bundle context context implementations of code shutdown code should be changed to extend code stop bundle context context code and call code super stop context code instead of code super shutdown code unlike code super shutdown code code super stop context code must be called as the very b last b thing rather than as the very first thing the code shutdown code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in in contrast the code stop code method is always called public void shutdown throws core exception this method no longer does anything interesting the code that used to be here in 2 1 has moved to stop bundle context which is called regardless of whether the plug in being instantiated requires org eclipse core runtime compatibility super shutdown abstractuiplugin bundlecontext bundlecontext coreexception bundlecontext the code abstractui plugin code implementation of this code plugin code method refreshes the plug in actions subclasses may extend this method but must send super b first b inherit doc since 3 0 public void start bundle context context throws exception super start context final bundle context fc context should only attempt refresh plugin actions once the bundle has been fully started otherwise action delegates can be created while in the process of creating a triggering action delegate if ui events are processed during startup also if the start throws an exception the bundle will be shut down we don t want to have created any delegates if this happens see bug 63324 for more details bundle listener new bundle listener public void bundle changed bundle event event if event get bundle get bundle if event get type bundle event started we re getting notified that the bundle has been started make sure it s still active it may have been shut down between the time this event was queued and now if get bundle get state bundle active refresh plugin actions fc remove bundle listener this context add bundle listener bundle listener bundle listener is removed in stop bundle context abstractuiplugin inheritdoc bundlecontext bundlecontext refreshpluginactions bundlelistener bundlelistener bundlechanged bundleevent getbundle getbundle gettype bundleevent getbundle getstate refreshpluginactions removebundlelistener addbundlelistener bundlelistener bundlelistener bundlecontext bundle listener new bundle listener public void bundle changed bundle event event if event get bundle get bundle if event get type bundle event started we re getting notified that the bundle has been started make sure it s still active it may have been shut down between the time this event was queued and now if get bundle get state bundle active refresh plugin actions fc remove bundle listener this bundlelistener bundlelistener bundlechanged bundleevent getbundle getbundle gettype bundleevent getbundle getstate refreshpluginactions removebundlelistener the code abstractui plugin code implementation of this code plugin code method saves this plug in s preference and dialog stores and shuts down its image registry if they are in use subclasses may extend this method but must send super b last b a try finally statement should be used where necessary to ensure that code super shutdown code is always done inherit doc since 3 0 public void stop bundle context context throws exception try if bundle listener null context remove bundle listener bundle listener save dialog settings save preference store preference store null image registry null finally super stop context abstractuiplugin inheritdoc bundlecontext bundlelistener removebundlelistener bundlelistener savedialogsettings savepreferencestore preferencestore imageregistry creates and returns a new image descriptor for an image file located within the specified plug in p this is a convenience method that simply locates the image file in within the plug in no image registries are involved the path is relative to the root of the plug in and takes into account files coming from plug in fragments the path may include arg elements however the path must not have a leading or path separator clients should use a path like icons mysample gif rather than icons mysample gif or icons mysample gif p param plugin id the id of the plug in containing the image file code null code is returned if the plug in does not exist param image file path the relative path of the image file relative to the root of the plug in the path must be legal return an image descriptor or code null code if no image could be found since 3 0 public static image descriptor image descriptor from plugin string plugin id string image file path if plugin id null image file path null throw new illegal argument exception if the bundle is not ready then there is no image bundle bundle platform get bundle plugin id if bundle utility is ready bundle return null look for the image this will check both the plugin and fragment folders url full path string bundle utility find bundle image file path if full path string null try full path string new url image file path catch malformedurl exception e return null if full path string null return null return image descriptor create fromurl full path string pluginid imagefilepath imagedescriptor imagedescriptorfromplugin pluginid imagefilepath pluginid imagefilepath illegalargumentexception getbundle pluginid bundleutility isready fullpathstring bundleutility imagefilepath fullpathstring fullpathstring imagefilepath malformedurlexception fullpathstring imagedescriptor createfromurl fullpathstring for internal workbench use only returns the path to a location in the file system that can be used to persist restore state between workbench invocations if the location did not exist prior to this call it will be created returns code null code if no such location is available return path to a location in the file system where this plug in can persist data between sessions or code null code if no such location is available since 3 1 private i path get state location or null try return get state location catch illegal state exception e this occurs if data none is explicitly specified so ignore this silently is this ok see bug 85071 return null ipath getstatelocationornull getstatelocation illegalstateexception creates an abstract ui plug in runtime object for the given plug in descriptor p note that instances of plug in runtime classes are automatically created by the platform in the course of plug in activation p param descriptor the plug in descriptor see plugin plugin org eclipse core runtime i plugin descriptor descriptor deprecated in eclipse 3 0 this constructor has been replaced by link abstractui plugin implementations of code my plugin i plugin descriptor descriptor code should be changed to code my plugin code and call code super code instead of code super descriptor code the code my plugin i plugin descriptor descriptor code constructor is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in or as in this case subclasses which might public abstractui plugin i plugin descriptor descriptor super descriptor iplugindescriptor abstractuiplugin myplugin iplugindescriptor myplugin myplugin iplugindescriptor abstractuiplugin iplugindescriptor creates an abstract ui plug in runtime object p plug in runtime classes are code bundle activators code and so must have an default constructor this method is called by the runtime when the associated bundle is being activated p for more details see code plugin code s default constructor see plugin plugin since 3 0 public abstractui plugin super bundleactivators abstractuiplugin returns a new image registry for this plugin in the registry will be used to manage images which are frequently used by the plugin in p the default implementation of this method creates an empty registry subclasses may override this method if needed p return image registry the resulting registry see get image registry protected image registry create image registry if we are in the ui thread use that if display get current null return new image registry display get current if platformui is workbench running return new image registry platformui get workbench get display invalid thread access if it is not the ui thread and the workbench is not created throw new swt error swt error thread invalid access imageregistry getimageregistry imageregistry createimageregistry getcurrent imageregistry getcurrent isworkbenchrunning imageregistry getworkbench getdisplay swterror error_thread_invalid_access returns the dialog settings for this ui plug in the dialog settings is used to hold persistent state data for the various wizards and dialogs of this plug in in the context of a workbench p if an error occurs reading the dialog store an empty one is quietly created and returned p p subclasses may override this method but are not expected to p return the dialog settings public i dialog settings get dialog settings if dialog settings null load dialog settings return dialog settings idialogsettings getdialogsettings dialogsettings loaddialogsettings dialogsettings returns the image registry for this ui plug in p the image registry contains the images used by this plug in that are very frequently used and so need to be globally shared within the plug in since many o ss have a severe limit on the number of images that can be in memory at any given time a plug in should only keep a small number of images in their registry p subclasses should reimplement code initialize image registry code if they have custom graphic images to load p p subclasses may override this method but are not expected to p return the image registry public image registry get image registry if image registry null image registry create image registry initialize image registry image registry return image registry oss initializeimageregistry imageregistry getimageregistry imageregistry imageregistry createimageregistry initializeimageregistry imageregistry imageregistry returns the preference store for this ui plug in this preference store is used to hold persistent settings for this plug in in the context of a workbench some of these settings will be user controlled whereas others may be internal setting that are never exposed to the user p if an error occurs reading the preference store an empty preference store is quietly created initialized with defaults and returned p p strong note strong as of eclipse 3 1 this method is no longer referring to the core runtime compatibility layer and so plug ins relying on plugin initialize default preferences will have to access the compatibility layer themselves p return the preference store public i preference store get preference store create the preference store lazily if preference store null preference store new scoped preference store new instance scope get bundle get symbolic name return preference store initializedefaultpreferences ipreferencestore getpreferencestore preferencestore preferencestore scopedpreferencestore instancescope getbundle getsymbolicname preferencestore returns the platform ui workbench p this method exists as a convenience for plugin implementors the workbench can also be accessed by invoking code platformui get workbench code p return i workbench the workbench for this plug in public i workbench get workbench return platformui get workbench getworkbench iworkbench iworkbench getworkbench getworkbench initializes a preference store with default preference values for this plug in p this method is called after the preference store is initially loaded default values are never stored in preference stores p p the default implementation of this method does nothing subclasses should reimplement this method if the plug in has any preferences p p a subclass may reimplement this method to set default values for the preference store using j face api this is the older way of initializing default values if this method is reimplemented do not override code initialize default plugin preferences code p param store the preference store to fill deprecated this is only called if the runtime compatibility layer is present see link initialize default plugin preferences protected void initialize default preferences i preference store store spec ed to do nothing jface initializedefaultpluginpreferences initializedefaultpluginpreferences initializedefaultpreferences ipreferencestore the code abstractui plugin code implementation of this code plugin code method forwards to code initialize default preferences i preference store code p a subclass may reimplement this method to set default values for the core runtime preference store in the standard way this is the recommended way to do this the older code initialize default preferences i preference store code method serves a similar purpose if this method is reimplemented do not send super and do not override code initialize default preferences i preference store code p deprecated this is only called if the runtime compatibility layer is present see the deprecated comment in link plugin initialize default plugin preferences see initialize default preferences since 2 0 protected void initialize default plugin preferences n b by the time this method is called the plug in has a core runtime preference store no default values call load preference store only for backwards compatibility with eclipse 1 0 load preference store call initialize default preferences only for backwards compatibility with eclipse 1 0 initialize default preferences get preference store abstractuiplugin initializedefaultpreferences ipreferencestore initializedefaultpreferences ipreferencestore initializedefaultpreferences ipreferencestore initializedefaultpluginpreferences initializedefaultpreferences initializedefaultpluginpreferences loadpreferencestore loadpreferencestore initializedefaultpreferences initializedefaultpreferences getpreferencestore initializes an image registry with images which are frequently used by the plugin p the image registry contains the images used by this plug in that are very frequently used and so need to be globally shared within the plug in since many o ss have a severe limit on the number of images that can be in memory at any given time each plug in should only keep a small number of images in its registry p p implementors should create a j face image descriptor for each frequently used image the descriptors describe how to create find the image should it be needed the image described by the descriptor is not actually allocated until someone retrieves it p p subclasses may override this method to fill the image registry p param reg the registry to initalize see get image registry protected void initialize image registry image registry reg spec ed to do nothing oss jface getimageregistry initializeimageregistry imageregistry loads the dialog settings for this plug in the default implementation first looks for a standard named file in the plug in s read write state area if no such file exists the plug in s install directory is checked to see if one was installed with some default settings if no file is found in either place a new empty dialog settings is created if a problem occurs an empty settings is silently used p this framework method may be overridden although this is typically unnecessary p protected void load dialog settings dialog settings new dialog settings workbench non nls 1 bug 69387 the instance area should not be created in the call to get state location if data none or data no default was used i path data location get state location or null if data location null try r w state area in the local file system string read write path data location append fn dialog settings toos string file settings file new file read write path if settings file exists try dialog settings load read write path catch io exception e load failed so ensure we have an empty settings dialog settings new dialog settings workbench non nls 1 return otherwise look for bundle specific dialog settings url dsurl bundle utility find get bundle fn dialog settings if dsurl null return input stream is null try is dsurl open stream buffered reader reader new buffered reader new input stream reader is utf 8 non nls 1 dialog settings load reader catch io exception e load failed so ensure we have an empty settings dialog settings new dialog settings workbench non nls 1 finally try if is null is close catch io exception e do nothing loaddialogsettings dialogsettings dialogsettings getstatelocation nodefault ipath datalocation getstatelocationornull datalocation readwritepath datalocation fn_dialog_settings toosstring settingsfile readwritepath settingsfile dialogsettings readwritepath ioexception dialogsettings dialogsettings bundleutility getbundle fn_dialog_settings inputstream openstream bufferedreader bufferedreader inputstreamreader dialogsettings ioexception dialogsettings dialogsettings ioexception loads the preference store for this plug in the default implementation looks for a standard named file in the plug in s read write state area if no file is found or a problem occurs a new empty preference store is silently created p this framework method may be overridden although this is typically unnecessary p deprecated as of eclipse 2 0 a basic preference store exists for all plug ins this method now exists only for backwards compatibility it is called as the plug in s preference store is being initialized the plug ins preferences are loaded from the file regardless of what this method does protected void load preference store do nothing by default loadpreferencestore refreshes the actions for the plugin this method is called from code startup code p this framework method may be overridden although this is typically unnecessary p protected void refresh plugin actions if the workbench is not started yet or is no longer running do nothing if platformui is workbench running return startup is not guaranteed to be called in the ui thread but refresh plugin actions must run in the ui thread so use async exec see bug 6623 for more details display get default async exec new runnable public void run w win plugin action refresh action list refreshpluginactions isworkbenchrunning refreshpluginactions asyncexec getdefault asyncexec wwinpluginaction refreshactionlist so use async exec see bug 6623 for more details display get default async exec new runnable public void run w win plugin action refresh action list asyncexec getdefault asyncexec wwinpluginaction refreshactionlist saves this plug in s dialog settings any problems which arise are silently ignored protected void save dialog settings if dialog settings null return try i path path get state location or null if path null return string read write path path append fn dialog settings toos string dialog settings save read write path catch io exception e spec ed to ignore problems catch illegal state exception e spec ed to ignore problems savedialogsettings dialogsettings ipath getstatelocationornull readwritepath fn_dialog_settings toosstring dialogsettings readwritepath ioexception illegalstateexception saves this plug in s preference store any problems which arise are silently ignored see plugin save plugin preferences deprecated as of eclipse 2 0 preferences exist for all plug ins the equivalent of this method is code plugin save plugin preferences code this method now calls code save plugin preferences code and exists only for backwards compatibility protected void save preference store save plugin preferences savepluginpreferences savepluginpreferences savepluginpreferences savepreferencestore savepluginpreferences the code abstractui plugin code implementation of this code plugin code method does nothing subclasses may extend this method but must send super first p warning plug ins may not be started in the ui thread the code startup code method should not assume that its code runs in the ui thread otherwise swt thread exceptions may occur on startup deprecated in eclipse 3 0 code startup code has been replaced by link plugin start bundle context context implementations of code startup code should be changed to extend code start bundle context context code and call code super start context code instead of code super startup code like code super startup code code super stop context code must be called as the very first thing the code startup code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in in contrast the code start code method is always called public void startup throws core exception this method no longer does anything the code that used to be here in 2 1 has moved to start bundle context super startup abstractuiplugin bundlecontext bundlecontext coreexception bundlecontext the code abstractui plugin code implementation of this code plugin code method does nothing subclasses may extend this method but must send super first deprecated in eclipse 3 0 code shutdown code has been replaced by link plugin stop bundle context context implementations of code shutdown code should be changed to extend code stop bundle context context code and call code super stop context code instead of code super shutdown code unlike code super shutdown code code super stop context code must be called as the very b last b thing rather than as the very first thing the code shutdown code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in in contrast the code stop code method is always called public void shutdown throws core exception this method no longer does anything interesting the code that used to be here in 2 1 has moved to stop bundle context which is called regardless of whether the plug in being instantiated requires org eclipse core runtime compatibility super shutdown abstractuiplugin bundlecontext bundlecontext coreexception bundlecontext the code abstractui plugin code implementation of this code plugin code method refreshes the plug in actions subclasses may extend this method but must send super b first b inherit doc since 3 0 public void start bundle context context throws exception super start context final bundle context fc context should only attempt refresh plugin actions once the bundle has been fully started otherwise action delegates can be created while in the process of creating a triggering action delegate if ui events are processed during startup also if the start throws an exception the bundle will be shut down we don t want to have created any delegates if this happens see bug 63324 for more details bundle listener new bundle listener public void bundle changed bundle event event if event get bundle get bundle if event get type bundle event started we re getting notified that the bundle has been started make sure it s still active it may have been shut down between the time this event was queued and now if get bundle get state bundle active refresh plugin actions fc remove bundle listener this context add bundle listener bundle listener bundle listener is removed in stop bundle context abstractuiplugin inheritdoc bundlecontext bundlecontext refreshpluginactions bundlelistener bundlelistener bundlechanged bundleevent getbundle getbundle gettype bundleevent getbundle getstate refreshpluginactions removebundlelistener addbundlelistener bundlelistener bundlelistener bundlecontext bundle listener new bundle listener public void bundle changed bundle event event if event get bundle get bundle if event get type bundle event started we re getting notified that the bundle has been started make sure it s still active it may have been shut down between the time this event was queued and now if get bundle get state bundle active refresh plugin actions fc remove bundle listener this bundlelistener bundlelistener bundlechanged bundleevent getbundle getbundle gettype bundleevent getbundle getstate refreshpluginactions removebundlelistener the code abstractui plugin code implementation of this code plugin code method saves this plug in s preference and dialog stores and shuts down its image registry if they are in use subclasses may extend this method but must send super b last b a try finally statement should be used where necessary to ensure that code super shutdown code is always done inherit doc since 3 0 public void stop bundle context context throws exception try if bundle listener null context remove bundle listener bundle listener save dialog settings save preference store preference store null image registry null finally super stop context abstractuiplugin inheritdoc bundlecontext bundlelistener removebundlelistener bundlelistener savedialogsettings savepreferencestore preferencestore imageregistry creates and returns a new image descriptor for an image file located within the specified plug in p this is a convenience method that simply locates the image file in within the plug in no image registries are involved the path is relative to the root of the plug in and takes into account files coming from plug in fragments the path may include arg elements however the path must not have a leading or path separator clients should use a path like icons mysample gif rather than icons mysample gif or icons mysample gif p param plugin id the id of the plug in containing the image file code null code is returned if the plug in does not exist param image file path the relative path of the image file relative to the root of the plug in the path must be legal return an image descriptor or code null code if no image could be found since 3 0 public static image descriptor image descriptor from plugin string plugin id string image file path if plugin id null image file path null throw new illegal argument exception if the bundle is not ready then there is no image bundle bundle platform get bundle plugin id if bundle utility is ready bundle return null look for the image this will check both the plugin and fragment folders url full path string bundle utility find bundle image file path if full path string null try full path string new url image file path catch malformedurl exception e return null if full path string null return null return image descriptor create fromurl full path string pluginid imagefilepath imagedescriptor imagedescriptorfromplugin pluginid imagefilepath pluginid imagefilepath illegalargumentexception getbundle pluginid bundleutility isready fullpathstring bundleutility imagefilepath fullpathstring fullpathstring imagefilepath malformedurlexception fullpathstring imagedescriptor createfromurl fullpathstring for internal workbench use only returns the path to a location in the file system that can be used to persist restore state between workbench invocations if the location did not exist prior to this call it will be created returns code null code if no such location is available return path to a location in the file system where this plug in can persist data between sessions or code null code if no such location is available since 3 1 private i path get state location or null try return get state location catch illegal state exception e this occurs if data none is explicitly specified so ignore this silently is this ok see bug 85071 return null ipath getstatelocationornull getstatelocation illegalstateexception creates an abstract ui plug in runtime object for the given plug in descriptor p note that instances of plug in runtime classes are automatically created by the platform in the course of plug in activation p param descriptor the plug in descriptor see plugin plugin org eclipse core runtime i plugin descriptor descriptor deprecated in eclipse 3 0 this constructor has been replaced by link abstractui plugin implementations of code my plugin i plugin descriptor descriptor code should be changed to code my plugin code and call code super code instead of code super descriptor code the code my plugin i plugin descriptor descriptor code constructor is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in or as in this case subclasses which might public abstractui plugin i plugin descriptor descriptor super descriptor iplugindescriptor abstractuiplugin myplugin iplugindescriptor myplugin myplugin iplugindescriptor abstractuiplugin iplugindescriptor creates an abstract ui plug in runtime object p plug in runtime classes are code bundle activators code and so must have an default constructor this method is called by the runtime when the associated bundle is being activated p for more details see code plugin code s default constructor see plugin plugin since 3 0 public abstractui plugin super bundleactivators abstractuiplugin returns a new image registry for this plugin in the registry will be used to manage images which are frequently used by the plugin in p the default implementation of this method creates an empty registry subclasses may override this method if needed p return image registry the resulting registry see get image registry protected image registry create image registry if we are in the ui thread use that if display get current null return new image registry display get current if platformui is workbench running return new image registry platformui get workbench get display invalid thread access if it is not the ui thread and the workbench is not created throw new swt error swt error thread invalid access imageregistry getimageregistry imageregistry createimageregistry getcurrent imageregistry getcurrent isworkbenchrunning imageregistry getworkbench getdisplay swterror error_thread_invalid_access returns the dialog settings for this ui plug in the dialog settings is used to hold persistent state data for the various wizards and dialogs of this plug in in the context of a workbench p if an error occurs reading the dialog store an empty one is quietly created and returned p p subclasses may override this method but are not expected to p return the dialog settings public i dialog settings get dialog settings if dialog settings null load dialog settings return dialog settings idialogsettings getdialogsettings dialogsettings loaddialogsettings dialogsettings returns the image registry for this ui plug in p the image registry contains the images used by this plug in that are very frequently used and so need to be globally shared within the plug in since many o ss have a severe limit on the number of images that can be in memory at any given time a plug in should only keep a small number of images in their registry p subclasses should reimplement code initialize image registry code if they have custom graphic images to load p p subclasses may override this method but are not expected to p return the image registry public image registry get image registry if image registry null image registry create image registry initialize image registry image registry return image registry oss initializeimageregistry imageregistry getimageregistry imageregistry imageregistry createimageregistry initializeimageregistry imageregistry imageregistry returns the preference store for this ui plug in this preference store is used to hold persistent settings for this plug in in the context of a workbench some of these settings will be user controlled whereas others may be internal setting that are never exposed to the user p if an error occurs reading the preference store an empty preference store is quietly created initialized with defaults and returned p p strong note strong as of eclipse 3 1 this method is no longer referring to the core runtime compatibility layer and so plug ins relying on plugin initialize default preferences will have to access the compatibility layer themselves p return the preference store public i preference store get preference store create the preference store lazily if preference store null preference store new scoped preference store new instance scope get bundle get symbolic name return preference store initializedefaultpreferences ipreferencestore getpreferencestore preferencestore preferencestore scopedpreferencestore instancescope getbundle getsymbolicname preferencestore returns the platform ui workbench p this method exists as a convenience for plugin implementors the workbench can also be accessed by invoking code platformui get workbench code p return i workbench the workbench for this plug in public i workbench get workbench return platformui get workbench getworkbench iworkbench iworkbench getworkbench getworkbench initializes a preference store with default preference values for this plug in p this method is called after the preference store is initially loaded default values are never stored in preference stores p p the default implementation of this method does nothing subclasses should reimplement this method if the plug in has any preferences p p a subclass may reimplement this method to set default values for the preference store using j face api this is the older way of initializing default values if this method is reimplemented do not override code initialize default plugin preferences code p param store the preference store to fill deprecated this is only called if the runtime compatibility layer is present see link initialize default plugin preferences protected void initialize default preferences i preference store store spec ed to do nothing jface initializedefaultpluginpreferences initializedefaultpluginpreferences initializedefaultpreferences ipreferencestore the code abstractui plugin code implementation of this code plugin code method forwards to code initialize default preferences i preference store code p a subclass may reimplement this method to set default values for the core runtime preference store in the standard way this is the recommended way to do this the older code initialize default preferences i preference store code method serves a similar purpose if this method is reimplemented do not send super and do not override code initialize default preferences i preference store code p deprecated this is only called if the runtime compatibility layer is present see the deprecated comment in link plugin initialize default plugin preferences see initialize default preferences since 2 0 protected void initialize default plugin preferences n b by the time this method is called the plug in has a core runtime preference store no default values call load preference store only for backwards compatibility with eclipse 1 0 load preference store call initialize default preferences only for backwards compatibility with eclipse 1 0 initialize default preferences get preference store abstractuiplugin initializedefaultpreferences ipreferencestore initializedefaultpreferences ipreferencestore initializedefaultpreferences ipreferencestore initializedefaultpluginpreferences initializedefaultpreferences initializedefaultpluginpreferences loadpreferencestore loadpreferencestore initializedefaultpreferences initializedefaultpreferences getpreferencestore initializes an image registry with images which are frequently used by the plugin p the image registry contains the images used by this plug in that are very frequently used and so need to be globally shared within the plug in since many o ss have a severe limit on the number of images that can be in memory at any given time each plug in should only keep a small number of images in its registry p p implementors should create a j face image descriptor for each frequently used image the descriptors describe how to create find the image should it be needed the image described by the descriptor is not actually allocated until someone retrieves it p p subclasses may override this method to fill the image registry p param reg the registry to initalize see get image registry protected void initialize image registry image registry reg spec ed to do nothing oss jface getimageregistry initializeimageregistry imageregistry loads the dialog settings for this plug in the default implementation first looks for a standard named file in the plug in s read write state area if no such file exists the plug in s install directory is checked to see if one was installed with some default settings if no file is found in either place a new empty dialog settings is created if a problem occurs an empty settings is silently used p this framework method may be overridden although this is typically unnecessary p protected void load dialog settings dialog settings new dialog settings workbench non nls 1 bug 69387 the instance area should not be created in the call to get state location if data none or data no default was used i path data location get state location or null if data location null try r w state area in the local file system string read write path data location append fn dialog settings toos string file settings file new file read write path if settings file exists try dialog settings load read write path catch io exception e load failed so ensure we have an empty settings dialog settings new dialog settings workbench non nls 1 return otherwise look for bundle specific dialog settings url dsurl bundle utility find get bundle fn dialog settings if dsurl null return input stream is null try is dsurl open stream buffered reader reader new buffered reader new input stream reader is utf 8 non nls 1 dialog settings load reader catch io exception e load failed so ensure we have an empty settings dialog settings new dialog settings workbench non nls 1 finally try if is null is close catch io exception e do nothing loaddialogsettings dialogsettings dialogsettings getstatelocation nodefault ipath datalocation getstatelocationornull datalocation readwritepath datalocation fn_dialog_settings toosstring settingsfile readwritepath settingsfile dialogsettings readwritepath ioexception dialogsettings dialogsettings bundleutility getbundle fn_dialog_settings inputstream openstream bufferedreader bufferedreader inputstreamreader dialogsettings ioexception dialogsettings dialogsettings ioexception loads the preference store for this plug in the default implementation looks for a standard named file in the plug in s read write state area if no file is found or a problem occurs a new empty preference store is silently created p this framework method may be overridden although this is typically unnecessary p deprecated as of eclipse 2 0 a basic preference store exists for all plug ins this method now exists only for backwards compatibility it is called as the plug in s preference store is being initialized the plug ins preferences are loaded from the file regardless of what this method does protected void load preference store do nothing by default loadpreferencestore refreshes the actions for the plugin this method is called from code startup code p this framework method may be overridden although this is typically unnecessary p protected void refresh plugin actions if the workbench is not started yet or is no longer running do nothing if platformui is workbench running return startup is not guaranteed to be called in the ui thread but refresh plugin actions must run in the ui thread so use async exec see bug 6623 for more details display get default async exec new runnable public void run w win plugin action refresh action list refreshpluginactions isworkbenchrunning refreshpluginactions asyncexec getdefault asyncexec wwinpluginaction refreshactionlist so use async exec see bug 6623 for more details display get default async exec new runnable public void run w win plugin action refresh action list asyncexec getdefault asyncexec wwinpluginaction refreshactionlist saves this plug in s dialog settings any problems which arise are silently ignored protected void save dialog settings if dialog settings null return try i path path get state location or null if path null return string read write path path append fn dialog settings toos string dialog settings save read write path catch io exception e spec ed to ignore problems catch illegal state exception e spec ed to ignore problems savedialogsettings dialogsettings ipath getstatelocationornull readwritepath fn_dialog_settings toosstring dialogsettings readwritepath ioexception illegalstateexception saves this plug in s preference store any problems which arise are silently ignored see plugin save plugin preferences deprecated as of eclipse 2 0 preferences exist for all plug ins the equivalent of this method is code plugin save plugin preferences code this method now calls code save plugin preferences code and exists only for backwards compatibility protected void save preference store save plugin preferences savepluginpreferences savepluginpreferences savepluginpreferences savepreferencestore savepluginpreferences the code abstractui plugin code implementation of this code plugin code method does nothing subclasses may extend this method but must send super first p warning plug ins may not be started in the ui thread the code startup code method should not assume that its code runs in the ui thread otherwise swt thread exceptions may occur on startup deprecated in eclipse 3 0 code startup code has been replaced by link plugin start bundle context context implementations of code startup code should be changed to extend code start bundle context context code and call code super start context code instead of code super startup code like code super startup code code super stop context code must be called as the very first thing the code startup code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in in contrast the code start code method is always called public void startup throws core exception this method no longer does anything the code that used to be here in 2 1 has moved to start bundle context super startup abstractuiplugin bundlecontext bundlecontext coreexception bundlecontext the code abstractui plugin code implementation of this code plugin code method does nothing subclasses may extend this method but must send super first deprecated in eclipse 3 0 code shutdown code has been replaced by link plugin stop bundle context context implementations of code shutdown code should be changed to extend code stop bundle context context code and call code super stop context code instead of code super shutdown code unlike code super shutdown code code super stop context code must be called as the very b last b thing rather than as the very first thing the code shutdown code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in in contrast the code stop code method is always called public void shutdown throws core exception this method no longer does anything interesting the code that used to be here in 2 1 has moved to stop bundle context which is called regardless of whether the plug in being instantiated requires org eclipse core runtime compatibility super shutdown abstractuiplugin bundlecontext bundlecontext coreexception bundlecontext the code abstractui plugin code implementation of this code plugin code method refreshes the plug in actions subclasses may extend this method but must send super b first b inherit doc since 3 0 public void start bundle context context throws exception super start context final bundle context fc context should only attempt refresh plugin actions once the bundle has been fully started otherwise action delegates can be created while in the process of creating a triggering action delegate if ui events are processed during startup also if the start throws an exception the bundle will be shut down we don t want to have created any delegates if this happens see bug 63324 for more details bundle listener new bundle listener public void bundle changed bundle event event if event get bundle get bundle if event get type bundle event started we re getting notified that the bundle has been started make sure it s still active it may have been shut down between the time this event was queued and now if get bundle get state bundle active refresh plugin actions fc remove bundle listener this context add bundle listener bundle listener bundle listener is removed in stop bundle context abstractuiplugin inheritdoc bundlecontext bundlecontext refreshpluginactions bundlelistener bundlelistener bundlechanged bundleevent getbundle getbundle gettype bundleevent getbundle getstate refreshpluginactions removebundlelistener addbundlelistener bundlelistener bundlelistener bundlecontext bundle listener new bundle listener public void bundle changed bundle event event if event get bundle get bundle if event get type bundle event started we re getting notified that the bundle has been started make sure it s still active it may have been shut down between the time this event was queued and now if get bundle get state bundle active refresh plugin actions fc remove bundle listener this bundlelistener bundlelistener bundlechanged bundleevent getbundle getbundle gettype bundleevent getbundle getstate refreshpluginactions removebundlelistener the code abstractui plugin code implementation of this code plugin code method saves this plug in s preference and dialog stores and shuts down its image registry if they are in use subclasses may extend this method but must send super b last b a try finally statement should be used where necessary to ensure that code super shutdown code is always done inherit doc since 3 0 public void stop bundle context context throws exception try if bundle listener null context remove bundle listener bundle listener save dialog settings save preference store preference store null image registry null finally super stop context abstractuiplugin inheritdoc bundlecontext bundlelistener removebundlelistener bundlelistener savedialogsettings savepreferencestore preferencestore imageregistry creates and returns a new image descriptor for an image file located within the specified plug in p this is a convenience method that simply locates the image file in within the plug in no image registries are involved the path is relative to the root of the plug in and takes into account files coming from plug in fragments the path may include arg elements however the path must not have a leading or path separator clients should use a path like icons mysample gif rather than icons mysample gif or icons mysample gif p param plugin id the id of the plug in containing the image file code null code is returned if the plug in does not exist param image file path the relative path of the image file relative to the root of the plug in the path must be legal return an image descriptor or code null code if no image could be found since 3 0 public static image descriptor image descriptor from plugin string plugin id string image file path if plugin id null image file path null throw new illegal argument exception if the bundle is not ready then there is no image bundle bundle platform get bundle plugin id if bundle utility is ready bundle return null look for the image this will check both the plugin and fragment folders url full path string bundle utility find bundle image file path if full path string null try full path string new url image file path catch malformedurl exception e return null if full path string null return null return image descriptor create fromurl full path string pluginid imagefilepath imagedescriptor imagedescriptorfromplugin pluginid imagefilepath pluginid imagefilepath illegalargumentexception getbundle pluginid bundleutility isready fullpathstring bundleutility imagefilepath fullpathstring fullpathstring imagefilepath malformedurlexception fullpathstring imagedescriptor createfromurl fullpathstring for internal workbench use only returns the path to a location in the file system that can be used to persist restore state between workbench invocations if the location did not exist prior to this call it will be created returns code null code if no such location is available return path to a location in the file system where this plug in can persist data between sessions or code null code if no such location is available since 3 1 private i path get state location or null try return get state location catch illegal state exception e this occurs if data none is explicitly specified so ignore this silently is this ok see bug 85071 return null ipath getstatelocationornull getstatelocation illegalstateexception creates an abstract ui plug in runtime object for the given plug in descriptor p note that instances of plug in runtime classes are automatically created by the platform in the course of plug in activation p param descriptor the plug in descriptor see plugin plugin org eclipse core runtime i plugin descriptor descriptor deprecated in eclipse 3 0 this constructor has been replaced by link abstractui plugin implementations of code my plugin i plugin descriptor descriptor code should be changed to code my plugin code and call code super code instead of code super descriptor code the code my plugin i plugin descriptor descriptor code constructor is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in or as in this case subclasses which might public abstractui plugin i plugin descriptor descriptor super descriptor iplugindescriptor abstractuiplugin myplugin iplugindescriptor myplugin myplugin iplugindescriptor abstractuiplugin iplugindescriptor creates an abstract ui plug in runtime object p plug in runtime classes are code bundle activators code and so must have an default constructor this method is called by the runtime when the associated bundle is being activated p for more details see code plugin code s default constructor see plugin plugin since 3 0 public abstractui plugin super bundleactivators abstractuiplugin returns a new image registry for this plugin in the registry will be used to manage images which are frequently used by the plugin in p the default implementation of this method creates an empty registry subclasses may override this method if needed p return image registry the resulting registry see get image registry protected image registry create image registry if we are in the ui thread use that if display get current null return new image registry display get current if platformui is workbench running return new image registry platformui get workbench get display invalid thread access if it is not the ui thread and the workbench is not created throw new swt error swt error thread invalid access imageregistry getimageregistry imageregistry createimageregistry getcurrent imageregistry getcurrent isworkbenchrunning imageregistry getworkbench getdisplay swterror error_thread_invalid_access returns the dialog settings for this ui plug in the dialog settings is used to hold persistent state data for the various wizards and dialogs of this plug in in the context of a workbench p if an error occurs reading the dialog store an empty one is quietly created and returned p p subclasses may override this method but are not expected to p return the dialog settings public i dialog settings get dialog settings if dialog settings null load dialog settings return dialog settings idialogsettings getdialogsettings dialogsettings loaddialogsettings dialogsettings returns the image registry for this ui plug in p the image registry contains the images used by this plug in that are very frequently used and so need to be globally shared within the plug in since many o ss have a severe limit on the number of images that can be in memory at any given time a plug in should only keep a small number of images in their registry p subclasses should reimplement code initialize image registry code if they have custom graphic images to load p p subclasses may override this method but are not expected to p return the image registry public image registry get image registry if image registry null image registry create image registry initialize image registry image registry return image registry oss initializeimageregistry imageregistry getimageregistry imageregistry imageregistry createimageregistry initializeimageregistry imageregistry imageregistry returns the preference store for this ui plug in this preference store is used to hold persistent settings for this plug in in the context of a workbench some of these settings will be user controlled whereas others may be internal setting that are never exposed to the user p if an error occurs reading the preference store an empty preference store is quietly created initialized with defaults and returned p p strong note strong as of eclipse 3 1 this method is no longer referring to the core runtime compatibility layer and so plug ins relying on plugin initialize default preferences will have to access the compatibility layer themselves p return the preference store public i preference store get preference store create the preference store lazily if preference store null preference store new scoped preference store new instance scope get bundle get symbolic name return preference store initializedefaultpreferences ipreferencestore getpreferencestore preferencestore preferencestore scopedpreferencestore instancescope getbundle getsymbolicname preferencestore returns the platform ui workbench p this method exists as a convenience for plugin implementors the workbench can also be accessed by invoking code platformui get workbench code p return i workbench the workbench for this plug in public i workbench get workbench return platformui get workbench getworkbench iworkbench iworkbench getworkbench getworkbench initializes a preference store with default preference values for this plug in p this method is called after the preference store is initially loaded default values are never stored in preference stores p p the default implementation of this method does nothing subclasses should reimplement this method if the plug in has any preferences p p a subclass may reimplement this method to set default values for the preference store using j face api this is the older way of initializing default values if this method is reimplemented do not override code initialize default plugin preferences code p param store the preference store to fill deprecated this is only called if the runtime compatibility layer is present see link initialize default plugin preferences protected void initialize default preferences i preference store store spec ed to do nothing jface initializedefaultpluginpreferences initializedefaultpluginpreferences initializedefaultpreferences ipreferencestore the code abstractui plugin code implementation of this code plugin code method forwards to code initialize default preferences i preference store code p a subclass may reimplement this method to set default values for the core runtime preference store in the standard way this is the recommended way to do this the older code initialize default preferences i preference store code method serves a similar purpose if this method is reimplemented do not send super and do not override code initialize default preferences i preference store code p deprecated this is only called if the runtime compatibility layer is present see the deprecated comment in link plugin initialize default plugin preferences see initialize default preferences since 2 0 protected void initialize default plugin preferences n b by the time this method is called the plug in has a core runtime preference store no default values call load preference store only for backwards compatibility with eclipse 1 0 load preference store call initialize default preferences only for backwards compatibility with eclipse 1 0 initialize default preferences get preference store abstractuiplugin initializedefaultpreferences ipreferencestore initializedefaultpreferences ipreferencestore initializedefaultpreferences ipreferencestore initializedefaultpluginpreferences initializedefaultpreferences initializedefaultpluginpreferences loadpreferencestore loadpreferencestore initializedefaultpreferences initializedefaultpreferences getpreferencestore initializes an image registry with images which are frequently used by the plugin p the image registry contains the images used by this plug in that are very frequently used and so need to be globally shared within the plug in since many o ss have a severe limit on the number of images that can be in memory at any given time each plug in should only keep a small number of images in its registry p p implementors should create a j face image descriptor for each frequently used image the descriptors describe how to create find the image should it be needed the image described by the descriptor is not actually allocated until someone retrieves it p p subclasses may override this method to fill the image registry p param reg the registry to initalize see get image registry protected void initialize image registry image registry reg spec ed to do nothing oss jface getimageregistry initializeimageregistry imageregistry loads the dialog settings for this plug in the default implementation first looks for a standard named file in the plug in s read write state area if no such file exists the plug in s install directory is checked to see if one was installed with some default settings if no file is found in either place a new empty dialog settings is created if a problem occurs an empty settings is silently used p this framework method may be overridden although this is typically unnecessary p protected void load dialog settings dialog settings new dialog settings workbench non nls 1 bug 69387 the instance area should not be created in the call to get state location if data none or data no default was used i path data location get state location or null if data location null try r w state area in the local file system string read write path data location append fn dialog settings toos string file settings file new file read write path if settings file exists try dialog settings load read write path catch io exception e load failed so ensure we have an empty settings dialog settings new dialog settings workbench non nls 1 return otherwise look for bundle specific dialog settings url dsurl bundle utility find get bundle fn dialog settings if dsurl null return input stream is null try is dsurl open stream buffered reader reader new buffered reader new input stream reader is utf 8 non nls 1 dialog settings load reader catch io exception e load failed so ensure we have an empty settings dialog settings new dialog settings workbench non nls 1 finally try if is null is close catch io exception e do nothing loaddialogsettings dialogsettings dialogsettings getstatelocation nodefault ipath datalocation getstatelocationornull datalocation readwritepath datalocation fn_dialog_settings toosstring settingsfile readwritepath settingsfile dialogsettings readwritepath ioexception dialogsettings dialogsettings bundleutility getbundle fn_dialog_settings inputstream openstream bufferedreader bufferedreader inputstreamreader dialogsettings ioexception dialogsettings dialogsettings ioexception loads the preference store for this plug in the default implementation looks for a standard named file in the plug in s read write state area if no file is found or a problem occurs a new empty preference store is silently created p this framework method may be overridden although this is typically unnecessary p deprecated as of eclipse 2 0 a basic preference store exists for all plug ins this method now exists only for backwards compatibility it is called as the plug in s preference store is being initialized the plug ins preferences are loaded from the file regardless of what this method does protected void load preference store do nothing by default loadpreferencestore refreshes the actions for the plugin this method is called from code startup code p this framework method may be overridden although this is typically unnecessary p protected void refresh plugin actions if the workbench is not started yet or is no longer running do nothing if platformui is workbench running return startup is not guaranteed to be called in the ui thread but refresh plugin actions must run in the ui thread so use async exec see bug 6623 for more details display get default async exec new runnable public void run w win plugin action refresh action list refreshpluginactions isworkbenchrunning refreshpluginactions asyncexec getdefault asyncexec wwinpluginaction refreshactionlist so use async exec see bug 6623 for more details display get default async exec new runnable public void run w win plugin action refresh action list asyncexec getdefault asyncexec wwinpluginaction refreshactionlist saves this plug in s dialog settings any problems which arise are silently ignored protected void save dialog settings if dialog settings null return try i path path get state location or null if path null return string read write path path append fn dialog settings toos string dialog settings save read write path catch io exception e spec ed to ignore problems catch illegal state exception e spec ed to ignore problems savedialogsettings dialogsettings ipath getstatelocationornull readwritepath fn_dialog_settings toosstring dialogsettings readwritepath ioexception illegalstateexception saves this plug in s preference store any problems which arise are silently ignored see plugin save plugin preferences deprecated as of eclipse 2 0 preferences exist for all plug ins the equivalent of this method is code plugin save plugin preferences code this method now calls code save plugin preferences code and exists only for backwards compatibility protected void save preference store save plugin preferences savepluginpreferences savepluginpreferences savepluginpreferences savepreferencestore savepluginpreferences the code abstractui plugin code implementation of this code plugin code method does nothing subclasses may extend this method but must send super first p warning plug ins may not be started in the ui thread the code startup code method should not assume that its code runs in the ui thread otherwise swt thread exceptions may occur on startup deprecated in eclipse 3 0 code startup code has been replaced by link plugin start bundle context context implementations of code startup code should be changed to extend code start bundle context context code and call code super start context code instead of code super startup code like code super startup code code super stop context code must be called as the very first thing the code startup code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in in contrast the code start code method is always called public void startup throws core exception this method no longer does anything the code that used to be here in 2 1 has moved to start bundle context super startup abstractuiplugin bundlecontext bundlecontext coreexception bundlecontext the code abstractui plugin code implementation of this code plugin code method does nothing subclasses may extend this method but must send super first deprecated in eclipse 3 0 code shutdown code has been replaced by link plugin stop bundle context context implementations of code shutdown code should be changed to extend code stop bundle context context code and call code super stop context code instead of code super shutdown code unlike code super shutdown code code super stop context code must be called as the very b last b thing rather than as the very first thing the code shutdown code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in in contrast the code stop code method is always called public void shutdown throws core exception this method no longer does anything interesting the code that used to be here in 2 1 has moved to stop bundle context which is called regardless of whether the plug in being instantiated requires org eclipse core runtime compatibility super shutdown abstractuiplugin bundlecontext bundlecontext coreexception bundlecontext the code abstractui plugin code implementation of this code plugin code method refreshes the plug in actions subclasses may extend this method but must send super b first b inherit doc since 3 0 public void start bundle context context throws exception super start context final bundle context fc context should only attempt refresh plugin actions once the bundle has been fully started otherwise action delegates can be created while in the process of creating a triggering action delegate if ui events are processed during startup also if the start throws an exception the bundle will be shut down we don t want to have created any delegates if this happens see bug 63324 for more details bundle listener new bundle listener public void bundle changed bundle event event if event get bundle get bundle if event get type bundle event started we re getting notified that the bundle has been started make sure it s still active it may have been shut down between the time this event was queued and now if get bundle get state bundle active refresh plugin actions fc remove bundle listener this context add bundle listener bundle listener bundle listener is removed in stop bundle context abstractuiplugin inheritdoc bundlecontext bundlecontext refreshpluginactions bundlelistener bundlelistener bundlechanged bundleevent getbundle getbundle gettype bundleevent getbundle getstate refreshpluginactions removebundlelistener addbundlelistener bundlelistener bundlelistener bundlecontext bundle listener new bundle listener public void bundle changed bundle event event if event get bundle get bundle if event get type bundle event started we re getting notified that the bundle has been started make sure it s still active it may have been shut down between the time this event was queued and now if get bundle get state bundle active refresh plugin actions fc remove bundle listener this bundlelistener bundlelistener bundlechanged bundleevent getbundle getbundle gettype bundleevent getbundle getstate refreshpluginactions removebundlelistener the code abstractui plugin code implementation of this code plugin code method saves this plug in s preference and dialog stores and shuts down its image registry if they are in use subclasses may extend this method but must send super b last b a try finally statement should be used where necessary to ensure that code super shutdown code is always done inherit doc since 3 0 public void stop bundle context context throws exception try if bundle listener null context remove bundle listener bundle listener save dialog settings save preference store preference store null image registry null finally super stop context abstractuiplugin inheritdoc bundlecontext bundlelistener removebundlelistener bundlelistener savedialogsettings savepreferencestore preferencestore imageregistry creates and returns a new image descriptor for an image file located within the specified plug in p this is a convenience method that simply locates the image file in within the plug in no image registries are involved the path is relative to the root of the plug in and takes into account files coming from plug in fragments the path may include arg elements however the path must not have a leading or path separator clients should use a path like icons mysample gif rather than icons mysample gif or icons mysample gif p param plugin id the id of the plug in containing the image file code null code is returned if the plug in does not exist param image file path the relative path of the image file relative to the root of the plug in the path must be legal return an image descriptor or code null code if no image could be found since 3 0 public static image descriptor image descriptor from plugin string plugin id string image file path if plugin id null image file path null throw new illegal argument exception if the bundle is not ready then there is no image bundle bundle platform get bundle plugin id if bundle utility is ready bundle return null look for the image this will check both the plugin and fragment folders url full path string bundle utility find bundle image file path if full path string null try full path string new url image file path catch malformedurl exception e return null if full path string null return null return image descriptor create fromurl full path string pluginid imagefilepath imagedescriptor imagedescriptorfromplugin pluginid imagefilepath pluginid imagefilepath illegalargumentexception getbundle pluginid bundleutility isready fullpathstring bundleutility imagefilepath fullpathstring fullpathstring imagefilepath malformedurlexception fullpathstring imagedescriptor createfromurl fullpathstring for internal workbench use only returns the path to a location in the file system that can be used to persist restore state between workbench invocations if the location did not exist prior to this call it will be created returns code null code if no such location is available return path to a location in the file system where this plug in can persist data between sessions or code null code if no such location is available since 3 1 private i path get state location or null try return get state location catch illegal state exception e this occurs if data none is explicitly specified so ignore this silently is this ok see bug 85071 return null ipath getstatelocationornull getstatelocation illegalstateexception creates an abstract ui plug in runtime object for the given plug in descriptor p note that instances of plug in runtime classes are automatically created by the platform in the course of plug in activation p param descriptor the plug in descriptor see plugin plugin org eclipse core runtime i plugin descriptor descriptor deprecated in eclipse 3 0 this constructor has been replaced by link abstractui plugin implementations of code my plugin i plugin descriptor descriptor code should be changed to code my plugin code and call code super code instead of code super descriptor code the code my plugin i plugin descriptor descriptor code constructor is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in or as in this case subclasses which might public abstractui plugin i plugin descriptor descriptor super descriptor iplugindescriptor abstractuiplugin myplugin iplugindescriptor myplugin myplugin iplugindescriptor abstractuiplugin iplugindescriptor creates an abstract ui plug in runtime object p plug in runtime classes are code bundle activators code and so must have an default constructor this method is called by the runtime when the associated bundle is being activated p for more details see code plugin code s default constructor see plugin plugin since 3 0 public abstractui plugin super bundleactivators abstractuiplugin returns a new image registry for this plugin in the registry will be used to manage images which are frequently used by the plugin in p the default implementation of this method creates an empty registry subclasses may override this method if needed p return image registry the resulting registry see get image registry protected image registry create image registry if we are in the ui thread use that if display get current null return new image registry display get current if platformui is workbench running return new image registry platformui get workbench get display invalid thread access if it is not the ui thread and the workbench is not created throw new swt error swt error thread invalid access imageregistry getimageregistry imageregistry createimageregistry getcurrent imageregistry getcurrent isworkbenchrunning imageregistry getworkbench getdisplay swterror error_thread_invalid_access returns the dialog settings for this ui plug in the dialog settings is used to hold persistent state data for the various wizards and dialogs of this plug in in the context of a workbench p if an error occurs reading the dialog store an empty one is quietly created and returned p p subclasses may override this method but are not expected to p return the dialog settings public i dialog settings get dialog settings if dialog settings null load dialog settings return dialog settings idialogsettings getdialogsettings dialogsettings loaddialogsettings dialogsettings returns the image registry for this ui plug in p the image registry contains the images used by this plug in that are very frequently used and so need to be globally shared within the plug in since many o ss have a severe limit on the number of images that can be in memory at any given time a plug in should only keep a small number of images in their registry p subclasses should reimplement code initialize image registry code if they have custom graphic images to load p p subclasses may override this method but are not expected to p return the image registry public image registry get image registry if image registry null image registry create image registry initialize image registry image registry return image registry oss initializeimageregistry imageregistry getimageregistry imageregistry imageregistry createimageregistry initializeimageregistry imageregistry imageregistry returns the preference store for this ui plug in this preference store is used to hold persistent settings for this plug in in the context of a workbench some of these settings will be user controlled whereas others may be internal setting that are never exposed to the user p if an error occurs reading the preference store an empty preference store is quietly created initialized with defaults and returned p p strong note strong as of eclipse 3 1 this method is no longer referring to the core runtime compatibility layer and so plug ins relying on plugin initialize default preferences will have to access the compatibility layer themselves p return the preference store public i preference store get preference store create the preference store lazily if preference store null preference store new scoped preference store new instance scope get bundle get symbolic name return preference store initializedefaultpreferences ipreferencestore getpreferencestore preferencestore preferencestore scopedpreferencestore instancescope getbundle getsymbolicname preferencestore returns the platform ui workbench p this method exists as a convenience for plugin implementors the workbench can also be accessed by invoking code platformui get workbench code p return i workbench the workbench for this plug in public i workbench get workbench return platformui get workbench getworkbench iworkbench iworkbench getworkbench getworkbench initializes a preference store with default preference values for this plug in p this method is called after the preference store is initially loaded default values are never stored in preference stores p p the default implementation of this method does nothing subclasses should reimplement this method if the plug in has any preferences p p a subclass may reimplement this method to set default values for the preference store using j face api this is the older way of initializing default values if this method is reimplemented do not override code initialize default plugin preferences code p param store the preference store to fill deprecated this is only called if the runtime compatibility layer is present see link initialize default plugin preferences protected void initialize default preferences i preference store store spec ed to do nothing jface initializedefaultpluginpreferences initializedefaultpluginpreferences initializedefaultpreferences ipreferencestore the code abstractui plugin code implementation of this code plugin code method forwards to code initialize default preferences i preference store code p a subclass may reimplement this method to set default values for the core runtime preference store in the standard way this is the recommended way to do this the older code initialize default preferences i preference store code method serves a similar purpose if this method is reimplemented do not send super and do not override code initialize default preferences i preference store code p deprecated this is only called if the runtime compatibility layer is present see the deprecated comment in link plugin initialize default plugin preferences see initialize default preferences since 2 0 protected void initialize default plugin preferences n b by the time this method is called the plug in has a core runtime preference store no default values call load preference store only for backwards compatibility with eclipse 1 0 load preference store call initialize default preferences only for backwards compatibility with eclipse 1 0 initialize default preferences get preference store abstractuiplugin initializedefaultpreferences ipreferencestore initializedefaultpreferences ipreferencestore initializedefaultpreferences ipreferencestore initializedefaultpluginpreferences initializedefaultpreferences initializedefaultpluginpreferences loadpreferencestore loadpreferencestore initializedefaultpreferences initializedefaultpreferences getpreferencestore initializes an image registry with images which are frequently used by the plugin p the image registry contains the images used by this plug in that are very frequently used and so need to be globally shared within the plug in since many o ss have a severe limit on the number of images that can be in memory at any given time each plug in should only keep a small number of images in its registry p p implementors should create a j face image descriptor for each frequently used image the descriptors describe how to create find the image should it be needed the image described by the descriptor is not actually allocated until someone retrieves it p p subclasses may override this method to fill the image registry p param reg the registry to initalize see get image registry protected void initialize image registry image registry reg spec ed to do nothing oss jface getimageregistry initializeimageregistry imageregistry loads the dialog settings for this plug in the default implementation first looks for a standard named file in the plug in s read write state area if no such file exists the plug in s install directory is checked to see if one was installed with some default settings if no file is found in either place a new empty dialog settings is created if a problem occurs an empty settings is silently used p this framework method may be overridden although this is typically unnecessary p protected void load dialog settings dialog settings new dialog settings workbench non nls 1 bug 69387 the instance area should not be created in the call to get state location if data none or data no default was used i path data location get state location or null if data location null try r w state area in the local file system string read write path data location append fn dialog settings toos string file settings file new file read write path if settings file exists try dialog settings load read write path catch io exception e load failed so ensure we have an empty settings dialog settings new dialog settings workbench non nls 1 return otherwise look for bundle specific dialog settings url dsurl bundle utility find get bundle fn dialog settings if dsurl null return input stream is null try is dsurl open stream buffered reader reader new buffered reader new input stream reader is utf 8 non nls 1 dialog settings load reader catch io exception e load failed so ensure we have an empty settings dialog settings new dialog settings workbench non nls 1 finally try if is null is close catch io exception e do nothing loaddialogsettings dialogsettings dialogsettings getstatelocation nodefault ipath datalocation getstatelocationornull datalocation readwritepath datalocation fn_dialog_settings toosstring settingsfile readwritepath settingsfile dialogsettings readwritepath ioexception dialogsettings dialogsettings bundleutility getbundle fn_dialog_settings inputstream openstream bufferedreader bufferedreader inputstreamreader dialogsettings ioexception dialogsettings dialogsettings ioexception loads the preference store for this plug in the default implementation looks for a standard named file in the plug in s read write state area if no file is found or a problem occurs a new empty preference store is silently created p this framework method may be overridden although this is typically unnecessary p deprecated as of eclipse 2 0 a basic preference store exists for all plug ins this method now exists only for backwards compatibility it is called as the plug in s preference store is being initialized the plug ins preferences are loaded from the file regardless of what this method does protected void load preference store do nothing by default loadpreferencestore refreshes the actions for the plugin this method is called from code startup code p this framework method may be overridden although this is typically unnecessary p protected void refresh plugin actions if the workbench is not started yet or is no longer running do nothing if platformui is workbench running return startup is not guaranteed to be called in the ui thread but refresh plugin actions must run in the ui thread so use async exec see bug 6623 for more details display get default async exec new runnable public void run w win plugin action refresh action list refreshpluginactions isworkbenchrunning refreshpluginactions asyncexec getdefault asyncexec wwinpluginaction refreshactionlist so use async exec see bug 6623 for more details display get default async exec new runnable public void run w win plugin action refresh action list asyncexec getdefault asyncexec wwinpluginaction refreshactionlist saves this plug in s dialog settings any problems which arise are silently ignored protected void save dialog settings if dialog settings null return try i path path get state location or null if path null return string read write path path append fn dialog settings toos string dialog settings save read write path catch io exception e spec ed to ignore problems catch illegal state exception e spec ed to ignore problems savedialogsettings dialogsettings ipath getstatelocationornull readwritepath fn_dialog_settings toosstring dialogsettings readwritepath ioexception illegalstateexception saves this plug in s preference store any problems which arise are silently ignored see plugin save plugin preferences deprecated as of eclipse 2 0 preferences exist for all plug ins the equivalent of this method is code plugin save plugin preferences code this method now calls code save plugin preferences code and exists only for backwards compatibility protected void save preference store save plugin preferences savepluginpreferences savepluginpreferences savepluginpreferences savepreferencestore savepluginpreferences the code abstractui plugin code implementation of this code plugin code method does nothing subclasses may extend this method but must send super first p warning plug ins may not be started in the ui thread the code startup code method should not assume that its code runs in the ui thread otherwise swt thread exceptions may occur on startup deprecated in eclipse 3 0 code startup code has been replaced by link plugin start bundle context context implementations of code startup code should be changed to extend code start bundle context context code and call code super start context code instead of code super startup code like code super startup code code super stop context code must be called as the very first thing the code startup code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in in contrast the code start code method is always called public void startup throws core exception this method no longer does anything the code that used to be here in 2 1 has moved to start bundle context super startup abstractuiplugin bundlecontext bundlecontext coreexception bundlecontext the code abstractui plugin code implementation of this code plugin code method does nothing subclasses may extend this method but must send super first deprecated in eclipse 3 0 code shutdown code has been replaced by link plugin stop bundle context context implementations of code shutdown code should be changed to extend code stop bundle context context code and call code super stop context code instead of code super shutdown code unlike code super shutdown code code super stop context code must be called as the very b last b thing rather than as the very first thing the code shutdown code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in in contrast the code stop code method is always called public void shutdown throws core exception this method no longer does anything interesting the code that used to be here in 2 1 has moved to stop bundle context which is called regardless of whether the plug in being instantiated requires org eclipse core runtime compatibility super shutdown abstractuiplugin bundlecontext bundlecontext coreexception bundlecontext the code abstractui plugin code implementation of this code plugin code method refreshes the plug in actions subclasses may extend this method but must send super b first b inherit doc since 3 0 public void start bundle context context throws exception super start context final bundle context fc context should only attempt refresh plugin actions once the bundle has been fully started otherwise action delegates can be created while in the process of creating a triggering action delegate if ui events are processed during startup also if the start throws an exception the bundle will be shut down we don t want to have created any delegates if this happens see bug 63324 for more details bundle listener new bundle listener public void bundle changed bundle event event if event get bundle get bundle if event get type bundle event started we re getting notified that the bundle has been started make sure it s still active it may have been shut down between the time this event was queued and now if get bundle get state bundle active refresh plugin actions fc remove bundle listener this context add bundle listener bundle listener bundle listener is removed in stop bundle context abstractuiplugin inheritdoc bundlecontext bundlecontext refreshpluginactions bundlelistener bundlelistener bundlechanged bundleevent getbundle getbundle gettype bundleevent getbundle getstate refreshpluginactions removebundlelistener addbundlelistener bundlelistener bundlelistener bundlecontext bundle listener new bundle listener public void bundle changed bundle event event if event get bundle get bundle if event get type bundle event started we re getting notified that the bundle has been started make sure it s still active it may have been shut down between the time this event was queued and now if get bundle get state bundle active refresh plugin actions fc remove bundle listener this bundlelistener bundlelistener bundlechanged bundleevent getbundle getbundle gettype bundleevent getbundle getstate refreshpluginactions removebundlelistener the code abstractui plugin code implementation of this code plugin code method saves this plug in s preference and dialog stores and shuts down its image registry if they are in use subclasses may extend this method but must send super b last b a try finally statement should be used where necessary to ensure that code super shutdown code is always done inherit doc since 3 0 public void stop bundle context context throws exception try if bundle listener null context remove bundle listener bundle listener save dialog settings save preference store preference store null image registry null finally super stop context abstractuiplugin inheritdoc bundlecontext bundlelistener removebundlelistener bundlelistener savedialogsettings savepreferencestore preferencestore imageregistry creates and returns a new image descriptor for an image file located within the specified plug in p this is a convenience method that simply locates the image file in within the plug in no image registries are involved the path is relative to the root of the plug in and takes into account files coming from plug in fragments the path may include arg elements however the path must not have a leading or path separator clients should use a path like icons mysample gif rather than icons mysample gif or icons mysample gif p param plugin id the id of the plug in containing the image file code null code is returned if the plug in does not exist param image file path the relative path of the image file relative to the root of the plug in the path must be legal return an image descriptor or code null code if no image could be found since 3 0 public static image descriptor image descriptor from plugin string plugin id string image file path if plugin id null image file path null throw new illegal argument exception if the bundle is not ready then there is no image bundle bundle platform get bundle plugin id if bundle utility is ready bundle return null look for the image this will check both the plugin and fragment folders url full path string bundle utility find bundle image file path if full path string null try full path string new url image file path catch malformedurl exception e return null if full path string null return null return image descriptor create fromurl full path string pluginid imagefilepath imagedescriptor imagedescriptorfromplugin pluginid imagefilepath pluginid imagefilepath illegalargumentexception getbundle pluginid bundleutility isready fullpathstring bundleutility imagefilepath fullpathstring fullpathstring imagefilepath malformedurlexception fullpathstring imagedescriptor createfromurl fullpathstring for internal workbench use only returns the path to a location in the file system that can be used to persist restore state between workbench invocations if the location did not exist prior to this call it will be created returns code null code if no such location is available return path to a location in the file system where this plug in can persist data between sessions or code null code if no such location is available since 3 1 private i path get state location or null try return get state location catch illegal state exception e this occurs if data none is explicitly specified so ignore this silently is this ok see bug 85071 return null ipath getstatelocationornull getstatelocation illegalstateexception creates an abstract ui plug in runtime object for the given plug in descriptor p note that instances of plug in runtime classes are automatically created by the platform in the course of plug in activation p param descriptor the plug in descriptor see plugin plugin org eclipse core runtime i plugin descriptor descriptor deprecated in eclipse 3 0 this constructor has been replaced by link abstractui plugin implementations of code my plugin i plugin descriptor descriptor code should be changed to code my plugin code and call code super code instead of code super descriptor code the code my plugin i plugin descriptor descriptor code constructor is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in or as in this case subclasses which might public abstractui plugin i plugin descriptor descriptor super descriptor iplugindescriptor abstractuiplugin myplugin iplugindescriptor myplugin myplugin iplugindescriptor abstractuiplugin iplugindescriptor creates an abstract ui plug in runtime object p plug in runtime classes are code bundle activators code and so must have an default constructor this method is called by the runtime when the associated bundle is being activated p for more details see code plugin code s default constructor see plugin plugin since 3 0 public abstractui plugin super bundleactivators abstractuiplugin returns a new image registry for this plugin in the registry will be used to manage images which are frequently used by the plugin in p the default implementation of this method creates an empty registry subclasses may override this method if needed p return image registry the resulting registry see get image registry protected image registry create image registry if we are in the ui thread use that if display get current null return new image registry display get current if platformui is workbench running return new image registry platformui get workbench get display invalid thread access if it is not the ui thread and the workbench is not created throw new swt error swt error thread invalid access imageregistry getimageregistry imageregistry createimageregistry getcurrent imageregistry getcurrent isworkbenchrunning imageregistry getworkbench getdisplay swterror error_thread_invalid_access returns the dialog settings for this ui plug in the dialog settings is used to hold persistent state data for the various wizards and dialogs of this plug in in the context of a workbench p if an error occurs reading the dialog store an empty one is quietly created and returned p p subclasses may override this method but are not expected to p return the dialog settings public i dialog settings get dialog settings if dialog settings null load dialog settings return dialog settings idialogsettings getdialogsettings dialogsettings loaddialogsettings dialogsettings returns the image registry for this ui plug in p the image registry contains the images used by this plug in that are very frequently used and so need to be globally shared within the plug in since many o ss have a severe limit on the number of images that can be in memory at any given time a plug in should only keep a small number of images in their registry p subclasses should reimplement code initialize image registry code if they have custom graphic images to load p p subclasses may override this method but are not expected to p return the image registry public image registry get image registry if image registry null image registry create image registry initialize image registry image registry return image registry oss initializeimageregistry imageregistry getimageregistry imageregistry imageregistry createimageregistry initializeimageregistry imageregistry imageregistry returns the preference store for this ui plug in this preference store is used to hold persistent settings for this plug in in the context of a workbench some of these settings will be user controlled whereas others may be internal setting that are never exposed to the user p if an error occurs reading the preference store an empty preference store is quietly created initialized with defaults and returned p p strong note strong as of eclipse 3 1 this method is no longer referring to the core runtime compatibility layer and so plug ins relying on plugin initialize default preferences will have to access the compatibility layer themselves p return the preference store public i preference store get preference store create the preference store lazily if preference store null preference store new scoped preference store new instance scope get bundle get symbolic name return preference store initializedefaultpreferences ipreferencestore getpreferencestore preferencestore preferencestore scopedpreferencestore instancescope getbundle getsymbolicname preferencestore returns the platform ui workbench p this method exists as a convenience for plugin implementors the workbench can also be accessed by invoking code platformui get workbench code p return i workbench the workbench for this plug in public i workbench get workbench return platformui get workbench getworkbench iworkbench iworkbench getworkbench getworkbench initializes a preference store with default preference values for this plug in p this method is called after the preference store is initially loaded default values are never stored in preference stores p p the default implementation of this method does nothing subclasses should reimplement this method if the plug in has any preferences p p a subclass may reimplement this method to set default values for the preference store using j face api this is the older way of initializing default values if this method is reimplemented do not override code initialize default plugin preferences code p param store the preference store to fill deprecated this is only called if the runtime compatibility layer is present see link initialize default plugin preferences protected void initialize default preferences i preference store store spec ed to do nothing jface initializedefaultpluginpreferences initializedefaultpluginpreferences initializedefaultpreferences ipreferencestore the code abstractui plugin code implementation of this code plugin code method forwards to code initialize default preferences i preference store code p a subclass may reimplement this method to set default values for the core runtime preference store in the standard way this is the recommended way to do this the older code initialize default preferences i preference store code method serves a similar purpose if this method is reimplemented do not send super and do not override code initialize default preferences i preference store code p deprecated this is only called if the runtime compatibility layer is present see the deprecated comment in link plugin initialize default plugin preferences see initialize default preferences since 2 0 protected void initialize default plugin preferences n b by the time this method is called the plug in has a core runtime preference store no default values call load preference store only for backwards compatibility with eclipse 1 0 load preference store call initialize default preferences only for backwards compatibility with eclipse 1 0 initialize default preferences get preference store abstractuiplugin initializedefaultpreferences ipreferencestore initializedefaultpreferences ipreferencestore initializedefaultpreferences ipreferencestore initializedefaultpluginpreferences initializedefaultpreferences initializedefaultpluginpreferences loadpreferencestore loadpreferencestore initializedefaultpreferences initializedefaultpreferences getpreferencestore initializes an image registry with images which are frequently used by the plugin p the image registry contains the images used by this plug in that are very frequently used and so need to be globally shared within the plug in since many o ss have a severe limit on the number of images that can be in memory at any given time each plug in should only keep a small number of images in its registry p p implementors should create a j face image descriptor for each frequently used image the descriptors describe how to create find the image should it be needed the image described by the descriptor is not actually allocated until someone retrieves it p p subclasses may override this method to fill the image registry p param reg the registry to initalize see get image registry protected void initialize image registry image registry reg spec ed to do nothing oss jface getimageregistry initializeimageregistry imageregistry loads the dialog settings for this plug in the default implementation first looks for a standard named file in the plug in s read write state area if no such file exists the plug in s install directory is checked to see if one was installed with some default settings if no file is found in either place a new empty dialog settings is created if a problem occurs an empty settings is silently used p this framework method may be overridden although this is typically unnecessary p protected void load dialog settings dialog settings new dialog settings workbench non nls 1 bug 69387 the instance area should not be created in the call to get state location if data none or data no default was used i path data location get state location or null if data location null try r w state area in the local file system string read write path data location append fn dialog settings toos string file settings file new file read write path if settings file exists try dialog settings load read write path catch io exception e load failed so ensure we have an empty settings dialog settings new dialog settings workbench non nls 1 return otherwise look for bundle specific dialog settings url dsurl bundle utility find get bundle fn dialog settings if dsurl null return input stream is null try is dsurl open stream buffered reader reader new buffered reader new input stream reader is utf 8 non nls 1 dialog settings load reader catch io exception e load failed so ensure we have an empty settings dialog settings new dialog settings workbench non nls 1 finally try if is null is close catch io exception e do nothing loaddialogsettings dialogsettings dialogsettings getstatelocation nodefault ipath datalocation getstatelocationornull datalocation readwritepath datalocation fn_dialog_settings toosstring settingsfile readwritepath settingsfile dialogsettings readwritepath ioexception dialogsettings dialogsettings bundleutility getbundle fn_dialog_settings inputstream openstream bufferedreader bufferedreader inputstreamreader dialogsettings ioexception dialogsettings dialogsettings ioexception loads the preference store for this plug in the default implementation looks for a standard named file in the plug in s read write state area if no file is found or a problem occurs a new empty preference store is silently created p this framework method may be overridden although this is typically unnecessary p deprecated as of eclipse 2 0 a basic preference store exists for all plug ins this method now exists only for backwards compatibility it is called as the plug in s preference store is being initialized the plug ins preferences are loaded from the file regardless of what this method does protected void load preference store do nothing by default loadpreferencestore refreshes the actions for the plugin this method is called from code startup code p this framework method may be overridden although this is typically unnecessary p protected void refresh plugin actions if the workbench is not started yet or is no longer running do nothing if platformui is workbench running return startup is not guaranteed to be called in the ui thread but refresh plugin actions must run in the ui thread so use async exec see bug 6623 for more details display get default async exec new runnable public void run w win plugin action refresh action list refreshpluginactions isworkbenchrunning refreshpluginactions asyncexec getdefault asyncexec wwinpluginaction refreshactionlist so use async exec see bug 6623 for more details display get default async exec new runnable public void run w win plugin action refresh action list asyncexec getdefault asyncexec wwinpluginaction refreshactionlist saves this plug in s dialog settings any problems which arise are silently ignored protected void save dialog settings if dialog settings null return try i path path get state location or null if path null return string read write path path append fn dialog settings toos string dialog settings save read write path catch io exception e spec ed to ignore problems catch illegal state exception e spec ed to ignore problems savedialogsettings dialogsettings ipath getstatelocationornull readwritepath fn_dialog_settings toosstring dialogsettings readwritepath ioexception illegalstateexception saves this plug in s preference store any problems which arise are silently ignored see plugin save plugin preferences deprecated as of eclipse 2 0 preferences exist for all plug ins the equivalent of this method is code plugin save plugin preferences code this method now calls code save plugin preferences code and exists only for backwards compatibility protected void save preference store save plugin preferences savepluginpreferences savepluginpreferences savepluginpreferences savepreferencestore savepluginpreferences the code abstractui plugin code implementation of this code plugin code method does nothing subclasses may extend this method but must send super first p warning plug ins may not be started in the ui thread the code startup code method should not assume that its code runs in the ui thread otherwise swt thread exceptions may occur on startup deprecated in eclipse 3 0 code startup code has been replaced by link plugin start bundle context context implementations of code startup code should be changed to extend code start bundle context context code and call code super start context code instead of code super startup code like code super startup code code super stop context code must be called as the very first thing the code startup code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in in contrast the code start code method is always called public void startup throws core exception this method no longer does anything the code that used to be here in 2 1 has moved to start bundle context super startup abstractuiplugin bundlecontext bundlecontext coreexception bundlecontext the code abstractui plugin code implementation of this code plugin code method does nothing subclasses may extend this method but must send super first deprecated in eclipse 3 0 code shutdown code has been replaced by link plugin stop bundle context context implementations of code shutdown code should be changed to extend code stop bundle context context code and call code super stop context code instead of code super shutdown code unlike code super shutdown code code super stop context code must be called as the very b last b thing rather than as the very first thing the code shutdown code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in in contrast the code stop code method is always called public void shutdown throws core exception this method no longer does anything interesting the code that used to be here in 2 1 has moved to stop bundle context which is called regardless of whether the plug in being instantiated requires org eclipse core runtime compatibility super shutdown abstractuiplugin bundlecontext bundlecontext coreexception bundlecontext the code abstractui plugin code implementation of this code plugin code method refreshes the plug in actions subclasses may extend this method but must send super b first b inherit doc since 3 0 public void start bundle context context throws exception super start context final bundle context fc context should only attempt refresh plugin actions once the bundle has been fully started otherwise action delegates can be created while in the process of creating a triggering action delegate if ui events are processed during startup also if the start throws an exception the bundle will be shut down we don t want to have created any delegates if this happens see bug 63324 for more details bundle listener new bundle listener public void bundle changed bundle event event if event get bundle get bundle if event get type bundle event started we re getting notified that the bundle has been started make sure it s still active it may have been shut down between the time this event was queued and now if get bundle get state bundle active refresh plugin actions fc remove bundle listener this context add bundle listener bundle listener bundle listener is removed in stop bundle context abstractuiplugin inheritdoc bundlecontext bundlecontext refreshpluginactions bundlelistener bundlelistener bundlechanged bundleevent getbundle getbundle gettype bundleevent getbundle getstate refreshpluginactions removebundlelistener addbundlelistener bundlelistener bundlelistener bundlecontext bundle listener new bundle listener public void bundle changed bundle event event if event get bundle get bundle if event get type bundle event started we re getting notified that the bundle has been started make sure it s still active it may have been shut down between the time this event was queued and now if get bundle get state bundle active refresh plugin actions fc remove bundle listener this bundlelistener bundlelistener bundlechanged bundleevent getbundle getbundle gettype bundleevent getbundle getstate refreshpluginactions removebundlelistener the code abstractui plugin code implementation of this code plugin code method saves this plug in s preference and dialog stores and shuts down its image registry if they are in use subclasses may extend this method but must send super b last b a try finally statement should be used where necessary to ensure that code super shutdown code is always done inherit doc since 3 0 public void stop bundle context context throws exception try if bundle listener null context remove bundle listener bundle listener save dialog settings save preference store preference store null image registry null finally super stop context abstractuiplugin inheritdoc bundlecontext bundlelistener removebundlelistener bundlelistener savedialogsettings savepreferencestore preferencestore imageregistry creates and returns a new image descriptor for an image file located within the specified plug in p this is a convenience method that simply locates the image file in within the plug in no image registries are involved the path is relative to the root of the plug in and takes into account files coming from plug in fragments the path may include arg elements however the path must not have a leading or path separator clients should use a path like icons mysample gif rather than icons mysample gif or icons mysample gif p param plugin id the id of the plug in containing the image file code null code is returned if the plug in does not exist param image file path the relative path of the image file relative to the root of the plug in the path must be legal return an image descriptor or code null code if no image could be found since 3 0 public static image descriptor image descriptor from plugin string plugin id string image file path if plugin id null image file path null throw new illegal argument exception if the bundle is not ready then there is no image bundle bundle platform get bundle plugin id if bundle utility is ready bundle return null look for the image this will check both the plugin and fragment folders url full path string bundle utility find bundle image file path if full path string null try full path string new url image file path catch malformedurl exception e return null if full path string null return null return image descriptor create fromurl full path string pluginid imagefilepath imagedescriptor imagedescriptorfromplugin pluginid imagefilepath pluginid imagefilepath illegalargumentexception getbundle pluginid bundleutility isready fullpathstring bundleutility imagefilepath fullpathstring fullpathstring imagefilepath malformedurlexception fullpathstring imagedescriptor createfromurl fullpathstring for internal workbench use only returns the path to a location in the file system that can be used to persist restore state between workbench invocations if the location did not exist prior to this call it will be created returns code null code if no such location is available return path to a location in the file system where this plug in can persist data between sessions or code null code if no such location is available since 3 1 private i path get state location or null try return get state location catch illegal state exception e this occurs if data none is explicitly specified so ignore this silently is this ok see bug 85071 return null ipath getstatelocationornull getstatelocation illegalstateexception creates an abstract ui plug in runtime object for the given plug in descriptor p note that instances of plug in runtime classes are automatically created by the platform in the course of plug in activation p param descriptor the plug in descriptor see plugin plugin org eclipse core runtime i plugin descriptor descriptor deprecated in eclipse 3 0 this constructor has been replaced by link abstractui plugin implementations of code my plugin i plugin descriptor descriptor code should be changed to code my plugin code and call code super code instead of code super descriptor code the code my plugin i plugin descriptor descriptor code constructor is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in or as in this case subclasses which might public abstractui plugin i plugin descriptor descriptor super descriptor iplugindescriptor abstractuiplugin myplugin iplugindescriptor myplugin myplugin iplugindescriptor abstractuiplugin iplugindescriptor creates an abstract ui plug in runtime object p plug in runtime classes are code bundle activators code and so must have an default constructor this method is called by the runtime when the associated bundle is being activated p for more details see code plugin code s default constructor see plugin plugin since 3 0 public abstractui plugin super bundleactivators abstractuiplugin returns a new image registry for this plugin in the registry will be used to manage images which are frequently used by the plugin in p the default implementation of this method creates an empty registry subclasses may override this method if needed p return image registry the resulting registry see get image registry protected image registry create image registry if we are in the ui thread use that if display get current null return new image registry display get current if platformui is workbench running return new image registry platformui get workbench get display invalid thread access if it is not the ui thread and the workbench is not created throw new swt error swt error thread invalid access imageregistry getimageregistry imageregistry createimageregistry getcurrent imageregistry getcurrent isworkbenchrunning imageregistry getworkbench getdisplay swterror error_thread_invalid_access returns the dialog settings for this ui plug in the dialog settings is used to hold persistent state data for the various wizards and dialogs of this plug in in the context of a workbench p if an error occurs reading the dialog store an empty one is quietly created and returned p p subclasses may override this method but are not expected to p return the dialog settings public i dialog settings get dialog settings if dialog settings null load dialog settings return dialog settings idialogsettings getdialogsettings dialogsettings loaddialogsettings dialogsettings returns the image registry for this ui plug in p the image registry contains the images used by this plug in that are very frequently used and so need to be globally shared within the plug in since many o ss have a severe limit on the number of images that can be in memory at any given time a plug in should only keep a small number of images in their registry p subclasses should reimplement code initialize image registry code if they have custom graphic images to load p p subclasses may override this method but are not expected to p return the image registry public image registry get image registry if image registry null image registry create image registry initialize image registry image registry return image registry oss initializeimageregistry imageregistry getimageregistry imageregistry imageregistry createimageregistry initializeimageregistry imageregistry imageregistry returns the preference store for this ui plug in this preference store is used to hold persistent settings for this plug in in the context of a workbench some of these settings will be user controlled whereas others may be internal setting that are never exposed to the user p if an error occurs reading the preference store an empty preference store is quietly created initialized with defaults and returned p p strong note strong as of eclipse 3 1 this method is no longer referring to the core runtime compatibility layer and so plug ins relying on plugin initialize default preferences will have to access the compatibility layer themselves p return the preference store public i preference store get preference store create the preference store lazily if preference store null preference store new scoped preference store new instance scope get bundle get symbolic name return preference store initializedefaultpreferences ipreferencestore getpreferencestore preferencestore preferencestore scopedpreferencestore instancescope getbundle getsymbolicname preferencestore returns the platform ui workbench p this method exists as a convenience for plugin implementors the workbench can also be accessed by invoking code platformui get workbench code p return i workbench the workbench for this plug in public i workbench get workbench return platformui get workbench getworkbench iworkbench iworkbench getworkbench getworkbench initializes a preference store with default preference values for this plug in p this method is called after the preference store is initially loaded default values are never stored in preference stores p p the default implementation of this method does nothing subclasses should reimplement this method if the plug in has any preferences p p a subclass may reimplement this method to set default values for the preference store using j face api this is the older way of initializing default values if this method is reimplemented do not override code initialize default plugin preferences code p param store the preference store to fill deprecated this is only called if the runtime compatibility layer is present see link initialize default plugin preferences protected void initialize default preferences i preference store store spec ed to do nothing jface initializedefaultpluginpreferences initializedefaultpluginpreferences initializedefaultpreferences ipreferencestore the code abstractui plugin code implementation of this code plugin code method forwards to code initialize default preferences i preference store code p a subclass may reimplement this method to set default values for the core runtime preference store in the standard way this is the recommended way to do this the older code initialize default preferences i preference store code method serves a similar purpose if this method is reimplemented do not send super and do not override code initialize default preferences i preference store code p deprecated this is only called if the runtime compatibility layer is present see the deprecated comment in link plugin initialize default plugin preferences see initialize default preferences since 2 0 protected void initialize default plugin preferences n b by the time this method is called the plug in has a core runtime preference store no default values call load preference store only for backwards compatibility with eclipse 1 0 load preference store call initialize default preferences only for backwards compatibility with eclipse 1 0 initialize default preferences get preference store abstractuiplugin initializedefaultpreferences ipreferencestore initializedefaultpreferences ipreferencestore initializedefaultpreferences ipreferencestore initializedefaultpluginpreferences initializedefaultpreferences initializedefaultpluginpreferences loadpreferencestore loadpreferencestore initializedefaultpreferences initializedefaultpreferences getpreferencestore initializes an image registry with images which are frequently used by the plugin p the image registry contains the images used by this plug in that are very frequently used and so need to be globally shared within the plug in since many o ss have a severe limit on the number of images that can be in memory at any given time each plug in should only keep a small number of images in its registry p p implementors should create a j face image descriptor for each frequently used image the descriptors describe how to create find the image should it be needed the image described by the descriptor is not actually allocated until someone retrieves it p p subclasses may override this method to fill the image registry p param reg the registry to initalize see get image registry protected void initialize image registry image registry reg spec ed to do nothing oss jface getimageregistry initializeimageregistry imageregistry loads the dialog settings for this plug in the default implementation first looks for a standard named file in the plug in s read write state area if no such file exists the plug in s install directory is checked to see if one was installed with some default settings if no file is found in either place a new empty dialog settings is created if a problem occurs an empty settings is silently used p this framework method may be overridden although this is typically unnecessary p protected void load dialog settings dialog settings new dialog settings workbench non nls 1 bug 69387 the instance area should not be created in the call to get state location if data none or data no default was used i path data location get state location or null if data location null try r w state area in the local file system string read write path data location append fn dialog settings toos string file settings file new file read write path if settings file exists try dialog settings load read write path catch io exception e load failed so ensure we have an empty settings dialog settings new dialog settings workbench non nls 1 return otherwise look for bundle specific dialog settings url dsurl bundle utility find get bundle fn dialog settings if dsurl null return input stream is null try is dsurl open stream buffered reader reader new buffered reader new input stream reader is utf 8 non nls 1 dialog settings load reader catch io exception e load failed so ensure we have an empty settings dialog settings new dialog settings workbench non nls 1 finally try if is null is close catch io exception e do nothing loaddialogsettings dialogsettings dialogsettings getstatelocation nodefault ipath datalocation getstatelocationornull datalocation readwritepath datalocation fn_dialog_settings toosstring settingsfile readwritepath settingsfile dialogsettings readwritepath ioexception dialogsettings dialogsettings bundleutility getbundle fn_dialog_settings inputstream openstream bufferedreader bufferedreader inputstreamreader dialogsettings ioexception dialogsettings dialogsettings ioexception loads the preference store for this plug in the default implementation looks for a standard named file in the plug in s read write state area if no file is found or a problem occurs a new empty preference store is silently created p this framework method may be overridden although this is typically unnecessary p deprecated as of eclipse 2 0 a basic preference store exists for all plug ins this method now exists only for backwards compatibility it is called as the plug in s preference store is being initialized the plug ins preferences are loaded from the file regardless of what this method does protected void load preference store do nothing by default loadpreferencestore refreshes the actions for the plugin this method is called from code startup code p this framework method may be overridden although this is typically unnecessary p protected void refresh plugin actions if the workbench is not started yet or is no longer running do nothing if platformui is workbench running return startup is not guaranteed to be called in the ui thread but refresh plugin actions must run in the ui thread so use async exec see bug 6623 for more details display get default async exec new runnable public void run w win plugin action refresh action list refreshpluginactions isworkbenchrunning refreshpluginactions asyncexec getdefault asyncexec wwinpluginaction refreshactionlist so use async exec see bug 6623 for more details display get default async exec new runnable public void run w win plugin action refresh action list asyncexec getdefault asyncexec wwinpluginaction refreshactionlist saves this plug in s dialog settings any problems which arise are silently ignored protected void save dialog settings if dialog settings null return try i path path get state location or null if path null return string read write path path append fn dialog settings toos string dialog settings save read write path catch io exception e spec ed to ignore problems catch illegal state exception e spec ed to ignore problems savedialogsettings dialogsettings ipath getstatelocationornull readwritepath fn_dialog_settings toosstring dialogsettings readwritepath ioexception illegalstateexception saves this plug in s preference store any problems which arise are silently ignored see plugin save plugin preferences deprecated as of eclipse 2 0 preferences exist for all plug ins the equivalent of this method is code plugin save plugin preferences code this method now calls code save plugin preferences code and exists only for backwards compatibility protected void save preference store save plugin preferences savepluginpreferences savepluginpreferences savepluginpreferences savepreferencestore savepluginpreferences the code abstractui plugin code implementation of this code plugin code method does nothing subclasses may extend this method but must send super first p warning plug ins may not be started in the ui thread the code startup code method should not assume that its code runs in the ui thread otherwise swt thread exceptions may occur on startup deprecated in eclipse 3 0 code startup code has been replaced by link plugin start bundle context context implementations of code startup code should be changed to extend code start bundle context context code and call code super start context code instead of code super startup code like code super startup code code super stop context code must be called as the very first thing the code startup code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in in contrast the code start code method is always called public void startup throws core exception this method no longer does anything the code that used to be here in 2 1 has moved to start bundle context super startup abstractuiplugin bundlecontext bundlecontext coreexception bundlecontext the code abstractui plugin code implementation of this code plugin code method does nothing subclasses may extend this method but must send super first deprecated in eclipse 3 0 code shutdown code has been replaced by link plugin stop bundle context context implementations of code shutdown code should be changed to extend code stop bundle context context code and call code super stop context code instead of code super shutdown code unlike code super shutdown code code super stop context code must be called as the very b last b thing rather than as the very first thing the code shutdown code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in in contrast the code stop code method is always called public void shutdown throws core exception this method no longer does anything interesting the code that used to be here in 2 1 has moved to stop bundle context which is called regardless of whether the plug in being instantiated requires org eclipse core runtime compatibility super shutdown abstractuiplugin bundlecontext bundlecontext coreexception bundlecontext the code abstractui plugin code implementation of this code plugin code method refreshes the plug in actions subclasses may extend this method but must send super b first b inherit doc since 3 0 public void start bundle context context throws exception super start context final bundle context fc context should only attempt refresh plugin actions once the bundle has been fully started otherwise action delegates can be created while in the process of creating a triggering action delegate if ui events are processed during startup also if the start throws an exception the bundle will be shut down we don t want to have created any delegates if this happens see bug 63324 for more details bundle listener new bundle listener public void bundle changed bundle event event if event get bundle get bundle if event get type bundle event started we re getting notified that the bundle has been started make sure it s still active it may have been shut down between the time this event was queued and now if get bundle get state bundle active refresh plugin actions fc remove bundle listener this context add bundle listener bundle listener bundle listener is removed in stop bundle context abstractuiplugin inheritdoc bundlecontext bundlecontext refreshpluginactions bundlelistener bundlelistener bundlechanged bundleevent getbundle getbundle gettype bundleevent getbundle getstate refreshpluginactions removebundlelistener addbundlelistener bundlelistener bundlelistener bundlecontext bundle listener new bundle listener public void bundle changed bundle event event if event get bundle get bundle if event get type bundle event started we re getting notified that the bundle has been started make sure it s still active it may have been shut down between the time this event was queued and now if get bundle get state bundle active refresh plugin actions fc remove bundle listener this bundlelistener bundlelistener bundlechanged bundleevent getbundle getbundle gettype bundleevent getbundle getstate refreshpluginactions removebundlelistener the code abstractui plugin code implementation of this code plugin code method saves this plug in s preference and dialog stores and shuts down its image registry if they are in use subclasses may extend this method but must send super b last b a try finally statement should be used where necessary to ensure that code super shutdown code is always done inherit doc since 3 0 public void stop bundle context context throws exception try if bundle listener null context remove bundle listener bundle listener save dialog settings save preference store preference store null image registry null finally super stop context abstractuiplugin inheritdoc bundlecontext bundlelistener removebundlelistener bundlelistener savedialogsettings savepreferencestore preferencestore imageregistry creates and returns a new image descriptor for an image file located within the specified plug in p this is a convenience method that simply locates the image file in within the plug in no image registries are involved the path is relative to the root of the plug in and takes into account files coming from plug in fragments the path may include arg elements however the path must not have a leading or path separator clients should use a path like icons mysample gif rather than icons mysample gif or icons mysample gif p param plugin id the id of the plug in containing the image file code null code is returned if the plug in does not exist param image file path the relative path of the image file relative to the root of the plug in the path must be legal return an image descriptor or code null code if no image could be found since 3 0 public static image descriptor image descriptor from plugin string plugin id string image file path if plugin id null image file path null throw new illegal argument exception if the bundle is not ready then there is no image bundle bundle platform get bundle plugin id if bundle utility is ready bundle return null look for the image this will check both the plugin and fragment folders url full path string bundle utility find bundle image file path if full path string null try full path string new url image file path catch malformedurl exception e return null if full path string null return null return image descriptor create fromurl full path string pluginid imagefilepath imagedescriptor imagedescriptorfromplugin pluginid imagefilepath pluginid imagefilepath illegalargumentexception getbundle pluginid bundleutility isready fullpathstring bundleutility imagefilepath fullpathstring fullpathstring imagefilepath malformedurlexception fullpathstring imagedescriptor createfromurl fullpathstring for internal workbench use only returns the path to a location in the file system that can be used to persist restore state between workbench invocations if the location did not exist prior to this call it will be created returns code null code if no such location is available return path to a location in the file system where this plug in can persist data between sessions or code null code if no such location is available since 3 1 private i path get state location or null try return get state location catch illegal state exception e this occurs if data none is explicitly specified so ignore this silently is this ok see bug 85071 return null ipath getstatelocationornull getstatelocation illegalstateexception creates an abstract ui plug in runtime object for the given plug in descriptor p note that instances of plug in runtime classes are automatically created by the platform in the course of plug in activation p param descriptor the plug in descriptor see plugin plugin org eclipse core runtime i plugin descriptor descriptor deprecated in eclipse 3 0 this constructor has been replaced by link abstractui plugin implementations of code my plugin i plugin descriptor descriptor code should be changed to code my plugin code and call code super code instead of code super descriptor code the code my plugin i plugin descriptor descriptor code constructor is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in or as in this case subclasses which might public abstractui plugin i plugin descriptor descriptor super descriptor iplugindescriptor abstractuiplugin myplugin iplugindescriptor myplugin myplugin iplugindescriptor abstractuiplugin iplugindescriptor creates an abstract ui plug in runtime object p plug in runtime classes are code bundle activators code and so must have an default constructor this method is called by the runtime when the associated bundle is being activated p for more details see code plugin code s default constructor see plugin plugin since 3 0 public abstractui plugin super bundleactivators abstractuiplugin returns a new image registry for this plugin in the registry will be used to manage images which are frequently used by the plugin in p the default implementation of this method creates an empty registry subclasses may override this method if needed p return image registry the resulting registry see get image registry protected image registry create image registry if we are in the ui thread use that if display get current null return new image registry display get current if platformui is workbench running return new image registry platformui get workbench get display invalid thread access if it is not the ui thread and the workbench is not created throw new swt error swt error thread invalid access imageregistry getimageregistry imageregistry createimageregistry getcurrent imageregistry getcurrent isworkbenchrunning imageregistry getworkbench getdisplay swterror error_thread_invalid_access returns the dialog settings for this ui plug in the dialog settings is used to hold persistent state data for the various wizards and dialogs of this plug in in the context of a workbench p if an error occurs reading the dialog store an empty one is quietly created and returned p p subclasses may override this method but are not expected to p return the dialog settings public i dialog settings get dialog settings if dialog settings null load dialog settings return dialog settings idialogsettings getdialogsettings dialogsettings loaddialogsettings dialogsettings returns the image registry for this ui plug in p the image registry contains the images used by this plug in that are very frequently used and so need to be globally shared within the plug in since many o ss have a severe limit on the number of images that can be in memory at any given time a plug in should only keep a small number of images in their registry p subclasses should reimplement code initialize image registry code if they have custom graphic images to load p p subclasses may override this method but are not expected to p return the image registry public image registry get image registry if image registry null image registry create image registry initialize image registry image registry return image registry oss initializeimageregistry imageregistry getimageregistry imageregistry imageregistry createimageregistry initializeimageregistry imageregistry imageregistry returns the preference store for this ui plug in this preference store is used to hold persistent settings for this plug in in the context of a workbench some of these settings will be user controlled whereas others may be internal setting that are never exposed to the user p if an error occurs reading the preference store an empty preference store is quietly created initialized with defaults and returned p p strong note strong as of eclipse 3 1 this method is no longer referring to the core runtime compatibility layer and so plug ins relying on plugin initialize default preferences will have to access the compatibility layer themselves p return the preference store public i preference store get preference store create the preference store lazily if preference store null preference store new scoped preference store new instance scope get bundle get symbolic name return preference store initializedefaultpreferences ipreferencestore getpreferencestore preferencestore preferencestore scopedpreferencestore instancescope getbundle getsymbolicname preferencestore returns the platform ui workbench p this method exists as a convenience for plugin implementors the workbench can also be accessed by invoking code platformui get workbench code p return i workbench the workbench for this plug in public i workbench get workbench return platformui get workbench getworkbench iworkbench iworkbench getworkbench getworkbench initializes a preference store with default preference values for this plug in p this method is called after the preference store is initially loaded default values are never stored in preference stores p p the default implementation of this method does nothing subclasses should reimplement this method if the plug in has any preferences p p a subclass may reimplement this method to set default values for the preference store using j face api this is the older way of initializing default values if this method is reimplemented do not override code initialize default plugin preferences code p param store the preference store to fill deprecated this is only called if the runtime compatibility layer is present see link initialize default plugin preferences protected void initialize default preferences i preference store store spec ed to do nothing jface initializedefaultpluginpreferences initializedefaultpluginpreferences initializedefaultpreferences ipreferencestore the code abstractui plugin code implementation of this code plugin code method forwards to code initialize default preferences i preference store code p a subclass may reimplement this method to set default values for the core runtime preference store in the standard way this is the recommended way to do this the older code initialize default preferences i preference store code method serves a similar purpose if this method is reimplemented do not send super and do not override code initialize default preferences i preference store code p deprecated this is only called if the runtime compatibility layer is present see the deprecated comment in link plugin initialize default plugin preferences see initialize default preferences since 2 0 protected void initialize default plugin preferences n b by the time this method is called the plug in has a core runtime preference store no default values call load preference store only for backwards compatibility with eclipse 1 0 load preference store call initialize default preferences only for backwards compatibility with eclipse 1 0 initialize default preferences get preference store abstractuiplugin initializedefaultpreferences ipreferencestore initializedefaultpreferences ipreferencestore initializedefaultpreferences ipreferencestore initializedefaultpluginpreferences initializedefaultpreferences initializedefaultpluginpreferences loadpreferencestore loadpreferencestore initializedefaultpreferences initializedefaultpreferences getpreferencestore initializes an image registry with images which are frequently used by the plugin p the image registry contains the images used by this plug in that are very frequently used and so need to be globally shared within the plug in since many o ss have a severe limit on the number of images that can be in memory at any given time each plug in should only keep a small number of images in its registry p p implementors should create a j face image descriptor for each frequently used image the descriptors describe how to create find the image should it be needed the image described by the descriptor is not actually allocated until someone retrieves it p p subclasses may override this method to fill the image registry p param reg the registry to initalize see get image registry protected void initialize image registry image registry reg spec ed to do nothing oss jface getimageregistry initializeimageregistry imageregistry loads the dialog settings for this plug in the default implementation first looks for a standard named file in the plug in s read write state area if no such file exists the plug in s install directory is checked to see if one was installed with some default settings if no file is found in either place a new empty dialog settings is created if a problem occurs an empty settings is silently used p this framework method may be overridden although this is typically unnecessary p protected void load dialog settings dialog settings new dialog settings workbench non nls 1 bug 69387 the instance area should not be created in the call to get state location if data none or data no default was used i path data location get state location or null if data location null try r w state area in the local file system string read write path data location append fn dialog settings toos string file settings file new file read write path if settings file exists try dialog settings load read write path catch io exception e load failed so ensure we have an empty settings dialog settings new dialog settings workbench non nls 1 return otherwise look for bundle specific dialog settings url dsurl bundle utility find get bundle fn dialog settings if dsurl null return input stream is null try is dsurl open stream buffered reader reader new buffered reader new input stream reader is utf 8 non nls 1 dialog settings load reader catch io exception e load failed so ensure we have an empty settings dialog settings new dialog settings workbench non nls 1 finally try if is null is close catch io exception e do nothing loaddialogsettings dialogsettings dialogsettings getstatelocation nodefault ipath datalocation getstatelocationornull datalocation readwritepath datalocation fn_dialog_settings toosstring settingsfile readwritepath settingsfile dialogsettings readwritepath ioexception dialogsettings dialogsettings bundleutility getbundle fn_dialog_settings inputstream openstream bufferedreader bufferedreader inputstreamreader dialogsettings ioexception dialogsettings dialogsettings ioexception loads the preference store for this plug in the default implementation looks for a standard named file in the plug in s read write state area if no file is found or a problem occurs a new empty preference store is silently created p this framework method may be overridden although this is typically unnecessary p deprecated as of eclipse 2 0 a basic preference store exists for all plug ins this method now exists only for backwards compatibility it is called as the plug in s preference store is being initialized the plug ins preferences are loaded from the file regardless of what this method does protected void load preference store do nothing by default loadpreferencestore refreshes the actions for the plugin this method is called from code startup code p this framework method may be overridden although this is typically unnecessary p protected void refresh plugin actions if the workbench is not started yet or is no longer running do nothing if platformui is workbench running return startup is not guaranteed to be called in the ui thread but refresh plugin actions must run in the ui thread so use async exec see bug 6623 for more details display get default async exec new runnable public void run w win plugin action refresh action list refreshpluginactions isworkbenchrunning refreshpluginactions asyncexec getdefault asyncexec wwinpluginaction refreshactionlist so use async exec see bug 6623 for more details display get default async exec new runnable public void run w win plugin action refresh action list asyncexec getdefault asyncexec wwinpluginaction refreshactionlist saves this plug in s dialog settings any problems which arise are silently ignored protected void save dialog settings if dialog settings null return try i path path get state location or null if path null return string read write path path append fn dialog settings toos string dialog settings save read write path catch io exception e spec ed to ignore problems catch illegal state exception e spec ed to ignore problems savedialogsettings dialogsettings ipath getstatelocationornull readwritepath fn_dialog_settings toosstring dialogsettings readwritepath ioexception illegalstateexception saves this plug in s preference store any problems which arise are silently ignored see plugin save plugin preferences deprecated as of eclipse 2 0 preferences exist for all plug ins the equivalent of this method is code plugin save plugin preferences code this method now calls code save plugin preferences code and exists only for backwards compatibility protected void save preference store save plugin preferences savepluginpreferences savepluginpreferences savepluginpreferences savepreferencestore savepluginpreferences the code abstractui plugin code implementation of this code plugin code method does nothing subclasses may extend this method but must send super first p warning plug ins may not be started in the ui thread the code startup code method should not assume that its code runs in the ui thread otherwise swt thread exceptions may occur on startup deprecated in eclipse 3 0 code startup code has been replaced by link plugin start bundle context context implementations of code startup code should be changed to extend code start bundle context context code and call code super start context code instead of code super startup code like code super startup code code super stop context code must be called as the very first thing the code startup code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in in contrast the code start code method is always called public void startup throws core exception this method no longer does anything the code that used to be here in 2 1 has moved to start bundle context super startup abstractuiplugin bundlecontext bundlecontext coreexception bundlecontext the code abstractui plugin code implementation of this code plugin code method does nothing subclasses may extend this method but must send super first deprecated in eclipse 3 0 code shutdown code has been replaced by link plugin stop bundle context context implementations of code shutdown code should be changed to extend code stop bundle context context code and call code super stop context code instead of code super shutdown code unlike code super shutdown code code super stop context code must be called as the very b last b thing rather than as the very first thing the code shutdown code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in in contrast the code stop code method is always called public void shutdown throws core exception this method no longer does anything interesting the code that used to be here in 2 1 has moved to stop bundle context which is called regardless of whether the plug in being instantiated requires org eclipse core runtime compatibility super shutdown abstractuiplugin bundlecontext bundlecontext coreexception bundlecontext the code abstractui plugin code implementation of this code plugin code method refreshes the plug in actions subclasses may extend this method but must send super b first b inherit doc since 3 0 public void start bundle context context throws exception super start context final bundle context fc context should only attempt refresh plugin actions once the bundle has been fully started otherwise action delegates can be created while in the process of creating a triggering action delegate if ui events are processed during startup also if the start throws an exception the bundle will be shut down we don t want to have created any delegates if this happens see bug 63324 for more details bundle listener new bundle listener public void bundle changed bundle event event if event get bundle get bundle if event get type bundle event started we re getting notified that the bundle has been started make sure it s still active it may have been shut down between the time this event was queued and now if get bundle get state bundle active refresh plugin actions fc remove bundle listener this context add bundle listener bundle listener bundle listener is removed in stop bundle context abstractuiplugin inheritdoc bundlecontext bundlecontext refreshpluginactions bundlelistener bundlelistener bundlechanged bundleevent getbundle getbundle gettype bundleevent getbundle getstate refreshpluginactions removebundlelistener addbundlelistener bundlelistener bundlelistener bundlecontext bundle listener new bundle listener public void bundle changed bundle event event if event get bundle get bundle if event get type bundle event started we re getting notified that the bundle has been started make sure it s still active it may have been shut down between the time this event was queued and now if get bundle get state bundle active refresh plugin actions fc remove bundle listener this bundlelistener bundlelistener bundlechanged bundleevent getbundle getbundle gettype bundleevent getbundle getstate refreshpluginactions removebundlelistener the code abstractui plugin code implementation of this code plugin code method saves this plug in s preference and dialog stores and shuts down its image registry if they are in use subclasses may extend this method but must send super b last b a try finally statement should be used where necessary to ensure that code super shutdown code is always done inherit doc since 3 0 public void stop bundle context context throws exception try if bundle listener null context remove bundle listener bundle listener save dialog settings save preference store preference store null image registry null finally super stop context abstractuiplugin inheritdoc bundlecontext bundlelistener removebundlelistener bundlelistener savedialogsettings savepreferencestore preferencestore imageregistry creates and returns a new image descriptor for an image file located within the specified plug in p this is a convenience method that simply locates the image file in within the plug in no image registries are involved the path is relative to the root of the plug in and takes into account files coming from plug in fragments the path may include arg elements however the path must not have a leading or path separator clients should use a path like icons mysample gif rather than icons mysample gif or icons mysample gif p param plugin id the id of the plug in containing the image file code null code is returned if the plug in does not exist param image file path the relative path of the image file relative to the root of the plug in the path must be legal return an image descriptor or code null code if no image could be found since 3 0 public static image descriptor image descriptor from plugin string plugin id string image file path if plugin id null image file path null throw new illegal argument exception if the bundle is not ready then there is no image bundle bundle platform get bundle plugin id if bundle utility is ready bundle return null look for the image this will check both the plugin and fragment folders url full path string bundle utility find bundle image file path if full path string null try full path string new url image file path catch malformedurl exception e return null if full path string null return null return image descriptor create fromurl full path string pluginid imagefilepath imagedescriptor imagedescriptorfromplugin pluginid imagefilepath pluginid imagefilepath illegalargumentexception getbundle pluginid bundleutility isready fullpathstring bundleutility imagefilepath fullpathstring fullpathstring imagefilepath malformedurlexception fullpathstring imagedescriptor createfromurl fullpathstring for internal workbench use only returns the path to a location in the file system that can be used to persist restore state between workbench invocations if the location did not exist prior to this call it will be created returns code null code if no such location is available return path to a location in the file system where this plug in can persist data between sessions or code null code if no such location is available since 3 1 private i path get state location or null try return get state location catch illegal state exception e this occurs if data none is explicitly specified so ignore this silently is this ok see bug 85071 return null ipath getstatelocationornull getstatelocation illegalstateexception creates an abstract ui plug in runtime object for the given plug in descriptor p note that instances of plug in runtime classes are automatically created by the platform in the course of plug in activation p param descriptor the plug in descriptor see plugin plugin org eclipse core runtime i plugin descriptor descriptor deprecated in eclipse 3 0 this constructor has been replaced by link abstractui plugin implementations of code my plugin i plugin descriptor descriptor code should be changed to code my plugin code and call code super code instead of code super descriptor code the code my plugin i plugin descriptor descriptor code constructor is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in or as in this case subclasses which might public abstractui plugin i plugin descriptor descriptor super descriptor iplugindescriptor abstractuiplugin myplugin iplugindescriptor myplugin myplugin iplugindescriptor abstractuiplugin iplugindescriptor creates an abstract ui plug in runtime object p plug in runtime classes are code bundle activators code and so must have an default constructor this method is called by the runtime when the associated bundle is being activated p for more details see code plugin code s default constructor see plugin plugin since 3 0 public abstractui plugin super bundleactivators abstractuiplugin returns a new image registry for this plugin in the registry will be used to manage images which are frequently used by the plugin in p the default implementation of this method creates an empty registry subclasses may override this method if needed p return image registry the resulting registry see get image registry protected image registry create image registry if we are in the ui thread use that if display get current null return new image registry display get current if platformui is workbench running return new image registry platformui get workbench get display invalid thread access if it is not the ui thread and the workbench is not created throw new swt error swt error thread invalid access imageregistry getimageregistry imageregistry createimageregistry getcurrent imageregistry getcurrent isworkbenchrunning imageregistry getworkbench getdisplay swterror error_thread_invalid_access returns the dialog settings for this ui plug in the dialog settings is used to hold persistent state data for the various wizards and dialogs of this plug in in the context of a workbench p if an error occurs reading the dialog store an empty one is quietly created and returned p p subclasses may override this method but are not expected to p return the dialog settings public i dialog settings get dialog settings if dialog settings null load dialog settings return dialog settings idialogsettings getdialogsettings dialogsettings loaddialogsettings dialogsettings returns the image registry for this ui plug in p the image registry contains the images used by this plug in that are very frequently used and so need to be globally shared within the plug in since many o ss have a severe limit on the number of images that can be in memory at any given time a plug in should only keep a small number of images in their registry p subclasses should reimplement code initialize image registry code if they have custom graphic images to load p p subclasses may override this method but are not expected to p return the image registry public image registry get image registry if image registry null image registry create image registry initialize image registry image registry return image registry oss initializeimageregistry imageregistry getimageregistry imageregistry imageregistry createimageregistry initializeimageregistry imageregistry imageregistry returns the preference store for this ui plug in this preference store is used to hold persistent settings for this plug in in the context of a workbench some of these settings will be user controlled whereas others may be internal setting that are never exposed to the user p if an error occurs reading the preference store an empty preference store is quietly created initialized with defaults and returned p p strong note strong as of eclipse 3 1 this method is no longer referring to the core runtime compatibility layer and so plug ins relying on plugin initialize default preferences will have to access the compatibility layer themselves p return the preference store public i preference store get preference store create the preference store lazily if preference store null preference store new scoped preference store new instance scope get bundle get symbolic name return preference store initializedefaultpreferences ipreferencestore getpreferencestore preferencestore preferencestore scopedpreferencestore instancescope getbundle getsymbolicname preferencestore returns the platform ui workbench p this method exists as a convenience for plugin implementors the workbench can also be accessed by invoking code platformui get workbench code p return i workbench the workbench for this plug in public i workbench get workbench return platformui get workbench getworkbench iworkbench iworkbench getworkbench getworkbench initializes a preference store with default preference values for this plug in p this method is called after the preference store is initially loaded default values are never stored in preference stores p p the default implementation of this method does nothing subclasses should reimplement this method if the plug in has any preferences p p a subclass may reimplement this method to set default values for the preference store using j face api this is the older way of initializing default values if this method is reimplemented do not override code initialize default plugin preferences code p param store the preference store to fill deprecated this is only called if the runtime compatibility layer is present see link initialize default plugin preferences protected void initialize default preferences i preference store store spec ed to do nothing jface initializedefaultpluginpreferences initializedefaultpluginpreferences initializedefaultpreferences ipreferencestore the code abstractui plugin code implementation of this code plugin code method forwards to code initialize default preferences i preference store code p a subclass may reimplement this method to set default values for the core runtime preference store in the standard way this is the recommended way to do this the older code initialize default preferences i preference store code method serves a similar purpose if this method is reimplemented do not send super and do not override code initialize default preferences i preference store code p deprecated this is only called if the runtime compatibility layer is present see the deprecated comment in link plugin initialize default plugin preferences see initialize default preferences since 2 0 protected void initialize default plugin preferences n b by the time this method is called the plug in has a core runtime preference store no default values call load preference store only for backwards compatibility with eclipse 1 0 load preference store call initialize default preferences only for backwards compatibility with eclipse 1 0 initialize default preferences get preference store abstractuiplugin initializedefaultpreferences ipreferencestore initializedefaultpreferences ipreferencestore initializedefaultpreferences ipreferencestore initializedefaultpluginpreferences initializedefaultpreferences initializedefaultpluginpreferences loadpreferencestore loadpreferencestore initializedefaultpreferences initializedefaultpreferences getpreferencestore initializes an image registry with images which are frequently used by the plugin p the image registry contains the images used by this plug in that are very frequently used and so need to be globally shared within the plug in since many o ss have a severe limit on the number of images that can be in memory at any given time each plug in should only keep a small number of images in its registry p p implementors should create a j face image descriptor for each frequently used image the descriptors describe how to create find the image should it be needed the image described by the descriptor is not actually allocated until someone retrieves it p p subclasses may override this method to fill the image registry p param reg the registry to initalize see get image registry protected void initialize image registry image registry reg spec ed to do nothing oss jface getimageregistry initializeimageregistry imageregistry loads the dialog settings for this plug in the default implementation first looks for a standard named file in the plug in s read write state area if no such file exists the plug in s install directory is checked to see if one was installed with some default settings if no file is found in either place a new empty dialog settings is created if a problem occurs an empty settings is silently used p this framework method may be overridden although this is typically unnecessary p protected void load dialog settings dialog settings new dialog settings workbench non nls 1 bug 69387 the instance area should not be created in the call to get state location if data none or data no default was used i path data location get state location or null if data location null try r w state area in the local file system string read write path data location append fn dialog settings toos string file settings file new file read write path if settings file exists try dialog settings load read write path catch io exception e load failed so ensure we have an empty settings dialog settings new dialog settings workbench non nls 1 return otherwise look for bundle specific dialog settings url dsurl bundle utility find get bundle fn dialog settings if dsurl null return input stream is null try is dsurl open stream buffered reader reader new buffered reader new input stream reader is utf 8 non nls 1 dialog settings load reader catch io exception e load failed so ensure we have an empty settings dialog settings new dialog settings workbench non nls 1 finally try if is null is close catch io exception e do nothing loaddialogsettings dialogsettings dialogsettings getstatelocation nodefault ipath datalocation getstatelocationornull datalocation readwritepath datalocation fn_dialog_settings toosstring settingsfile readwritepath settingsfile dialogsettings readwritepath ioexception dialogsettings dialogsettings bundleutility getbundle fn_dialog_settings inputstream openstream bufferedreader bufferedreader inputstreamreader dialogsettings ioexception dialogsettings dialogsettings ioexception loads the preference store for this plug in the default implementation looks for a standard named file in the plug in s read write state area if no file is found or a problem occurs a new empty preference store is silently created p this framework method may be overridden although this is typically unnecessary p deprecated as of eclipse 2 0 a basic preference store exists for all plug ins this method now exists only for backwards compatibility it is called as the plug in s preference store is being initialized the plug ins preferences are loaded from the file regardless of what this method does protected void load preference store do nothing by default loadpreferencestore refreshes the actions for the plugin this method is called from code startup code p this framework method may be overridden although this is typically unnecessary p protected void refresh plugin actions if the workbench is not started yet or is no longer running do nothing if platformui is workbench running return startup is not guaranteed to be called in the ui thread but refresh plugin actions must run in the ui thread so use async exec see bug 6623 for more details display get default async exec new runnable public void run w win plugin action refresh action list refreshpluginactions isworkbenchrunning refreshpluginactions asyncexec getdefault asyncexec wwinpluginaction refreshactionlist so use async exec see bug 6623 for more details display get default async exec new runnable public void run w win plugin action refresh action list asyncexec getdefault asyncexec wwinpluginaction refreshactionlist saves this plug in s dialog settings any problems which arise are silently ignored protected void save dialog settings if dialog settings null return try i path path get state location or null if path null return string read write path path append fn dialog settings toos string dialog settings save read write path catch io exception e spec ed to ignore problems catch illegal state exception e spec ed to ignore problems savedialogsettings dialogsettings ipath getstatelocationornull readwritepath fn_dialog_settings toosstring dialogsettings readwritepath ioexception illegalstateexception saves this plug in s preference store any problems which arise are silently ignored see plugin save plugin preferences deprecated as of eclipse 2 0 preferences exist for all plug ins the equivalent of this method is code plugin save plugin preferences code this method now calls code save plugin preferences code and exists only for backwards compatibility protected void save preference store save plugin preferences savepluginpreferences savepluginpreferences savepluginpreferences savepreferencestore savepluginpreferences the code abstractui plugin code implementation of this code plugin code method does nothing subclasses may extend this method but must send super first p warning plug ins may not be started in the ui thread the code startup code method should not assume that its code runs in the ui thread otherwise swt thread exceptions may occur on startup deprecated in eclipse 3 0 code startup code has been replaced by link plugin start bundle context context implementations of code startup code should be changed to extend code start bundle context context code and call code super start context code instead of code super startup code like code super startup code code super stop context code must be called as the very first thing the code startup code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in in contrast the code start code method is always called public void startup throws core exception this method no longer does anything the code that used to be here in 2 1 has moved to start bundle context super startup abstractuiplugin bundlecontext bundlecontext coreexception bundlecontext the code abstractui plugin code implementation of this code plugin code method does nothing subclasses may extend this method but must send super first deprecated in eclipse 3 0 code shutdown code has been replaced by link plugin stop bundle context context implementations of code shutdown code should be changed to extend code stop bundle context context code and call code super stop context code instead of code super shutdown code unlike code super shutdown code code super stop context code must be called as the very b last b thing rather than as the very first thing the code shutdown code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in in contrast the code stop code method is always called public void shutdown throws core exception this method no longer does anything interesting the code that used to be here in 2 1 has moved to stop bundle context which is called regardless of whether the plug in being instantiated requires org eclipse core runtime compatibility super shutdown abstractuiplugin bundlecontext bundlecontext coreexception bundlecontext the code abstractui plugin code implementation of this code plugin code method refreshes the plug in actions subclasses may extend this method but must send super b first b inherit doc since 3 0 public void start bundle context context throws exception super start context final bundle context fc context should only attempt refresh plugin actions once the bundle has been fully started otherwise action delegates can be created while in the process of creating a triggering action delegate if ui events are processed during startup also if the start throws an exception the bundle will be shut down we don t want to have created any delegates if this happens see bug 63324 for more details bundle listener new bundle listener public void bundle changed bundle event event if event get bundle get bundle if event get type bundle event started we re getting notified that the bundle has been started make sure it s still active it may have been shut down between the time this event was queued and now if get bundle get state bundle active refresh plugin actions fc remove bundle listener this context add bundle listener bundle listener bundle listener is removed in stop bundle context abstractuiplugin inheritdoc bundlecontext bundlecontext refreshpluginactions bundlelistener bundlelistener bundlechanged bundleevent getbundle getbundle gettype bundleevent getbundle getstate refreshpluginactions removebundlelistener addbundlelistener bundlelistener bundlelistener bundlecontext bundle listener new bundle listener public void bundle changed bundle event event if event get bundle get bundle if event get type bundle event started we re getting notified that the bundle has been started make sure it s still active it may have been shut down between the time this event was queued and now if get bundle get state bundle active refresh plugin actions fc remove bundle listener this bundlelistener bundlelistener bundlechanged bundleevent getbundle getbundle gettype bundleevent getbundle getstate refreshpluginactions removebundlelistener the code abstractui plugin code implementation of this code plugin code method saves this plug in s preference and dialog stores and shuts down its image registry if they are in use subclasses may extend this method but must send super b last b a try finally statement should be used where necessary to ensure that code super shutdown code is always done inherit doc since 3 0 public void stop bundle context context throws exception try if bundle listener null context remove bundle listener bundle listener save dialog settings save preference store preference store null image registry null finally super stop context abstractuiplugin inheritdoc bundlecontext bundlelistener removebundlelistener bundlelistener savedialogsettings savepreferencestore preferencestore imageregistry creates and returns a new image descriptor for an image file located within the specified plug in p this is a convenience method that simply locates the image file in within the plug in no image registries are involved the path is relative to the root of the plug in and takes into account files coming from plug in fragments the path may include arg elements however the path must not have a leading or path separator clients should use a path like icons mysample gif rather than icons mysample gif or icons mysample gif p param plugin id the id of the plug in containing the image file code null code is returned if the plug in does not exist param image file path the relative path of the image file relative to the root of the plug in the path must be legal return an image descriptor or code null code if no image could be found since 3 0 public static image descriptor image descriptor from plugin string plugin id string image file path if plugin id null image file path null throw new illegal argument exception if the bundle is not ready then there is no image bundle bundle platform get bundle plugin id if bundle utility is ready bundle return null look for the image this will check both the plugin and fragment folders url full path string bundle utility find bundle image file path if full path string null try full path string new url image file path catch malformedurl exception e return null if full path string null return null return image descriptor create fromurl full path string pluginid imagefilepath imagedescriptor imagedescriptorfromplugin pluginid imagefilepath pluginid imagefilepath illegalargumentexception getbundle pluginid bundleutility isready fullpathstring bundleutility imagefilepath fullpathstring fullpathstring imagefilepath malformedurlexception fullpathstring imagedescriptor createfromurl fullpathstring for internal workbench use only returns the path to a location in the file system that can be used to persist restore state between workbench invocations if the location did not exist prior to this call it will be created returns code null code if no such location is available return path to a location in the file system where this plug in can persist data between sessions or code null code if no such location is available since 3 1 private i path get state location or null try return get state location catch illegal state exception e this occurs if data none is explicitly specified so ignore this silently is this ok see bug 85071 return null ipath getstatelocationornull getstatelocation illegalstateexception creates an abstract ui plug in runtime object for the given plug in descriptor p note that instances of plug in runtime classes are automatically created by the platform in the course of plug in activation p param descriptor the plug in descriptor see plugin plugin org eclipse core runtime i plugin descriptor descriptor deprecated in eclipse 3 0 this constructor has been replaced by link abstractui plugin implementations of code my plugin i plugin descriptor descriptor code should be changed to code my plugin code and call code super code instead of code super descriptor code the code my plugin i plugin descriptor descriptor code constructor is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in or as in this case subclasses which might public abstractui plugin i plugin descriptor descriptor super descriptor iplugindescriptor abstractuiplugin myplugin iplugindescriptor myplugin myplugin iplugindescriptor abstractuiplugin iplugindescriptor creates an abstract ui plug in runtime object p plug in runtime classes are code bundle activators code and so must have an default constructor this method is called by the runtime when the associated bundle is being activated p for more details see code plugin code s default constructor see plugin plugin since 3 0 public abstractui plugin super bundleactivators abstractuiplugin returns a new image registry for this plugin in the registry will be used to manage images which are frequently used by the plugin in p the default implementation of this method creates an empty registry subclasses may override this method if needed p return image registry the resulting registry see get image registry protected image registry create image registry if we are in the ui thread use that if display get current null return new image registry display get current if platformui is workbench running return new image registry platformui get workbench get display invalid thread access if it is not the ui thread and the workbench is not created throw new swt error swt error thread invalid access imageregistry getimageregistry imageregistry createimageregistry getcurrent imageregistry getcurrent isworkbenchrunning imageregistry getworkbench getdisplay swterror error_thread_invalid_access returns the dialog settings for this ui plug in the dialog settings is used to hold persistent state data for the various wizards and dialogs of this plug in in the context of a workbench p if an error occurs reading the dialog store an empty one is quietly created and returned p p subclasses may override this method but are not expected to p return the dialog settings public i dialog settings get dialog settings if dialog settings null load dialog settings return dialog settings idialogsettings getdialogsettings dialogsettings loaddialogsettings dialogsettings returns the image registry for this ui plug in p the image registry contains the images used by this plug in that are very frequently used and so need to be globally shared within the plug in since many o ss have a severe limit on the number of images that can be in memory at any given time a plug in should only keep a small number of images in their registry p subclasses should reimplement code initialize image registry code if they have custom graphic images to load p p subclasses may override this method but are not expected to p return the image registry public image registry get image registry if image registry null image registry create image registry initialize image registry image registry return image registry oss initializeimageregistry imageregistry getimageregistry imageregistry imageregistry createimageregistry initializeimageregistry imageregistry imageregistry returns the preference store for this ui plug in this preference store is used to hold persistent settings for this plug in in the context of a workbench some of these settings will be user controlled whereas others may be internal setting that are never exposed to the user p if an error occurs reading the preference store an empty preference store is quietly created initialized with defaults and returned p p strong note strong as of eclipse 3 1 this method is no longer referring to the core runtime compatibility layer and so plug ins relying on plugin initialize default preferences will have to access the compatibility layer themselves p return the preference store public i preference store get preference store create the preference store lazily if preference store null preference store new scoped preference store new instance scope get bundle get symbolic name return preference store initializedefaultpreferences ipreferencestore getpreferencestore preferencestore preferencestore scopedpreferencestore instancescope getbundle getsymbolicname preferencestore returns the platform ui workbench p this method exists as a convenience for plugin implementors the workbench can also be accessed by invoking code platformui get workbench code p return i workbench the workbench for this plug in public i workbench get workbench return platformui get workbench getworkbench iworkbench iworkbench getworkbench getworkbench initializes a preference store with default preference values for this plug in p this method is called after the preference store is initially loaded default values are never stored in preference stores p p the default implementation of this method does nothing subclasses should reimplement this method if the plug in has any preferences p p a subclass may reimplement this method to set default values for the preference store using j face api this is the older way of initializing default values if this method is reimplemented do not override code initialize default plugin preferences code p param store the preference store to fill deprecated this is only called if the runtime compatibility layer is present see link initialize default plugin preferences protected void initialize default preferences i preference store store spec ed to do nothing jface initializedefaultpluginpreferences initializedefaultpluginpreferences initializedefaultpreferences ipreferencestore the code abstractui plugin code implementation of this code plugin code method forwards to code initialize default preferences i preference store code p a subclass may reimplement this method to set default values for the core runtime preference store in the standard way this is the recommended way to do this the older code initialize default preferences i preference store code method serves a similar purpose if this method is reimplemented do not send super and do not override code initialize default preferences i preference store code p deprecated this is only called if the runtime compatibility layer is present see the deprecated comment in link plugin initialize default plugin preferences see initialize default preferences since 2 0 protected void initialize default plugin preferences n b by the time this method is called the plug in has a core runtime preference store no default values call load preference store only for backwards compatibility with eclipse 1 0 load preference store call initialize default preferences only for backwards compatibility with eclipse 1 0 initialize default preferences get preference store abstractuiplugin initializedefaultpreferences ipreferencestore initializedefaultpreferences ipreferencestore initializedefaultpreferences ipreferencestore initializedefaultpluginpreferences initializedefaultpreferences initializedefaultpluginpreferences loadpreferencestore loadpreferencestore initializedefaultpreferences initializedefaultpreferences getpreferencestore initializes an image registry with images which are frequently used by the plugin p the image registry contains the images used by this plug in that are very frequently used and so need to be globally shared within the plug in since many o ss have a severe limit on the number of images that can be in memory at any given time each plug in should only keep a small number of images in its registry p p implementors should create a j face image descriptor for each frequently used image the descriptors describe how to create find the image should it be needed the image described by the descriptor is not actually allocated until someone retrieves it p p subclasses may override this method to fill the image registry p param reg the registry to initalize see get image registry protected void initialize image registry image registry reg spec ed to do nothing oss jface getimageregistry initializeimageregistry imageregistry loads the dialog settings for this plug in the default implementation first looks for a standard named file in the plug in s read write state area if no such file exists the plug in s install directory is checked to see if one was installed with some default settings if no file is found in either place a new empty dialog settings is created if a problem occurs an empty settings is silently used p this framework method may be overridden although this is typically unnecessary p protected void load dialog settings dialog settings new dialog settings workbench non nls 1 bug 69387 the instance area should not be created in the call to get state location if data none or data no default was used i path data location get state location or null if data location null try r w state area in the local file system string read write path data location append fn dialog settings toos string file settings file new file read write path if settings file exists try dialog settings load read write path catch io exception e load failed so ensure we have an empty settings dialog settings new dialog settings workbench non nls 1 return otherwise look for bundle specific dialog settings url dsurl bundle utility find get bundle fn dialog settings if dsurl null return input stream is null try is dsurl open stream buffered reader reader new buffered reader new input stream reader is utf 8 non nls 1 dialog settings load reader catch io exception e load failed so ensure we have an empty settings dialog settings new dialog settings workbench non nls 1 finally try if is null is close catch io exception e do nothing loaddialogsettings dialogsettings dialogsettings getstatelocation nodefault ipath datalocation getstatelocationornull datalocation readwritepath datalocation fn_dialog_settings toosstring settingsfile readwritepath settingsfile dialogsettings readwritepath ioexception dialogsettings dialogsettings bundleutility getbundle fn_dialog_settings inputstream openstream bufferedreader bufferedreader inputstreamreader dialogsettings ioexception dialogsettings dialogsettings ioexception loads the preference store for this plug in the default implementation looks for a standard named file in the plug in s read write state area if no file is found or a problem occurs a new empty preference store is silently created p this framework method may be overridden although this is typically unnecessary p deprecated as of eclipse 2 0 a basic preference store exists for all plug ins this method now exists only for backwards compatibility it is called as the plug in s preference store is being initialized the plug ins preferences are loaded from the file regardless of what this method does protected void load preference store do nothing by default loadpreferencestore refreshes the actions for the plugin this method is called from code startup code p this framework method may be overridden although this is typically unnecessary p protected void refresh plugin actions if the workbench is not started yet or is no longer running do nothing if platformui is workbench running return startup is not guaranteed to be called in the ui thread but refresh plugin actions must run in the ui thread so use async exec see bug 6623 for more details display get default async exec new runnable public void run w win plugin action refresh action list refreshpluginactions isworkbenchrunning refreshpluginactions asyncexec getdefault asyncexec wwinpluginaction refreshactionlist so use async exec see bug 6623 for more details display get default async exec new runnable public void run w win plugin action refresh action list asyncexec getdefault asyncexec wwinpluginaction refreshactionlist saves this plug in s dialog settings any problems which arise are silently ignored protected void save dialog settings if dialog settings null return try i path path get state location or null if path null return string read write path path append fn dialog settings toos string dialog settings save read write path catch io exception e spec ed to ignore problems catch illegal state exception e spec ed to ignore problems savedialogsettings dialogsettings ipath getstatelocationornull readwritepath fn_dialog_settings toosstring dialogsettings readwritepath ioexception illegalstateexception saves this plug in s preference store any problems which arise are silently ignored see plugin save plugin preferences deprecated as of eclipse 2 0 preferences exist for all plug ins the equivalent of this method is code plugin save plugin preferences code this method now calls code save plugin preferences code and exists only for backwards compatibility protected void save preference store save plugin preferences savepluginpreferences savepluginpreferences savepluginpreferences savepreferencestore savepluginpreferences the code abstractui plugin code implementation of this code plugin code method does nothing subclasses may extend this method but must send super first p warning plug ins may not be started in the ui thread the code startup code method should not assume that its code runs in the ui thread otherwise swt thread exceptions may occur on startup deprecated in eclipse 3 0 code startup code has been replaced by link plugin start bundle context context implementations of code startup code should be changed to extend code start bundle context context code and call code super start context code instead of code super startup code like code super startup code code super stop context code must be called as the very first thing the code startup code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in in contrast the code start code method is always called public void startup throws core exception this method no longer does anything the code that used to be here in 2 1 has moved to start bundle context super startup abstractuiplugin bundlecontext bundlecontext coreexception bundlecontext the code abstractui plugin code implementation of this code plugin code method does nothing subclasses may extend this method but must send super first deprecated in eclipse 3 0 code shutdown code has been replaced by link plugin stop bundle context context implementations of code shutdown code should be changed to extend code stop bundle context context code and call code super stop context code instead of code super shutdown code unlike code super shutdown code code super stop context code must be called as the very b last b thing rather than as the very first thing the code shutdown code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in in contrast the code stop code method is always called public void shutdown throws core exception this method no longer does anything interesting the code that used to be here in 2 1 has moved to stop bundle context which is called regardless of whether the plug in being instantiated requires org eclipse core runtime compatibility super shutdown abstractuiplugin bundlecontext bundlecontext coreexception bundlecontext the code abstractui plugin code implementation of this code plugin code method refreshes the plug in actions subclasses may extend this method but must send super b first b inherit doc since 3 0 public void start bundle context context throws exception super start context final bundle context fc context should only attempt refresh plugin actions once the bundle has been fully started otherwise action delegates can be created while in the process of creating a triggering action delegate if ui events are processed during startup also if the start throws an exception the bundle will be shut down we don t want to have created any delegates if this happens see bug 63324 for more details bundle listener new bundle listener public void bundle changed bundle event event if event get bundle get bundle if event get type bundle event started we re getting notified that the bundle has been started make sure it s still active it may have been shut down between the time this event was queued and now if get bundle get state bundle active refresh plugin actions fc remove bundle listener this context add bundle listener bundle listener bundle listener is removed in stop bundle context abstractuiplugin inheritdoc bundlecontext bundlecontext refreshpluginactions bundlelistener bundlelistener bundlechanged bundleevent getbundle getbundle gettype bundleevent getbundle getstate refreshpluginactions removebundlelistener addbundlelistener bundlelistener bundlelistener bundlecontext bundle listener new bundle listener public void bundle changed bundle event event if event get bundle get bundle if event get type bundle event started we re getting notified that the bundle has been started make sure it s still active it may have been shut down between the time this event was queued and now if get bundle get state bundle active refresh plugin actions fc remove bundle listener this bundlelistener bundlelistener bundlechanged bundleevent getbundle getbundle gettype bundleevent getbundle getstate refreshpluginactions removebundlelistener the code abstractui plugin code implementation of this code plugin code method saves this plug in s preference and dialog stores and shuts down its image registry if they are in use subclasses may extend this method but must send super b last b a try finally statement should be used where necessary to ensure that code super shutdown code is always done inherit doc since 3 0 public void stop bundle context context throws exception try if bundle listener null context remove bundle listener bundle listener save dialog settings save preference store preference store null image registry null finally super stop context abstractuiplugin inheritdoc bundlecontext bundlelistener removebundlelistener bundlelistener savedialogsettings savepreferencestore preferencestore imageregistry creates and returns a new image descriptor for an image file located within the specified plug in p this is a convenience method that simply locates the image file in within the plug in no image registries are involved the path is relative to the root of the plug in and takes into account files coming from plug in fragments the path may include arg elements however the path must not have a leading or path separator clients should use a path like icons mysample gif rather than icons mysample gif or icons mysample gif p param plugin id the id of the plug in containing the image file code null code is returned if the plug in does not exist param image file path the relative path of the image file relative to the root of the plug in the path must be legal return an image descriptor or code null code if no image could be found since 3 0 public static image descriptor image descriptor from plugin string plugin id string image file path if plugin id null image file path null throw new illegal argument exception if the bundle is not ready then there is no image bundle bundle platform get bundle plugin id if bundle utility is ready bundle return null look for the image this will check both the plugin and fragment folders url full path string bundle utility find bundle image file path if full path string null try full path string new url image file path catch malformedurl exception e return null if full path string null return null return image descriptor create fromurl full path string pluginid imagefilepath imagedescriptor imagedescriptorfromplugin pluginid imagefilepath pluginid imagefilepath illegalargumentexception getbundle pluginid bundleutility isready fullpathstring bundleutility imagefilepath fullpathstring fullpathstring imagefilepath malformedurlexception fullpathstring imagedescriptor createfromurl fullpathstring for internal workbench use only returns the path to a location in the file system that can be used to persist restore state between workbench invocations if the location did not exist prior to this call it will be created returns code null code if no such location is available return path to a location in the file system where this plug in can persist data between sessions or code null code if no such location is available since 3 1 private i path get state location or null try return get state location catch illegal state exception e this occurs if data none is explicitly specified so ignore this silently is this ok see bug 85071 return null ipath getstatelocationornull getstatelocation illegalstateexception creates an abstract ui plug in runtime object for the given plug in descriptor p note that instances of plug in runtime classes are automatically created by the platform in the course of plug in activation p param descriptor the plug in descriptor see plugin plugin org eclipse core runtime i plugin descriptor descriptor deprecated in eclipse 3 0 this constructor has been replaced by link abstractui plugin implementations of code my plugin i plugin descriptor descriptor code should be changed to code my plugin code and call code super code instead of code super descriptor code the code my plugin i plugin descriptor descriptor code constructor is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in or as in this case subclasses which might public abstractui plugin i plugin descriptor descriptor super descriptor iplugindescriptor abstractuiplugin myplugin iplugindescriptor myplugin myplugin iplugindescriptor abstractuiplugin iplugindescriptor creates an abstract ui plug in runtime object p plug in runtime classes are code bundle activators code and so must have an default constructor this method is called by the runtime when the associated bundle is being activated p for more details see code plugin code s default constructor see plugin plugin since 3 0 public abstractui plugin super bundleactivators abstractuiplugin returns a new image registry for this plugin in the registry will be used to manage images which are frequently used by the plugin in p the default implementation of this method creates an empty registry subclasses may override this method if needed p return image registry the resulting registry see get image registry protected image registry create image registry if we are in the ui thread use that if display get current null return new image registry display get current if platformui is workbench running return new image registry platformui get workbench get display invalid thread access if it is not the ui thread and the workbench is not created throw new swt error swt error thread invalid access imageregistry getimageregistry imageregistry createimageregistry getcurrent imageregistry getcurrent isworkbenchrunning imageregistry getworkbench getdisplay swterror error_thread_invalid_access returns the dialog settings for this ui plug in the dialog settings is used to hold persistent state data for the various wizards and dialogs of this plug in in the context of a workbench p if an error occurs reading the dialog store an empty one is quietly created and returned p p subclasses may override this method but are not expected to p return the dialog settings public i dialog settings get dialog settings if dialog settings null load dialog settings return dialog settings idialogsettings getdialogsettings dialogsettings loaddialogsettings dialogsettings returns the image registry for this ui plug in p the image registry contains the images used by this plug in that are very frequently used and so need to be globally shared within the plug in since many o ss have a severe limit on the number of images that can be in memory at any given time a plug in should only keep a small number of images in their registry p subclasses should reimplement code initialize image registry code if they have custom graphic images to load p p subclasses may override this method but are not expected to p return the image registry public image registry get image registry if image registry null image registry create image registry initialize image registry image registry return image registry oss initializeimageregistry imageregistry getimageregistry imageregistry imageregistry createimageregistry initializeimageregistry imageregistry imageregistry returns the preference store for this ui plug in this preference store is used to hold persistent settings for this plug in in the context of a workbench some of these settings will be user controlled whereas others may be internal setting that are never exposed to the user p if an error occurs reading the preference store an empty preference store is quietly created initialized with defaults and returned p p strong note strong as of eclipse 3 1 this method is no longer referring to the core runtime compatibility layer and so plug ins relying on plugin initialize default preferences will have to access the compatibility layer themselves p return the preference store public i preference store get preference store create the preference store lazily if preference store null preference store new scoped preference store new instance scope get bundle get symbolic name return preference store initializedefaultpreferences ipreferencestore getpreferencestore preferencestore preferencestore scopedpreferencestore instancescope getbundle getsymbolicname preferencestore returns the platform ui workbench p this method exists as a convenience for plugin implementors the workbench can also be accessed by invoking code platformui get workbench code p return i workbench the workbench for this plug in public i workbench get workbench return platformui get workbench getworkbench iworkbench iworkbench getworkbench getworkbench initializes a preference store with default preference values for this plug in p this method is called after the preference store is initially loaded default values are never stored in preference stores p p the default implementation of this method does nothing subclasses should reimplement this method if the plug in has any preferences p p a subclass may reimplement this method to set default values for the preference store using j face api this is the older way of initializing default values if this method is reimplemented do not override code initialize default plugin preferences code p param store the preference store to fill deprecated this is only called if the runtime compatibility layer is present see link initialize default plugin preferences protected void initialize default preferences i preference store store spec ed to do nothing jface initializedefaultpluginpreferences initializedefaultpluginpreferences initializedefaultpreferences ipreferencestore the code abstractui plugin code implementation of this code plugin code method forwards to code initialize default preferences i preference store code p a subclass may reimplement this method to set default values for the core runtime preference store in the standard way this is the recommended way to do this the older code initialize default preferences i preference store code method serves a similar purpose if this method is reimplemented do not send super and do not override code initialize default preferences i preference store code p deprecated this is only called if the runtime compatibility layer is present see the deprecated comment in link plugin initialize default plugin preferences see initialize default preferences since 2 0 protected void initialize default plugin preferences n b by the time this method is called the plug in has a core runtime preference store no default values call load preference store only for backwards compatibility with eclipse 1 0 load preference store call initialize default preferences only for backwards compatibility with eclipse 1 0 initialize default preferences get preference store abstractuiplugin initializedefaultpreferences ipreferencestore initializedefaultpreferences ipreferencestore initializedefaultpreferences ipreferencestore initializedefaultpluginpreferences initializedefaultpreferences initializedefaultpluginpreferences loadpreferencestore loadpreferencestore initializedefaultpreferences initializedefaultpreferences getpreferencestore initializes an image registry with images which are frequently used by the plugin p the image registry contains the images used by this plug in that are very frequently used and so need to be globally shared within the plug in since many o ss have a severe limit on the number of images that can be in memory at any given time each plug in should only keep a small number of images in its registry p p implementors should create a j face image descriptor for each frequently used image the descriptors describe how to create find the image should it be needed the image described by the descriptor is not actually allocated until someone retrieves it p p subclasses may override this method to fill the image registry p param reg the registry to initalize see get image registry protected void initialize image registry image registry reg spec ed to do nothing oss jface getimageregistry initializeimageregistry imageregistry loads the dialog settings for this plug in the default implementation first looks for a standard named file in the plug in s read write state area if no such file exists the plug in s install directory is checked to see if one was installed with some default settings if no file is found in either place a new empty dialog settings is created if a problem occurs an empty settings is silently used p this framework method may be overridden although this is typically unnecessary p protected void load dialog settings dialog settings new dialog settings workbench non nls 1 bug 69387 the instance area should not be created in the call to get state location if data none or data no default was used i path data location get state location or null if data location null try r w state area in the local file system string read write path data location append fn dialog settings toos string file settings file new file read write path if settings file exists try dialog settings load read write path catch io exception e load failed so ensure we have an empty settings dialog settings new dialog settings workbench non nls 1 return otherwise look for bundle specific dialog settings url dsurl bundle utility find get bundle fn dialog settings if dsurl null return input stream is null try is dsurl open stream buffered reader reader new buffered reader new input stream reader is utf 8 non nls 1 dialog settings load reader catch io exception e load failed so ensure we have an empty settings dialog settings new dialog settings workbench non nls 1 finally try if is null is close catch io exception e do nothing loaddialogsettings dialogsettings dialogsettings getstatelocation nodefault ipath datalocation getstatelocationornull datalocation readwritepath datalocation fn_dialog_settings toosstring settingsfile readwritepath settingsfile dialogsettings readwritepath ioexception dialogsettings dialogsettings bundleutility getbundle fn_dialog_settings inputstream openstream bufferedreader bufferedreader inputstreamreader dialogsettings ioexception dialogsettings dialogsettings ioexception loads the preference store for this plug in the default implementation looks for a standard named file in the plug in s read write state area if no file is found or a problem occurs a new empty preference store is silently created p this framework method may be overridden although this is typically unnecessary p deprecated as of eclipse 2 0 a basic preference store exists for all plug ins this method now exists only for backwards compatibility it is called as the plug in s preference store is being initialized the plug ins preferences are loaded from the file regardless of what this method does protected void load preference store do nothing by default loadpreferencestore refreshes the actions for the plugin this method is called from code startup code p this framework method may be overridden although this is typically unnecessary p protected void refresh plugin actions if the workbench is not started yet or is no longer running do nothing if platformui is workbench running return startup is not guaranteed to be called in the ui thread but refresh plugin actions must run in the ui thread so use async exec see bug 6623 for more details display get default async exec new runnable public void run w win plugin action refresh action list refreshpluginactions isworkbenchrunning refreshpluginactions asyncexec getdefault asyncexec wwinpluginaction refreshactionlist so use async exec see bug 6623 for more details display get default async exec new runnable public void run w win plugin action refresh action list asyncexec getdefault asyncexec wwinpluginaction refreshactionlist saves this plug in s dialog settings any problems which arise are silently ignored protected void save dialog settings if dialog settings null return try i path path get state location or null if path null return string read write path path append fn dialog settings toos string dialog settings save read write path catch io exception e spec ed to ignore problems catch illegal state exception e spec ed to ignore problems savedialogsettings dialogsettings ipath getstatelocationornull readwritepath fn_dialog_settings toosstring dialogsettings readwritepath ioexception illegalstateexception saves this plug in s preference store any problems which arise are silently ignored see plugin save plugin preferences deprecated as of eclipse 2 0 preferences exist for all plug ins the equivalent of this method is code plugin save plugin preferences code this method now calls code save plugin preferences code and exists only for backwards compatibility protected void save preference store save plugin preferences savepluginpreferences savepluginpreferences savepluginpreferences savepreferencestore savepluginpreferences the code abstractui plugin code implementation of this code plugin code method does nothing subclasses may extend this method but must send super first p warning plug ins may not be started in the ui thread the code startup code method should not assume that its code runs in the ui thread otherwise swt thread exceptions may occur on startup deprecated in eclipse 3 0 code startup code has been replaced by link plugin start bundle context context implementations of code startup code should be changed to extend code start bundle context context code and call code super start context code instead of code super startup code like code super startup code code super stop context code must be called as the very first thing the code startup code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in in contrast the code start code method is always called public void startup throws core exception this method no longer does anything the code that used to be here in 2 1 has moved to start bundle context super startup abstractuiplugin bundlecontext bundlecontext coreexception bundlecontext the code abstractui plugin code implementation of this code plugin code method does nothing subclasses may extend this method but must send super first deprecated in eclipse 3 0 code shutdown code has been replaced by link plugin stop bundle context context implementations of code shutdown code should be changed to extend code stop bundle context context code and call code super stop context code instead of code super shutdown code unlike code super shutdown code code super stop context code must be called as the very b last b thing rather than as the very first thing the code shutdown code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in in contrast the code stop code method is always called public void shutdown throws core exception this method no longer does anything interesting the code that used to be here in 2 1 has moved to stop bundle context which is called regardless of whether the plug in being instantiated requires org eclipse core runtime compatibility super shutdown abstractuiplugin bundlecontext bundlecontext coreexception bundlecontext the code abstractui plugin code implementation of this code plugin code method refreshes the plug in actions subclasses may extend this method but must send super b first b inherit doc since 3 0 public void start bundle context context throws exception super start context final bundle context fc context should only attempt refresh plugin actions once the bundle has been fully started otherwise action delegates can be created while in the process of creating a triggering action delegate if ui events are processed during startup also if the start throws an exception the bundle will be shut down we don t want to have created any delegates if this happens see bug 63324 for more details bundle listener new bundle listener public void bundle changed bundle event event if event get bundle get bundle if event get type bundle event started we re getting notified that the bundle has been started make sure it s still active it may have been shut down between the time this event was queued and now if get bundle get state bundle active refresh plugin actions fc remove bundle listener this context add bundle listener bundle listener bundle listener is removed in stop bundle context abstractuiplugin inheritdoc bundlecontext bundlecontext refreshpluginactions bundlelistener bundlelistener bundlechanged bundleevent getbundle getbundle gettype bundleevent getbundle getstate refreshpluginactions removebundlelistener addbundlelistener bundlelistener bundlelistener bundlecontext bundle listener new bundle listener public void bundle changed bundle event event if event get bundle get bundle if event get type bundle event started we re getting notified that the bundle has been started make sure it s still active it may have been shut down between the time this event was queued and now if get bundle get state bundle active refresh plugin actions fc remove bundle listener this bundlelistener bundlelistener bundlechanged bundleevent getbundle getbundle gettype bundleevent getbundle getstate refreshpluginactions removebundlelistener the code abstractui plugin code implementation of this code plugin code method saves this plug in s preference and dialog stores and shuts down its image registry if they are in use subclasses may extend this method but must send super b last b a try finally statement should be used where necessary to ensure that code super shutdown code is always done inherit doc since 3 0 public void stop bundle context context throws exception try if bundle listener null context remove bundle listener bundle listener save dialog settings save preference store preference store null image registry null finally super stop context abstractuiplugin inheritdoc bundlecontext bundlelistener removebundlelistener bundlelistener savedialogsettings savepreferencestore preferencestore imageregistry creates and returns a new image descriptor for an image file located within the specified plug in p this is a convenience method that simply locates the image file in within the plug in no image registries are involved the path is relative to the root of the plug in and takes into account files coming from plug in fragments the path may include arg elements however the path must not have a leading or path separator clients should use a path like icons mysample gif rather than icons mysample gif or icons mysample gif p param plugin id the id of the plug in containing the image file code null code is returned if the plug in does not exist param image file path the relative path of the image file relative to the root of the plug in the path must be legal return an image descriptor or code null code if no image could be found since 3 0 public static image descriptor image descriptor from plugin string plugin id string image file path if plugin id null image file path null throw new illegal argument exception if the bundle is not ready then there is no image bundle bundle platform get bundle plugin id if bundle utility is ready bundle return null look for the image this will check both the plugin and fragment folders url full path string bundle utility find bundle image file path if full path string null try full path string new url image file path catch malformedurl exception e return null if full path string null return null return image descriptor create fromurl full path string pluginid imagefilepath imagedescriptor imagedescriptorfromplugin pluginid imagefilepath pluginid imagefilepath illegalargumentexception getbundle pluginid bundleutility isready fullpathstring bundleutility imagefilepath fullpathstring fullpathstring imagefilepath malformedurlexception fullpathstring imagedescriptor createfromurl fullpathstring for internal workbench use only returns the path to a location in the file system that can be used to persist restore state between workbench invocations if the location did not exist prior to this call it will be created returns code null code if no such location is available return path to a location in the file system where this plug in can persist data between sessions or code null code if no such location is available since 3 1 private i path get state location or null try return get state location catch illegal state exception e this occurs if data none is explicitly specified so ignore this silently is this ok see bug 85071 return null ipath getstatelocationornull getstatelocation illegalstateexception creates an abstract ui plug in runtime object for the given plug in descriptor p note that instances of plug in runtime classes are automatically created by the platform in the course of plug in activation p param descriptor the plug in descriptor see plugin plugin org eclipse core runtime i plugin descriptor descriptor deprecated in eclipse 3 0 this constructor has been replaced by link abstractui plugin implementations of code my plugin i plugin descriptor descriptor code should be changed to code my plugin code and call code super code instead of code super descriptor code the code my plugin i plugin descriptor descriptor code constructor is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in or as in this case subclasses which might public abstractui plugin i plugin descriptor descriptor super descriptor iplugindescriptor abstractuiplugin myplugin iplugindescriptor myplugin myplugin iplugindescriptor abstractuiplugin iplugindescriptor creates an abstract ui plug in runtime object p plug in runtime classes are code bundle activators code and so must have an default constructor this method is called by the runtime when the associated bundle is being activated p for more details see code plugin code s default constructor see plugin plugin since 3 0 public abstractui plugin super bundleactivators abstractuiplugin returns a new image registry for this plugin in the registry will be used to manage images which are frequently used by the plugin in p the default implementation of this method creates an empty registry subclasses may override this method if needed p return image registry the resulting registry see get image registry protected image registry create image registry if we are in the ui thread use that if display get current null return new image registry display get current if platformui is workbench running return new image registry platformui get workbench get display invalid thread access if it is not the ui thread and the workbench is not created throw new swt error swt error thread invalid access imageregistry getimageregistry imageregistry createimageregistry getcurrent imageregistry getcurrent isworkbenchrunning imageregistry getworkbench getdisplay swterror error_thread_invalid_access returns the dialog settings for this ui plug in the dialog settings is used to hold persistent state data for the various wizards and dialogs of this plug in in the context of a workbench p if an error occurs reading the dialog store an empty one is quietly created and returned p p subclasses may override this method but are not expected to p return the dialog settings public i dialog settings get dialog settings if dialog settings null load dialog settings return dialog settings idialogsettings getdialogsettings dialogsettings loaddialogsettings dialogsettings returns the image registry for this ui plug in p the image registry contains the images used by this plug in that are very frequently used and so need to be globally shared within the plug in since many o ss have a severe limit on the number of images that can be in memory at any given time a plug in should only keep a small number of images in their registry p subclasses should reimplement code initialize image registry code if they have custom graphic images to load p p subclasses may override this method but are not expected to p return the image registry public image registry get image registry if image registry null image registry create image registry initialize image registry image registry return image registry oss initializeimageregistry imageregistry getimageregistry imageregistry imageregistry createimageregistry initializeimageregistry imageregistry imageregistry returns the preference store for this ui plug in this preference store is used to hold persistent settings for this plug in in the context of a workbench some of these settings will be user controlled whereas others may be internal setting that are never exposed to the user p if an error occurs reading the preference store an empty preference store is quietly created initialized with defaults and returned p p strong note strong as of eclipse 3 1 this method is no longer referring to the core runtime compatibility layer and so plug ins relying on plugin initialize default preferences will have to access the compatibility layer themselves p return the preference store public i preference store get preference store create the preference store lazily if preference store null preference store new scoped preference store new instance scope get bundle get symbolic name return preference store initializedefaultpreferences ipreferencestore getpreferencestore preferencestore preferencestore scopedpreferencestore instancescope getbundle getsymbolicname preferencestore returns the platform ui workbench p this method exists as a convenience for plugin implementors the workbench can also be accessed by invoking code platformui get workbench code p return i workbench the workbench for this plug in public i workbench get workbench return platformui get workbench getworkbench iworkbench iworkbench getworkbench getworkbench initializes a preference store with default preference values for this plug in p this method is called after the preference store is initially loaded default values are never stored in preference stores p p the default implementation of this method does nothing subclasses should reimplement this method if the plug in has any preferences p p a subclass may reimplement this method to set default values for the preference store using j face api this is the older way of initializing default values if this method is reimplemented do not override code initialize default plugin preferences code p param store the preference store to fill deprecated this is only called if the runtime compatibility layer is present see link initialize default plugin preferences protected void initialize default preferences i preference store store spec ed to do nothing jface initializedefaultpluginpreferences initializedefaultpluginpreferences initializedefaultpreferences ipreferencestore the code abstractui plugin code implementation of this code plugin code method forwards to code initialize default preferences i preference store code p a subclass may reimplement this method to set default values for the core runtime preference store in the standard way this is the recommended way to do this the older code initialize default preferences i preference store code method serves a similar purpose if this method is reimplemented do not send super and do not override code initialize default preferences i preference store code p deprecated this is only called if the runtime compatibility layer is present see the deprecated comment in link plugin initialize default plugin preferences see initialize default preferences since 2 0 protected void initialize default plugin preferences n b by the time this method is called the plug in has a core runtime preference store no default values call load preference store only for backwards compatibility with eclipse 1 0 load preference store call initialize default preferences only for backwards compatibility with eclipse 1 0 initialize default preferences get preference store abstractuiplugin initializedefaultpreferences ipreferencestore initializedefaultpreferences ipreferencestore initializedefaultpreferences ipreferencestore initializedefaultpluginpreferences initializedefaultpreferences initializedefaultpluginpreferences loadpreferencestore loadpreferencestore initializedefaultpreferences initializedefaultpreferences getpreferencestore initializes an image registry with images which are frequently used by the plugin p the image registry contains the images used by this plug in that are very frequently used and so need to be globally shared within the plug in since many o ss have a severe limit on the number of images that can be in memory at any given time each plug in should only keep a small number of images in its registry p p implementors should create a j face image descriptor for each frequently used image the descriptors describe how to create find the image should it be needed the image described by the descriptor is not actually allocated until someone retrieves it p p subclasses may override this method to fill the image registry p param reg the registry to initalize see get image registry protected void initialize image registry image registry reg spec ed to do nothing oss jface getimageregistry initializeimageregistry imageregistry loads the dialog settings for this plug in the default implementation first looks for a standard named file in the plug in s read write state area if no such file exists the plug in s install directory is checked to see if one was installed with some default settings if no file is found in either place a new empty dialog settings is created if a problem occurs an empty settings is silently used p this framework method may be overridden although this is typically unnecessary p protected void load dialog settings dialog settings new dialog settings workbench non nls 1 bug 69387 the instance area should not be created in the call to get state location if data none or data no default was used i path data location get state location or null if data location null try r w state area in the local file system string read write path data location append fn dialog settings toos string file settings file new file read write path if settings file exists try dialog settings load read write path catch io exception e load failed so ensure we have an empty settings dialog settings new dialog settings workbench non nls 1 return otherwise look for bundle specific dialog settings url dsurl bundle utility find get bundle fn dialog settings if dsurl null return input stream is null try is dsurl open stream buffered reader reader new buffered reader new input stream reader is utf 8 non nls 1 dialog settings load reader catch io exception e load failed so ensure we have an empty settings dialog settings new dialog settings workbench non nls 1 finally try if is null is close catch io exception e do nothing loaddialogsettings dialogsettings dialogsettings getstatelocation nodefault ipath datalocation getstatelocationornull datalocation readwritepath datalocation fn_dialog_settings toosstring settingsfile readwritepath settingsfile dialogsettings readwritepath ioexception dialogsettings dialogsettings bundleutility getbundle fn_dialog_settings inputstream openstream bufferedreader bufferedreader inputstreamreader dialogsettings ioexception dialogsettings dialogsettings ioexception loads the preference store for this plug in the default implementation looks for a standard named file in the plug in s read write state area if no file is found or a problem occurs a new empty preference store is silently created p this framework method may be overridden although this is typically unnecessary p deprecated as of eclipse 2 0 a basic preference store exists for all plug ins this method now exists only for backwards compatibility it is called as the plug in s preference store is being initialized the plug ins preferences are loaded from the file regardless of what this method does protected void load preference store do nothing by default loadpreferencestore refreshes the actions for the plugin this method is called from code startup code p this framework method may be overridden although this is typically unnecessary p protected void refresh plugin actions if the workbench is not started yet or is no longer running do nothing if platformui is workbench running return startup is not guaranteed to be called in the ui thread but refresh plugin actions must run in the ui thread so use async exec see bug 6623 for more details display get default async exec new runnable public void run w win plugin action refresh action list refreshpluginactions isworkbenchrunning refreshpluginactions asyncexec getdefault asyncexec wwinpluginaction refreshactionlist so use async exec see bug 6623 for more details display get default async exec new runnable public void run w win plugin action refresh action list asyncexec getdefault asyncexec wwinpluginaction refreshactionlist saves this plug in s dialog settings any problems which arise are silently ignored protected void save dialog settings if dialog settings null return try i path path get state location or null if path null return string read write path path append fn dialog settings toos string dialog settings save read write path catch io exception e spec ed to ignore problems catch illegal state exception e spec ed to ignore problems savedialogsettings dialogsettings ipath getstatelocationornull readwritepath fn_dialog_settings toosstring dialogsettings readwritepath ioexception illegalstateexception saves this plug in s preference store any problems which arise are silently ignored see plugin save plugin preferences deprecated as of eclipse 2 0 preferences exist for all plug ins the equivalent of this method is code plugin save plugin preferences code this method now calls code save plugin preferences code and exists only for backwards compatibility protected void save preference store save plugin preferences savepluginpreferences savepluginpreferences savepluginpreferences savepreferencestore savepluginpreferences the code abstractui plugin code implementation of this code plugin code method does nothing subclasses may extend this method but must send super first p warning plug ins may not be started in the ui thread the code startup code method should not assume that its code runs in the ui thread otherwise swt thread exceptions may occur on startup deprecated in eclipse 3 0 code startup code has been replaced by link plugin start bundle context context implementations of code startup code should be changed to extend code start bundle context context code and call code super start context code instead of code super startup code like code super startup code code super stop context code must be called as the very first thing the code startup code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in in contrast the code start code method is always called public void startup throws core exception this method no longer does anything the code that used to be here in 2 1 has moved to start bundle context super startup abstractuiplugin bundlecontext bundlecontext coreexception bundlecontext the code abstractui plugin code implementation of this code plugin code method does nothing subclasses may extend this method but must send super first deprecated in eclipse 3 0 code shutdown code has been replaced by link plugin stop bundle context context implementations of code shutdown code should be changed to extend code stop bundle context context code and call code super stop context code instead of code super shutdown code unlike code super shutdown code code super stop context code must be called as the very b last b thing rather than as the very first thing the code shutdown code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in in contrast the code stop code method is always called public void shutdown throws core exception this method no longer does anything interesting the code that used to be here in 2 1 has moved to stop bundle context which is called regardless of whether the plug in being instantiated requires org eclipse core runtime compatibility super shutdown abstractuiplugin bundlecontext bundlecontext coreexception bundlecontext the code abstractui plugin code implementation of this code plugin code method refreshes the plug in actions subclasses may extend this method but must send super b first b inherit doc since 3 0 public void start bundle context context throws exception super start context final bundle context fc context should only attempt refresh plugin actions once the bundle has been fully started otherwise action delegates can be created while in the process of creating a triggering action delegate if ui events are processed during startup also if the start throws an exception the bundle will be shut down we don t want to have created any delegates if this happens see bug 63324 for more details bundle listener new bundle listener public void bundle changed bundle event event if event get bundle get bundle if event get type bundle event started we re getting notified that the bundle has been started make sure it s still active it may have been shut down between the time this event was queued and now if get bundle get state bundle active refresh plugin actions fc remove bundle listener this context add bundle listener bundle listener bundle listener is removed in stop bundle context abstractuiplugin inheritdoc bundlecontext bundlecontext refreshpluginactions bundlelistener bundlelistener bundlechanged bundleevent getbundle getbundle gettype bundleevent getbundle getstate refreshpluginactions removebundlelistener addbundlelistener bundlelistener bundlelistener bundlecontext bundle listener new bundle listener public void bundle changed bundle event event if event get bundle get bundle if event get type bundle event started we re getting notified that the bundle has been started make sure it s still active it may have been shut down between the time this event was queued and now if get bundle get state bundle active refresh plugin actions fc remove bundle listener this bundlelistener bundlelistener bundlechanged bundleevent getbundle getbundle gettype bundleevent getbundle getstate refreshpluginactions removebundlelistener the code abstractui plugin code implementation of this code plugin code method saves this plug in s preference and dialog stores and shuts down its image registry if they are in use subclasses may extend this method but must send super b last b a try finally statement should be used where necessary to ensure that code super shutdown code is always done inherit doc since 3 0 public void stop bundle context context throws exception try if bundle listener null context remove bundle listener bundle listener save dialog settings save preference store preference store null image registry null finally super stop context abstractuiplugin inheritdoc bundlecontext bundlelistener removebundlelistener bundlelistener savedialogsettings savepreferencestore preferencestore imageregistry creates and returns a new image descriptor for an image file located within the specified plug in p this is a convenience method that simply locates the image file in within the plug in no image registries are involved the path is relative to the root of the plug in and takes into account files coming from plug in fragments the path may include arg elements however the path must not have a leading or path separator clients should use a path like icons mysample gif rather than icons mysample gif or icons mysample gif p param plugin id the id of the plug in containing the image file code null code is returned if the plug in does not exist param image file path the relative path of the image file relative to the root of the plug in the path must be legal return an image descriptor or code null code if no image could be found since 3 0 public static image descriptor image descriptor from plugin string plugin id string image file path if plugin id null image file path null throw new illegal argument exception if the bundle is not ready then there is no image bundle bundle platform get bundle plugin id if bundle utility is ready bundle return null look for the image this will check both the plugin and fragment folders url full path string bundle utility find bundle image file path if full path string null try full path string new url image file path catch malformedurl exception e return null if full path string null return null return image descriptor create fromurl full path string pluginid imagefilepath imagedescriptor imagedescriptorfromplugin pluginid imagefilepath pluginid imagefilepath illegalargumentexception getbundle pluginid bundleutility isready fullpathstring bundleutility imagefilepath fullpathstring fullpathstring imagefilepath malformedurlexception fullpathstring imagedescriptor createfromurl fullpathstring for internal workbench use only returns the path to a location in the file system that can be used to persist restore state between workbench invocations if the location did not exist prior to this call it will be created returns code null code if no such location is available return path to a location in the file system where this plug in can persist data between sessions or code null code if no such location is available since 3 1 private i path get state location or null try return get state location catch illegal state exception e this occurs if data none is explicitly specified so ignore this silently is this ok see bug 85071 return null ipath getstatelocationornull getstatelocation illegalstateexception creates an abstract ui plug in runtime object for the given plug in descriptor p note that instances of plug in runtime classes are automatically created by the platform in the course of plug in activation p param descriptor the plug in descriptor see plugin plugin org eclipse core runtime i plugin descriptor descriptor deprecated in eclipse 3 0 this constructor has been replaced by link abstractui plugin implementations of code my plugin i plugin descriptor descriptor code should be changed to code my plugin code and call code super code instead of code super descriptor code the code my plugin i plugin descriptor descriptor code constructor is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in or as in this case subclasses which might public abstractui plugin i plugin descriptor descriptor super descriptor iplugindescriptor abstractuiplugin myplugin iplugindescriptor myplugin myplugin iplugindescriptor abstractuiplugin iplugindescriptor creates an abstract ui plug in runtime object p plug in runtime classes are code bundle activators code and so must have an default constructor this method is called by the runtime when the associated bundle is being activated p for more details see code plugin code s default constructor see plugin plugin since 3 0 public abstractui plugin super bundleactivators abstractuiplugin returns a new image registry for this plugin in the registry will be used to manage images which are frequently used by the plugin in p the default implementation of this method creates an empty registry subclasses may override this method if needed p return image registry the resulting registry see get image registry protected image registry create image registry if we are in the ui thread use that if display get current null return new image registry display get current if platformui is workbench running return new image registry platformui get workbench get display invalid thread access if it is not the ui thread and the workbench is not created throw new swt error swt error thread invalid access imageregistry getimageregistry imageregistry createimageregistry getcurrent imageregistry getcurrent isworkbenchrunning imageregistry getworkbench getdisplay swterror error_thread_invalid_access returns the dialog settings for this ui plug in the dialog settings is used to hold persistent state data for the various wizards and dialogs of this plug in in the context of a workbench p if an error occurs reading the dialog store an empty one is quietly created and returned p p subclasses may override this method but are not expected to p return the dialog settings public i dialog settings get dialog settings if dialog settings null load dialog settings return dialog settings idialogsettings getdialogsettings dialogsettings loaddialogsettings dialogsettings returns the image registry for this ui plug in p the image registry contains the images used by this plug in that are very frequently used and so need to be globally shared within the plug in since many o ss have a severe limit on the number of images that can be in memory at any given time a plug in should only keep a small number of images in their registry p subclasses should reimplement code initialize image registry code if they have custom graphic images to load p p subclasses may override this method but are not expected to p return the image registry public image registry get image registry if image registry null image registry create image registry initialize image registry image registry return image registry oss initializeimageregistry imageregistry getimageregistry imageregistry imageregistry createimageregistry initializeimageregistry imageregistry imageregistry returns the preference store for this ui plug in this preference store is used to hold persistent settings for this plug in in the context of a workbench some of these settings will be user controlled whereas others may be internal setting that are never exposed to the user p if an error occurs reading the preference store an empty preference store is quietly created initialized with defaults and returned p p strong note strong as of eclipse 3 1 this method is no longer referring to the core runtime compatibility layer and so plug ins relying on plugin initialize default preferences will have to access the compatibility layer themselves p return the preference store public i preference store get preference store create the preference store lazily if preference store null preference store new scoped preference store new instance scope get bundle get symbolic name return preference store initializedefaultpreferences ipreferencestore getpreferencestore preferencestore preferencestore scopedpreferencestore instancescope getbundle getsymbolicname preferencestore returns the platform ui workbench p this method exists as a convenience for plugin implementors the workbench can also be accessed by invoking code platformui get workbench code p return i workbench the workbench for this plug in public i workbench get workbench return platformui get workbench getworkbench iworkbench iworkbench getworkbench getworkbench initializes a preference store with default preference values for this plug in p this method is called after the preference store is initially loaded default values are never stored in preference stores p p the default implementation of this method does nothing subclasses should reimplement this method if the plug in has any preferences p p a subclass may reimplement this method to set default values for the preference store using j face api this is the older way of initializing default values if this method is reimplemented do not override code initialize default plugin preferences code p param store the preference store to fill deprecated this is only called if the runtime compatibility layer is present see link initialize default plugin preferences protected void initialize default preferences i preference store store spec ed to do nothing jface initializedefaultpluginpreferences initializedefaultpluginpreferences initializedefaultpreferences ipreferencestore the code abstractui plugin code implementation of this code plugin code method forwards to code initialize default preferences i preference store code p a subclass may reimplement this method to set default values for the core runtime preference store in the standard way this is the recommended way to do this the older code initialize default preferences i preference store code method serves a similar purpose if this method is reimplemented do not send super and do not override code initialize default preferences i preference store code p deprecated this is only called if the runtime compatibility layer is present see the deprecated comment in link plugin initialize default plugin preferences see initialize default preferences since 2 0 protected void initialize default plugin preferences n b by the time this method is called the plug in has a core runtime preference store no default values call load preference store only for backwards compatibility with eclipse 1 0 load preference store call initialize default preferences only for backwards compatibility with eclipse 1 0 initialize default preferences get preference store abstractuiplugin initializedefaultpreferences ipreferencestore initializedefaultpreferences ipreferencestore initializedefaultpreferences ipreferencestore initializedefaultpluginpreferences initializedefaultpreferences initializedefaultpluginpreferences loadpreferencestore loadpreferencestore initializedefaultpreferences initializedefaultpreferences getpreferencestore initializes an image registry with images which are frequently used by the plugin p the image registry contains the images used by this plug in that are very frequently used and so need to be globally shared within the plug in since many o ss have a severe limit on the number of images that can be in memory at any given time each plug in should only keep a small number of images in its registry p p implementors should create a j face image descriptor for each frequently used image the descriptors describe how to create find the image should it be needed the image described by the descriptor is not actually allocated until someone retrieves it p p subclasses may override this method to fill the image registry p param reg the registry to initalize see get image registry protected void initialize image registry image registry reg spec ed to do nothing oss jface getimageregistry initializeimageregistry imageregistry loads the dialog settings for this plug in the default implementation first looks for a standard named file in the plug in s read write state area if no such file exists the plug in s install directory is checked to see if one was installed with some default settings if no file is found in either place a new empty dialog settings is created if a problem occurs an empty settings is silently used p this framework method may be overridden although this is typically unnecessary p protected void load dialog settings dialog settings new dialog settings workbench non nls 1 bug 69387 the instance area should not be created in the call to get state location if data none or data no default was used i path data location get state location or null if data location null try r w state area in the local file system string read write path data location append fn dialog settings toos string file settings file new file read write path if settings file exists try dialog settings load read write path catch io exception e load failed so ensure we have an empty settings dialog settings new dialog settings workbench non nls 1 return otherwise look for bundle specific dialog settings url dsurl bundle utility find get bundle fn dialog settings if dsurl null return input stream is null try is dsurl open stream buffered reader reader new buffered reader new input stream reader is utf 8 non nls 1 dialog settings load reader catch io exception e load failed so ensure we have an empty settings dialog settings new dialog settings workbench non nls 1 finally try if is null is close catch io exception e do nothing loaddialogsettings dialogsettings dialogsettings getstatelocation nodefault ipath datalocation getstatelocationornull datalocation readwritepath datalocation fn_dialog_settings toosstring settingsfile readwritepath settingsfile dialogsettings readwritepath ioexception dialogsettings dialogsettings bundleutility getbundle fn_dialog_settings inputstream openstream bufferedreader bufferedreader inputstreamreader dialogsettings ioexception dialogsettings dialogsettings ioexception loads the preference store for this plug in the default implementation looks for a standard named file in the plug in s read write state area if no file is found or a problem occurs a new empty preference store is silently created p this framework method may be overridden although this is typically unnecessary p deprecated as of eclipse 2 0 a basic preference store exists for all plug ins this method now exists only for backwards compatibility it is called as the plug in s preference store is being initialized the plug ins preferences are loaded from the file regardless of what this method does protected void load preference store do nothing by default loadpreferencestore refreshes the actions for the plugin this method is called from code startup code p this framework method may be overridden although this is typically unnecessary p protected void refresh plugin actions if the workbench is not started yet or is no longer running do nothing if platformui is workbench running return startup is not guaranteed to be called in the ui thread but refresh plugin actions must run in the ui thread so use async exec see bug 6623 for more details display get default async exec new runnable public void run w win plugin action refresh action list refreshpluginactions isworkbenchrunning refreshpluginactions asyncexec getdefault asyncexec wwinpluginaction refreshactionlist so use async exec see bug 6623 for more details display get default async exec new runnable public void run w win plugin action refresh action list asyncexec getdefault asyncexec wwinpluginaction refreshactionlist saves this plug in s dialog settings any problems which arise are silently ignored protected void save dialog settings if dialog settings null return try i path path get state location or null if path null return string read write path path append fn dialog settings toos string dialog settings save read write path catch io exception e spec ed to ignore problems catch illegal state exception e spec ed to ignore problems savedialogsettings dialogsettings ipath getstatelocationornull readwritepath fn_dialog_settings toosstring dialogsettings readwritepath ioexception illegalstateexception saves this plug in s preference store any problems which arise are silently ignored see plugin save plugin preferences deprecated as of eclipse 2 0 preferences exist for all plug ins the equivalent of this method is code plugin save plugin preferences code this method now calls code save plugin preferences code and exists only for backwards compatibility protected void save preference store save plugin preferences savepluginpreferences savepluginpreferences savepluginpreferences savepreferencestore savepluginpreferences the code abstractui plugin code implementation of this code plugin code method does nothing subclasses may extend this method but must send super first p warning plug ins may not be started in the ui thread the code startup code method should not assume that its code runs in the ui thread otherwise swt thread exceptions may occur on startup deprecated in eclipse 3 0 code startup code has been replaced by link plugin start bundle context context implementations of code startup code should be changed to extend code start bundle context context code and call code super start context code instead of code super startup code like code super startup code code super stop context code must be called as the very first thing the code startup code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in in contrast the code start code method is always called public void startup throws core exception this method no longer does anything the code that used to be here in 2 1 has moved to start bundle context super startup abstractuiplugin bundlecontext bundlecontext coreexception bundlecontext the code abstractui plugin code implementation of this code plugin code method does nothing subclasses may extend this method but must send super first deprecated in eclipse 3 0 code shutdown code has been replaced by link plugin stop bundle context context implementations of code shutdown code should be changed to extend code stop bundle context context code and call code super stop context code instead of code super shutdown code unlike code super shutdown code code super stop context code must be called as the very b last b thing rather than as the very first thing the code shutdown code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in in contrast the code stop code method is always called public void shutdown throws core exception this method no longer does anything interesting the code that used to be here in 2 1 has moved to stop bundle context which is called regardless of whether the plug in being instantiated requires org eclipse core runtime compatibility super shutdown abstractuiplugin bundlecontext bundlecontext coreexception bundlecontext the code abstractui plugin code implementation of this code plugin code method refreshes the plug in actions subclasses may extend this method but must send super b first b inherit doc since 3 0 public void start bundle context context throws exception super start context final bundle context fc context should only attempt refresh plugin actions once the bundle has been fully started otherwise action delegates can be created while in the process of creating a triggering action delegate if ui events are processed during startup also if the start throws an exception the bundle will be shut down we don t want to have created any delegates if this happens see bug 63324 for more details bundle listener new bundle listener public void bundle changed bundle event event if event get bundle get bundle if event get type bundle event started we re getting notified that the bundle has been started make sure it s still active it may have been shut down between the time this event was queued and now if get bundle get state bundle active refresh plugin actions fc remove bundle listener this context add bundle listener bundle listener bundle listener is removed in stop bundle context abstractuiplugin inheritdoc bundlecontext bundlecontext refreshpluginactions bundlelistener bundlelistener bundlechanged bundleevent getbundle getbundle gettype bundleevent getbundle getstate refreshpluginactions removebundlelistener addbundlelistener bundlelistener bundlelistener bundlecontext bundle listener new bundle listener public void bundle changed bundle event event if event get bundle get bundle if event get type bundle event started we re getting notified that the bundle has been started make sure it s still active it may have been shut down between the time this event was queued and now if get bundle get state bundle active refresh plugin actions fc remove bundle listener this bundlelistener bundlelistener bundlechanged bundleevent getbundle getbundle gettype bundleevent getbundle getstate refreshpluginactions removebundlelistener the code abstractui plugin code implementation of this code plugin code method saves this plug in s preference and dialog stores and shuts down its image registry if they are in use subclasses may extend this method but must send super b last b a try finally statement should be used where necessary to ensure that code super shutdown code is always done inherit doc since 3 0 public void stop bundle context context throws exception try if bundle listener null context remove bundle listener bundle listener save dialog settings save preference store preference store null image registry null finally super stop context abstractuiplugin inheritdoc bundlecontext bundlelistener removebundlelistener bundlelistener savedialogsettings savepreferencestore preferencestore imageregistry creates and returns a new image descriptor for an image file located within the specified plug in p this is a convenience method that simply locates the image file in within the plug in no image registries are involved the path is relative to the root of the plug in and takes into account files coming from plug in fragments the path may include arg elements however the path must not have a leading or path separator clients should use a path like icons mysample gif rather than icons mysample gif or icons mysample gif p param plugin id the id of the plug in containing the image file code null code is returned if the plug in does not exist param image file path the relative path of the image file relative to the root of the plug in the path must be legal return an image descriptor or code null code if no image could be found since 3 0 public static image descriptor image descriptor from plugin string plugin id string image file path if plugin id null image file path null throw new illegal argument exception if the bundle is not ready then there is no image bundle bundle platform get bundle plugin id if bundle utility is ready bundle return null look for the image this will check both the plugin and fragment folders url full path string bundle utility find bundle image file path if full path string null try full path string new url image file path catch malformedurl exception e return null if full path string null return null return image descriptor create fromurl full path string pluginid imagefilepath imagedescriptor imagedescriptorfromplugin pluginid imagefilepath pluginid imagefilepath illegalargumentexception getbundle pluginid bundleutility isready fullpathstring bundleutility imagefilepath fullpathstring fullpathstring imagefilepath malformedurlexception fullpathstring imagedescriptor createfromurl fullpathstring for internal workbench use only returns the path to a location in the file system that can be used to persist restore state between workbench invocations if the location did not exist prior to this call it will be created returns code null code if no such location is available return path to a location in the file system where this plug in can persist data between sessions or code null code if no such location is available since 3 1 private i path get state location or null try return get state location catch illegal state exception e this occurs if data none is explicitly specified so ignore this silently is this ok see bug 85071 return null ipath getstatelocationornull getstatelocation illegalstateexception creates an abstract ui plug in runtime object for the given plug in descriptor p note that instances of plug in runtime classes are automatically created by the platform in the course of plug in activation p param descriptor the plug in descriptor see plugin plugin org eclipse core runtime i plugin descriptor descriptor deprecated in eclipse 3 0 this constructor has been replaced by link abstractui plugin implementations of code my plugin i plugin descriptor descriptor code should be changed to code my plugin code and call code super code instead of code super descriptor code the code my plugin i plugin descriptor descriptor code constructor is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in or as in this case subclasses which might public abstractui plugin i plugin descriptor descriptor super descriptor iplugindescriptor abstractuiplugin myplugin iplugindescriptor myplugin myplugin iplugindescriptor abstractuiplugin iplugindescriptor creates an abstract ui plug in runtime object p plug in runtime classes are code bundle activators code and so must have an default constructor this method is called by the runtime when the associated bundle is being activated p for more details see code plugin code s default constructor see plugin plugin since 3 0 public abstractui plugin super bundleactivators abstractuiplugin returns a new image registry for this plugin in the registry will be used to manage images which are frequently used by the plugin in p the default implementation of this method creates an empty registry subclasses may override this method if needed p return image registry the resulting registry see get image registry protected image registry create image registry if we are in the ui thread use that if display get current null return new image registry display get current if platformui is workbench running return new image registry platformui get workbench get display invalid thread access if it is not the ui thread and the workbench is not created throw new swt error swt error thread invalid access imageregistry getimageregistry imageregistry createimageregistry getcurrent imageregistry getcurrent isworkbenchrunning imageregistry getworkbench getdisplay swterror error_thread_invalid_access returns the dialog settings for this ui plug in the dialog settings is used to hold persistent state data for the various wizards and dialogs of this plug in in the context of a workbench p if an error occurs reading the dialog store an empty one is quietly created and returned p p subclasses may override this method but are not expected to p return the dialog settings public i dialog settings get dialog settings if dialog settings null load dialog settings return dialog settings idialogsettings getdialogsettings dialogsettings loaddialogsettings dialogsettings returns the image registry for this ui plug in p the image registry contains the images used by this plug in that are very frequently used and so need to be globally shared within the plug in since many o ss have a severe limit on the number of images that can be in memory at any given time a plug in should only keep a small number of images in their registry p subclasses should reimplement code initialize image registry code if they have custom graphic images to load p p subclasses may override this method but are not expected to p return the image registry public image registry get image registry if image registry null image registry create image registry initialize image registry image registry return image registry oss initializeimageregistry imageregistry getimageregistry imageregistry imageregistry createimageregistry initializeimageregistry imageregistry imageregistry returns the preference store for this ui plug in this preference store is used to hold persistent settings for this plug in in the context of a workbench some of these settings will be user controlled whereas others may be internal setting that are never exposed to the user p if an error occurs reading the preference store an empty preference store is quietly created initialized with defaults and returned p p strong note strong as of eclipse 3 1 this method is no longer referring to the core runtime compatibility layer and so plug ins relying on plugin initialize default preferences will have to access the compatibility layer themselves p return the preference store public i preference store get preference store create the preference store lazily if preference store null preference store new scoped preference store new instance scope get bundle get symbolic name return preference store initializedefaultpreferences ipreferencestore getpreferencestore preferencestore preferencestore scopedpreferencestore instancescope getbundle getsymbolicname preferencestore returns the platform ui workbench p this method exists as a convenience for plugin implementors the workbench can also be accessed by invoking code platformui get workbench code p return i workbench the workbench for this plug in public i workbench get workbench return platformui get workbench getworkbench iworkbench iworkbench getworkbench getworkbench initializes a preference store with default preference values for this plug in p this method is called after the preference store is initially loaded default values are never stored in preference stores p p the default implementation of this method does nothing subclasses should reimplement this method if the plug in has any preferences p p a subclass may reimplement this method to set default values for the preference store using j face api this is the older way of initializing default values if this method is reimplemented do not override code initialize default plugin preferences code p param store the preference store to fill deprecated this is only called if the runtime compatibility layer is present see link initialize default plugin preferences protected void initialize default preferences i preference store store spec ed to do nothing jface initializedefaultpluginpreferences initializedefaultpluginpreferences initializedefaultpreferences ipreferencestore the code abstractui plugin code implementation of this code plugin code method forwards to code initialize default preferences i preference store code p a subclass may reimplement this method to set default values for the core runtime preference store in the standard way this is the recommended way to do this the older code initialize default preferences i preference store code method serves a similar purpose if this method is reimplemented do not send super and do not override code initialize default preferences i preference store code p deprecated this is only called if the runtime compatibility layer is present see the deprecated comment in link plugin initialize default plugin preferences see initialize default preferences since 2 0 protected void initialize default plugin preferences n b by the time this method is called the plug in has a core runtime preference store no default values call load preference store only for backwards compatibility with eclipse 1 0 load preference store call initialize default preferences only for backwards compatibility with eclipse 1 0 initialize default preferences get preference store abstractuiplugin initializedefaultpreferences ipreferencestore initializedefaultpreferences ipreferencestore initializedefaultpreferences ipreferencestore initializedefaultpluginpreferences initializedefaultpreferences initializedefaultpluginpreferences loadpreferencestore loadpreferencestore initializedefaultpreferences initializedefaultpreferences getpreferencestore initializes an image registry with images which are frequently used by the plugin p the image registry contains the images used by this plug in that are very frequently used and so need to be globally shared within the plug in since many o ss have a severe limit on the number of images that can be in memory at any given time each plug in should only keep a small number of images in its registry p p implementors should create a j face image descriptor for each frequently used image the descriptors describe how to create find the image should it be needed the image described by the descriptor is not actually allocated until someone retrieves it p p subclasses may override this method to fill the image registry p param reg the registry to initalize see get image registry protected void initialize image registry image registry reg spec ed to do nothing oss jface getimageregistry initializeimageregistry imageregistry loads the dialog settings for this plug in the default implementation first looks for a standard named file in the plug in s read write state area if no such file exists the plug in s install directory is checked to see if one was installed with some default settings if no file is found in either place a new empty dialog settings is created if a problem occurs an empty settings is silently used p this framework method may be overridden although this is typically unnecessary p protected void load dialog settings dialog settings new dialog settings workbench non nls 1 bug 69387 the instance area should not be created in the call to get state location if data none or data no default was used i path data location get state location or null if data location null try r w state area in the local file system string read write path data location append fn dialog settings toos string file settings file new file read write path if settings file exists try dialog settings load read write path catch io exception e load failed so ensure we have an empty settings dialog settings new dialog settings workbench non nls 1 return otherwise look for bundle specific dialog settings url dsurl bundle utility find get bundle fn dialog settings if dsurl null return input stream is null try is dsurl open stream buffered reader reader new buffered reader new input stream reader is utf 8 non nls 1 dialog settings load reader catch io exception e load failed so ensure we have an empty settings dialog settings new dialog settings workbench non nls 1 finally try if is null is close catch io exception e do nothing loaddialogsettings dialogsettings dialogsettings getstatelocation nodefault ipath datalocation getstatelocationornull datalocation readwritepath datalocation fn_dialog_settings toosstring settingsfile readwritepath settingsfile dialogsettings readwritepath ioexception dialogsettings dialogsettings bundleutility getbundle fn_dialog_settings inputstream openstream bufferedreader bufferedreader inputstreamreader dialogsettings ioexception dialogsettings dialogsettings ioexception loads the preference store for this plug in the default implementation looks for a standard named file in the plug in s read write state area if no file is found or a problem occurs a new empty preference store is silently created p this framework method may be overridden although this is typically unnecessary p deprecated as of eclipse 2 0 a basic preference store exists for all plug ins this method now exists only for backwards compatibility it is called as the plug in s preference store is being initialized the plug ins preferences are loaded from the file regardless of what this method does protected void load preference store do nothing by default loadpreferencestore refreshes the actions for the plugin this method is called from code startup code p this framework method may be overridden although this is typically unnecessary p protected void refresh plugin actions if the workbench is not started yet or is no longer running do nothing if platformui is workbench running return startup is not guaranteed to be called in the ui thread but refresh plugin actions must run in the ui thread so use async exec see bug 6623 for more details display get default async exec new runnable public void run w win plugin action refresh action list refreshpluginactions isworkbenchrunning refreshpluginactions asyncexec getdefault asyncexec wwinpluginaction refreshactionlist so use async exec see bug 6623 for more details display get default async exec new runnable public void run w win plugin action refresh action list asyncexec getdefault asyncexec wwinpluginaction refreshactionlist saves this plug in s dialog settings any problems which arise are silently ignored protected void save dialog settings if dialog settings null return try i path path get state location or null if path null return string read write path path append fn dialog settings toos string dialog settings save read write path catch io exception e spec ed to ignore problems catch illegal state exception e spec ed to ignore problems savedialogsettings dialogsettings ipath getstatelocationornull readwritepath fn_dialog_settings toosstring dialogsettings readwritepath ioexception illegalstateexception saves this plug in s preference store any problems which arise are silently ignored see plugin save plugin preferences deprecated as of eclipse 2 0 preferences exist for all plug ins the equivalent of this method is code plugin save plugin preferences code this method now calls code save plugin preferences code and exists only for backwards compatibility protected void save preference store save plugin preferences savepluginpreferences savepluginpreferences savepluginpreferences savepreferencestore savepluginpreferences the code abstractui plugin code implementation of this code plugin code method does nothing subclasses may extend this method but must send super first p warning plug ins may not be started in the ui thread the code startup code method should not assume that its code runs in the ui thread otherwise swt thread exceptions may occur on startup deprecated in eclipse 3 0 code startup code has been replaced by link plugin start bundle context context implementations of code startup code should be changed to extend code start bundle context context code and call code super start context code instead of code super startup code like code super startup code code super stop context code must be called as the very first thing the code startup code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in in contrast the code start code method is always called public void startup throws core exception this method no longer does anything the code that used to be here in 2 1 has moved to start bundle context super startup abstractuiplugin bundlecontext bundlecontext coreexception bundlecontext the code abstractui plugin code implementation of this code plugin code method does nothing subclasses may extend this method but must send super first deprecated in eclipse 3 0 code shutdown code has been replaced by link plugin stop bundle context context implementations of code shutdown code should be changed to extend code stop bundle context context code and call code super stop context code instead of code super shutdown code unlike code super shutdown code code super stop context code must be called as the very b last b thing rather than as the very first thing the code shutdown code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in in contrast the code stop code method is always called public void shutdown throws core exception this method no longer does anything interesting the code that used to be here in 2 1 has moved to stop bundle context which is called regardless of whether the plug in being instantiated requires org eclipse core runtime compatibility super shutdown abstractuiplugin bundlecontext bundlecontext coreexception bundlecontext the code abstractui plugin code implementation of this code plugin code method refreshes the plug in actions subclasses may extend this method but must send super b first b inherit doc since 3 0 public void start bundle context context throws exception super start context final bundle context fc context should only attempt refresh plugin actions once the bundle has been fully started otherwise action delegates can be created while in the process of creating a triggering action delegate if ui events are processed during startup also if the start throws an exception the bundle will be shut down we don t want to have created any delegates if this happens see bug 63324 for more details bundle listener new bundle listener public void bundle changed bundle event event if event get bundle get bundle if event get type bundle event started we re getting notified that the bundle has been started make sure it s still active it may have been shut down between the time this event was queued and now if get bundle get state bundle active refresh plugin actions fc remove bundle listener this context add bundle listener bundle listener bundle listener is removed in stop bundle context abstractuiplugin inheritdoc bundlecontext bundlecontext refreshpluginactions bundlelistener bundlelistener bundlechanged bundleevent getbundle getbundle gettype bundleevent getbundle getstate refreshpluginactions removebundlelistener addbundlelistener bundlelistener bundlelistener bundlecontext bundle listener new bundle listener public void bundle changed bundle event event if event get bundle get bundle if event get type bundle event started we re getting notified that the bundle has been started make sure it s still active it may have been shut down between the time this event was queued and now if get bundle get state bundle active refresh plugin actions fc remove bundle listener this bundlelistener bundlelistener bundlechanged bundleevent getbundle getbundle gettype bundleevent getbundle getstate refreshpluginactions removebundlelistener the code abstractui plugin code implementation of this code plugin code method saves this plug in s preference and dialog stores and shuts down its image registry if they are in use subclasses may extend this method but must send super b last b a try finally statement should be used where necessary to ensure that code super shutdown code is always done inherit doc since 3 0 public void stop bundle context context throws exception try if bundle listener null context remove bundle listener bundle listener save dialog settings save preference store preference store null image registry null finally super stop context abstractuiplugin inheritdoc bundlecontext bundlelistener removebundlelistener bundlelistener savedialogsettings savepreferencestore preferencestore imageregistry creates and returns a new image descriptor for an image file located within the specified plug in p this is a convenience method that simply locates the image file in within the plug in no image registries are involved the path is relative to the root of the plug in and takes into account files coming from plug in fragments the path may include arg elements however the path must not have a leading or path separator clients should use a path like icons mysample gif rather than icons mysample gif or icons mysample gif p param plugin id the id of the plug in containing the image file code null code is returned if the plug in does not exist param image file path the relative path of the image file relative to the root of the plug in the path must be legal return an image descriptor or code null code if no image could be found since 3 0 public static image descriptor image descriptor from plugin string plugin id string image file path if plugin id null image file path null throw new illegal argument exception if the bundle is not ready then there is no image bundle bundle platform get bundle plugin id if bundle utility is ready bundle return null look for the image this will check both the plugin and fragment folders url full path string bundle utility find bundle image file path if full path string null try full path string new url image file path catch malformedurl exception e return null if full path string null return null return image descriptor create fromurl full path string pluginid imagefilepath imagedescriptor imagedescriptorfromplugin pluginid imagefilepath pluginid imagefilepath illegalargumentexception getbundle pluginid bundleutility isready fullpathstring bundleutility imagefilepath fullpathstring fullpathstring imagefilepath malformedurlexception fullpathstring imagedescriptor createfromurl fullpathstring for internal workbench use only returns the path to a location in the file system that can be used to persist restore state between workbench invocations if the location did not exist prior to this call it will be created returns code null code if no such location is available return path to a location in the file system where this plug in can persist data between sessions or code null code if no such location is available since 3 1 private i path get state location or null try return get state location catch illegal state exception e this occurs if data none is explicitly specified so ignore this silently is this ok see bug 85071 return null ipath getstatelocationornull getstatelocation illegalstateexception creates an abstract ui plug in runtime object for the given plug in descriptor p note that instances of plug in runtime classes are automatically created by the platform in the course of plug in activation p param descriptor the plug in descriptor see plugin plugin org eclipse core runtime i plugin descriptor descriptor deprecated in eclipse 3 0 this constructor has been replaced by link abstractui plugin implementations of code my plugin i plugin descriptor descriptor code should be changed to code my plugin code and call code super code instead of code super descriptor code the code my plugin i plugin descriptor descriptor code constructor is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in or as in this case subclasses which might public abstractui plugin i plugin descriptor descriptor super descriptor iplugindescriptor abstractuiplugin myplugin iplugindescriptor myplugin myplugin iplugindescriptor abstractuiplugin iplugindescriptor creates an abstract ui plug in runtime object p plug in runtime classes are code bundle activators code and so must have an default constructor this method is called by the runtime when the associated bundle is being activated p for more details see code plugin code s default constructor see plugin plugin since 3 0 public abstractui plugin super bundleactivators abstractuiplugin returns a new image registry for this plugin in the registry will be used to manage images which are frequently used by the plugin in p the default implementation of this method creates an empty registry subclasses may override this method if needed p return image registry the resulting registry see get image registry protected image registry create image registry if we are in the ui thread use that if display get current null return new image registry display get current if platformui is workbench running return new image registry platformui get workbench get display invalid thread access if it is not the ui thread and the workbench is not created throw new swt error swt error thread invalid access imageregistry getimageregistry imageregistry createimageregistry getcurrent imageregistry getcurrent isworkbenchrunning imageregistry getworkbench getdisplay swterror error_thread_invalid_access returns the dialog settings for this ui plug in the dialog settings is used to hold persistent state data for the various wizards and dialogs of this plug in in the context of a workbench p if an error occurs reading the dialog store an empty one is quietly created and returned p p subclasses may override this method but are not expected to p return the dialog settings public i dialog settings get dialog settings if dialog settings null load dialog settings return dialog settings idialogsettings getdialogsettings dialogsettings loaddialogsettings dialogsettings returns the image registry for this ui plug in p the image registry contains the images used by this plug in that are very frequently used and so need to be globally shared within the plug in since many o ss have a severe limit on the number of images that can be in memory at any given time a plug in should only keep a small number of images in their registry p subclasses should reimplement code initialize image registry code if they have custom graphic images to load p p subclasses may override this method but are not expected to p return the image registry public image registry get image registry if image registry null image registry create image registry initialize image registry image registry return image registry oss initializeimageregistry imageregistry getimageregistry imageregistry imageregistry createimageregistry initializeimageregistry imageregistry imageregistry returns the preference store for this ui plug in this preference store is used to hold persistent settings for this plug in in the context of a workbench some of these settings will be user controlled whereas others may be internal setting that are never exposed to the user p if an error occurs reading the preference store an empty preference store is quietly created initialized with defaults and returned p p strong note strong as of eclipse 3 1 this method is no longer referring to the core runtime compatibility layer and so plug ins relying on plugin initialize default preferences will have to access the compatibility layer themselves p return the preference store public i preference store get preference store create the preference store lazily if preference store null preference store new scoped preference store new instance scope get bundle get symbolic name return preference store initializedefaultpreferences ipreferencestore getpreferencestore preferencestore preferencestore scopedpreferencestore instancescope getbundle getsymbolicname preferencestore returns the platform ui workbench p this method exists as a convenience for plugin implementors the workbench can also be accessed by invoking code platformui get workbench code p return i workbench the workbench for this plug in public i workbench get workbench return platformui get workbench getworkbench iworkbench iworkbench getworkbench getworkbench initializes a preference store with default preference values for this plug in p this method is called after the preference store is initially loaded default values are never stored in preference stores p p the default implementation of this method does nothing subclasses should reimplement this method if the plug in has any preferences p p a subclass may reimplement this method to set default values for the preference store using j face api this is the older way of initializing default values if this method is reimplemented do not override code initialize default plugin preferences code p param store the preference store to fill deprecated this is only called if the runtime compatibility layer is present see link initialize default plugin preferences protected void initialize default preferences i preference store store spec ed to do nothing jface initializedefaultpluginpreferences initializedefaultpluginpreferences initializedefaultpreferences ipreferencestore the code abstractui plugin code implementation of this code plugin code method forwards to code initialize default preferences i preference store code p a subclass may reimplement this method to set default values for the core runtime preference store in the standard way this is the recommended way to do this the older code initialize default preferences i preference store code method serves a similar purpose if this method is reimplemented do not send super and do not override code initialize default preferences i preference store code p deprecated this is only called if the runtime compatibility layer is present see the deprecated comment in link plugin initialize default plugin preferences see initialize default preferences since 2 0 protected void initialize default plugin preferences n b by the time this method is called the plug in has a core runtime preference store no default values call load preference store only for backwards compatibility with eclipse 1 0 load preference store call initialize default preferences only for backwards compatibility with eclipse 1 0 initialize default preferences get preference store abstractuiplugin initializedefaultpreferences ipreferencestore initializedefaultpreferences ipreferencestore initializedefaultpreferences ipreferencestore initializedefaultpluginpreferences initializedefaultpreferences initializedefaultpluginpreferences loadpreferencestore loadpreferencestore initializedefaultpreferences initializedefaultpreferences getpreferencestore initializes an image registry with images which are frequently used by the plugin p the image registry contains the images used by this plug in that are very frequently used and so need to be globally shared within the plug in since many o ss have a severe limit on the number of images that can be in memory at any given time each plug in should only keep a small number of images in its registry p p implementors should create a j face image descriptor for each frequently used image the descriptors describe how to create find the image should it be needed the image described by the descriptor is not actually allocated until someone retrieves it p p subclasses may override this method to fill the image registry p param reg the registry to initalize see get image registry protected void initialize image registry image registry reg spec ed to do nothing oss jface getimageregistry initializeimageregistry imageregistry loads the dialog settings for this plug in the default implementation first looks for a standard named file in the plug in s read write state area if no such file exists the plug in s install directory is checked to see if one was installed with some default settings if no file is found in either place a new empty dialog settings is created if a problem occurs an empty settings is silently used p this framework method may be overridden although this is typically unnecessary p protected void load dialog settings dialog settings new dialog settings workbench non nls 1 bug 69387 the instance area should not be created in the call to get state location if data none or data no default was used i path data location get state location or null if data location null try r w state area in the local file system string read write path data location append fn dialog settings toos string file settings file new file read write path if settings file exists try dialog settings load read write path catch io exception e load failed so ensure we have an empty settings dialog settings new dialog settings workbench non nls 1 return otherwise look for bundle specific dialog settings url dsurl bundle utility find get bundle fn dialog settings if dsurl null return input stream is null try is dsurl open stream buffered reader reader new buffered reader new input stream reader is utf 8 non nls 1 dialog settings load reader catch io exception e load failed so ensure we have an empty settings dialog settings new dialog settings workbench non nls 1 finally try if is null is close catch io exception e do nothing loaddialogsettings dialogsettings dialogsettings getstatelocation nodefault ipath datalocation getstatelocationornull datalocation readwritepath datalocation fn_dialog_settings toosstring settingsfile readwritepath settingsfile dialogsettings readwritepath ioexception dialogsettings dialogsettings bundleutility getbundle fn_dialog_settings inputstream openstream bufferedreader bufferedreader inputstreamreader dialogsettings ioexception dialogsettings dialogsettings ioexception loads the preference store for this plug in the default implementation looks for a standard named file in the plug in s read write state area if no file is found or a problem occurs a new empty preference store is silently created p this framework method may be overridden although this is typically unnecessary p deprecated as of eclipse 2 0 a basic preference store exists for all plug ins this method now exists only for backwards compatibility it is called as the plug in s preference store is being initialized the plug ins preferences are loaded from the file regardless of what this method does protected void load preference store do nothing by default loadpreferencestore refreshes the actions for the plugin this method is called from code startup code p this framework method may be overridden although this is typically unnecessary p protected void refresh plugin actions if the workbench is not started yet or is no longer running do nothing if platformui is workbench running return startup is not guaranteed to be called in the ui thread but refresh plugin actions must run in the ui thread so use async exec see bug 6623 for more details display get default async exec new runnable public void run w win plugin action refresh action list refreshpluginactions isworkbenchrunning refreshpluginactions asyncexec getdefault asyncexec wwinpluginaction refreshactionlist so use async exec see bug 6623 for more details display get default async exec new runnable public void run w win plugin action refresh action list asyncexec getdefault asyncexec wwinpluginaction refreshactionlist saves this plug in s dialog settings any problems which arise are silently ignored protected void save dialog settings if dialog settings null return try i path path get state location or null if path null return string read write path path append fn dialog settings toos string dialog settings save read write path catch io exception e spec ed to ignore problems catch illegal state exception e spec ed to ignore problems savedialogsettings dialogsettings ipath getstatelocationornull readwritepath fn_dialog_settings toosstring dialogsettings readwritepath ioexception illegalstateexception saves this plug in s preference store any problems which arise are silently ignored see plugin save plugin preferences deprecated as of eclipse 2 0 preferences exist for all plug ins the equivalent of this method is code plugin save plugin preferences code this method now calls code save plugin preferences code and exists only for backwards compatibility protected void save preference store save plugin preferences savepluginpreferences savepluginpreferences savepluginpreferences savepreferencestore savepluginpreferences the code abstractui plugin code implementation of this code plugin code method does nothing subclasses may extend this method but must send super first p warning plug ins may not be started in the ui thread the code startup code method should not assume that its code runs in the ui thread otherwise swt thread exceptions may occur on startup deprecated in eclipse 3 0 code startup code has been replaced by link plugin start bundle context context implementations of code startup code should be changed to extend code start bundle context context code and call code super start context code instead of code super startup code like code super startup code code super stop context code must be called as the very first thing the code startup code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in in contrast the code start code method is always called public void startup throws core exception this method no longer does anything the code that used to be here in 2 1 has moved to start bundle context super startup abstractuiplugin bundlecontext bundlecontext coreexception bundlecontext the code abstractui plugin code implementation of this code plugin code method does nothing subclasses may extend this method but must send super first deprecated in eclipse 3 0 code shutdown code has been replaced by link plugin stop bundle context context implementations of code shutdown code should be changed to extend code stop bundle context context code and call code super stop context code instead of code super shutdown code unlike code super shutdown code code super stop context code must be called as the very b last b thing rather than as the very first thing the code shutdown code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in in contrast the code stop code method is always called public void shutdown throws core exception this method no longer does anything interesting the code that used to be here in 2 1 has moved to stop bundle context which is called regardless of whether the plug in being instantiated requires org eclipse core runtime compatibility super shutdown abstractuiplugin bundlecontext bundlecontext coreexception bundlecontext the code abstractui plugin code implementation of this code plugin code method refreshes the plug in actions subclasses may extend this method but must send super b first b inherit doc since 3 0 public void start bundle context context throws exception super start context final bundle context fc context should only attempt refresh plugin actions once the bundle has been fully started otherwise action delegates can be created while in the process of creating a triggering action delegate if ui events are processed during startup also if the start throws an exception the bundle will be shut down we don t want to have created any delegates if this happens see bug 63324 for more details bundle listener new bundle listener public void bundle changed bundle event event if event get bundle get bundle if event get type bundle event started we re getting notified that the bundle has been started make sure it s still active it may have been shut down between the time this event was queued and now if get bundle get state bundle active refresh plugin actions fc remove bundle listener this context add bundle listener bundle listener bundle listener is removed in stop bundle context abstractuiplugin inheritdoc bundlecontext bundlecontext refreshpluginactions bundlelistener bundlelistener bundlechanged bundleevent getbundle getbundle gettype bundleevent getbundle getstate refreshpluginactions removebundlelistener addbundlelistener bundlelistener bundlelistener bundlecontext bundle listener new bundle listener public void bundle changed bundle event event if event get bundle get bundle if event get type bundle event started we re getting notified that the bundle has been started make sure it s still active it may have been shut down between the time this event was queued and now if get bundle get state bundle active refresh plugin actions fc remove bundle listener this bundlelistener bundlelistener bundlechanged bundleevent getbundle getbundle gettype bundleevent getbundle getstate refreshpluginactions removebundlelistener the code abstractui plugin code implementation of this code plugin code method saves this plug in s preference and dialog stores and shuts down its image registry if they are in use subclasses may extend this method but must send super b last b a try finally statement should be used where necessary to ensure that code super shutdown code is always done inherit doc since 3 0 public void stop bundle context context throws exception try if bundle listener null context remove bundle listener bundle listener save dialog settings save preference store preference store null image registry null finally super stop context abstractuiplugin inheritdoc bundlecontext bundlelistener removebundlelistener bundlelistener savedialogsettings savepreferencestore preferencestore imageregistry creates and returns a new image descriptor for an image file located within the specified plug in p this is a convenience method that simply locates the image file in within the plug in no image registries are involved the path is relative to the root of the plug in and takes into account files coming from plug in fragments the path may include arg elements however the path must not have a leading or path separator clients should use a path like icons mysample gif rather than icons mysample gif or icons mysample gif p param plugin id the id of the plug in containing the image file code null code is returned if the plug in does not exist param image file path the relative path of the image file relative to the root of the plug in the path must be legal return an image descriptor or code null code if no image could be found since 3 0 public static image descriptor image descriptor from plugin string plugin id string image file path if plugin id null image file path null throw new illegal argument exception if the bundle is not ready then there is no image bundle bundle platform get bundle plugin id if bundle utility is ready bundle return null look for the image this will check both the plugin and fragment folders url full path string bundle utility find bundle image file path if full path string null try full path string new url image file path catch malformedurl exception e return null if full path string null return null return image descriptor create fromurl full path string pluginid imagefilepath imagedescriptor imagedescriptorfromplugin pluginid imagefilepath pluginid imagefilepath illegalargumentexception getbundle pluginid bundleutility isready fullpathstring bundleutility imagefilepath fullpathstring fullpathstring imagefilepath malformedurlexception fullpathstring imagedescriptor createfromurl fullpathstring for internal workbench use only returns the path to a location in the file system that can be used to persist restore state between workbench invocations if the location did not exist prior to this call it will be created returns code null code if no such location is available return path to a location in the file system where this plug in can persist data between sessions or code null code if no such location is available since 3 1 private i path get state location or null try return get state location catch illegal state exception e this occurs if data none is explicitly specified so ignore this silently is this ok see bug 85071 return null ipath getstatelocationornull getstatelocation illegalstateexception creates an abstract ui plug in runtime object for the given plug in descriptor p note that instances of plug in runtime classes are automatically created by the platform in the course of plug in activation p param descriptor the plug in descriptor see plugin plugin org eclipse core runtime i plugin descriptor descriptor deprecated in eclipse 3 0 this constructor has been replaced by link abstractui plugin implementations of code my plugin i plugin descriptor descriptor code should be changed to code my plugin code and call code super code instead of code super descriptor code the code my plugin i plugin descriptor descriptor code constructor is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in or as in this case subclasses which might public abstractui plugin i plugin descriptor descriptor super descriptor iplugindescriptor abstractuiplugin myplugin iplugindescriptor myplugin myplugin iplugindescriptor abstractuiplugin iplugindescriptor creates an abstract ui plug in runtime object p plug in runtime classes are code bundle activators code and so must have an default constructor this method is called by the runtime when the associated bundle is being activated p for more details see code plugin code s default constructor see plugin plugin since 3 0 public abstractui plugin super bundleactivators abstractuiplugin returns a new image registry for this plugin in the registry will be used to manage images which are frequently used by the plugin in p the default implementation of this method creates an empty registry subclasses may override this method if needed p return image registry the resulting registry see get image registry protected image registry create image registry if we are in the ui thread use that if display get current null return new image registry display get current if platformui is workbench running return new image registry platformui get workbench get display invalid thread access if it is not the ui thread and the workbench is not created throw new swt error swt error thread invalid access imageregistry getimageregistry imageregistry createimageregistry getcurrent imageregistry getcurrent isworkbenchrunning imageregistry getworkbench getdisplay swterror error_thread_invalid_access returns the dialog settings for this ui plug in the dialog settings is used to hold persistent state data for the various wizards and dialogs of this plug in in the context of a workbench p if an error occurs reading the dialog store an empty one is quietly created and returned p p subclasses may override this method but are not expected to p return the dialog settings public i dialog settings get dialog settings if dialog settings null load dialog settings return dialog settings idialogsettings getdialogsettings dialogsettings loaddialogsettings dialogsettings returns the image registry for this ui plug in p the image registry contains the images used by this plug in that are very frequently used and so need to be globally shared within the plug in since many o ss have a severe limit on the number of images that can be in memory at any given time a plug in should only keep a small number of images in their registry p subclasses should reimplement code initialize image registry code if they have custom graphic images to load p p subclasses may override this method but are not expected to p return the image registry public image registry get image registry if image registry null image registry create image registry initialize image registry image registry return image registry oss initializeimageregistry imageregistry getimageregistry imageregistry imageregistry createimageregistry initializeimageregistry imageregistry imageregistry returns the preference store for this ui plug in this preference store is used to hold persistent settings for this plug in in the context of a workbench some of these settings will be user controlled whereas others may be internal setting that are never exposed to the user p if an error occurs reading the preference store an empty preference store is quietly created initialized with defaults and returned p p strong note strong as of eclipse 3 1 this method is no longer referring to the core runtime compatibility layer and so plug ins relying on plugin initialize default preferences will have to access the compatibility layer themselves p return the preference store public i preference store get preference store create the preference store lazily if preference store null preference store new scoped preference store new instance scope get bundle get symbolic name return preference store initializedefaultpreferences ipreferencestore getpreferencestore preferencestore preferencestore scopedpreferencestore instancescope getbundle getsymbolicname preferencestore returns the platform ui workbench p this method exists as a convenience for plugin implementors the workbench can also be accessed by invoking code platformui get workbench code p return i workbench the workbench for this plug in public i workbench get workbench return platformui get workbench getworkbench iworkbench iworkbench getworkbench getworkbench initializes a preference store with default preference values for this plug in p this method is called after the preference store is initially loaded default values are never stored in preference stores p p the default implementation of this method does nothing subclasses should reimplement this method if the plug in has any preferences p p a subclass may reimplement this method to set default values for the preference store using j face api this is the older way of initializing default values if this method is reimplemented do not override code initialize default plugin preferences code p param store the preference store to fill deprecated this is only called if the runtime compatibility layer is present see link initialize default plugin preferences protected void initialize default preferences i preference store store spec ed to do nothing jface initializedefaultpluginpreferences initializedefaultpluginpreferences initializedefaultpreferences ipreferencestore the code abstractui plugin code implementation of this code plugin code method forwards to code initialize default preferences i preference store code p a subclass may reimplement this method to set default values for the core runtime preference store in the standard way this is the recommended way to do this the older code initialize default preferences i preference store code method serves a similar purpose if this method is reimplemented do not send super and do not override code initialize default preferences i preference store code p deprecated this is only called if the runtime compatibility layer is present see the deprecated comment in link plugin initialize default plugin preferences see initialize default preferences since 2 0 protected void initialize default plugin preferences n b by the time this method is called the plug in has a core runtime preference store no default values call load preference store only for backwards compatibility with eclipse 1 0 load preference store call initialize default preferences only for backwards compatibility with eclipse 1 0 initialize default preferences get preference store abstractuiplugin initializedefaultpreferences ipreferencestore initializedefaultpreferences ipreferencestore initializedefaultpreferences ipreferencestore initializedefaultpluginpreferences initializedefaultpreferences initializedefaultpluginpreferences loadpreferencestore loadpreferencestore initializedefaultpreferences initializedefaultpreferences getpreferencestore initializes an image registry with images which are frequently used by the plugin p the image registry contains the images used by this plug in that are very frequently used and so need to be globally shared within the plug in since many o ss have a severe limit on the number of images that can be in memory at any given time each plug in should only keep a small number of images in its registry p p implementors should create a j face image descriptor for each frequently used image the descriptors describe how to create find the image should it be needed the image described by the descriptor is not actually allocated until someone retrieves it p p subclasses may override this method to fill the image registry p param reg the registry to initalize see get image registry protected void initialize image registry image registry reg spec ed to do nothing oss jface getimageregistry initializeimageregistry imageregistry loads the dialog settings for this plug in the default implementation first looks for a standard named file in the plug in s read write state area if no such file exists the plug in s install directory is checked to see if one was installed with some default settings if no file is found in either place a new empty dialog settings is created if a problem occurs an empty settings is silently used p this framework method may be overridden although this is typically unnecessary p protected void load dialog settings dialog settings new dialog settings workbench non nls 1 bug 69387 the instance area should not be created in the call to get state location if data none or data no default was used i path data location get state location or null if data location null try r w state area in the local file system string read write path data location append fn dialog settings toos string file settings file new file read write path if settings file exists try dialog settings load read write path catch io exception e load failed so ensure we have an empty settings dialog settings new dialog settings workbench non nls 1 return otherwise look for bundle specific dialog settings url dsurl bundle utility find get bundle fn dialog settings if dsurl null return input stream is null try is dsurl open stream buffered reader reader new buffered reader new input stream reader is utf 8 non nls 1 dialog settings load reader catch io exception e load failed so ensure we have an empty settings dialog settings new dialog settings workbench non nls 1 finally try if is null is close catch io exception e do nothing loaddialogsettings dialogsettings dialogsettings getstatelocation nodefault ipath datalocation getstatelocationornull datalocation readwritepath datalocation fn_dialog_settings toosstring settingsfile readwritepath settingsfile dialogsettings readwritepath ioexception dialogsettings dialogsettings bundleutility getbundle fn_dialog_settings inputstream openstream bufferedreader bufferedreader inputstreamreader dialogsettings ioexception dialogsettings dialogsettings ioexception loads the preference store for this plug in the default implementation looks for a standard named file in the plug in s read write state area if no file is found or a problem occurs a new empty preference store is silently created p this framework method may be overridden although this is typically unnecessary p deprecated as of eclipse 2 0 a basic preference store exists for all plug ins this method now exists only for backwards compatibility it is called as the plug in s preference store is being initialized the plug ins preferences are loaded from the file regardless of what this method does protected void load preference store do nothing by default loadpreferencestore refreshes the actions for the plugin this method is called from code startup code p this framework method may be overridden although this is typically unnecessary p protected void refresh plugin actions if the workbench is not started yet or is no longer running do nothing if platformui is workbench running return startup is not guaranteed to be called in the ui thread but refresh plugin actions must run in the ui thread so use async exec see bug 6623 for more details display get default async exec new runnable public void run w win plugin action refresh action list refreshpluginactions isworkbenchrunning refreshpluginactions asyncexec getdefault asyncexec wwinpluginaction refreshactionlist so use async exec see bug 6623 for more details display get default async exec new runnable public void run w win plugin action refresh action list asyncexec getdefault asyncexec wwinpluginaction refreshactionlist saves this plug in s dialog settings any problems which arise are silently ignored protected void save dialog settings if dialog settings null return try i path path get state location or null if path null return string read write path path append fn dialog settings toos string dialog settings save read write path catch io exception e spec ed to ignore problems catch illegal state exception e spec ed to ignore problems savedialogsettings dialogsettings ipath getstatelocationornull readwritepath fn_dialog_settings toosstring dialogsettings readwritepath ioexception illegalstateexception saves this plug in s preference store any problems which arise are silently ignored see plugin save plugin preferences deprecated as of eclipse 2 0 preferences exist for all plug ins the equivalent of this method is code plugin save plugin preferences code this method now calls code save plugin preferences code and exists only for backwards compatibility protected void save preference store save plugin preferences savepluginpreferences savepluginpreferences savepluginpreferences savepreferencestore savepluginpreferences the code abstractui plugin code implementation of this code plugin code method does nothing subclasses may extend this method but must send super first p warning plug ins may not be started in the ui thread the code startup code method should not assume that its code runs in the ui thread otherwise swt thread exceptions may occur on startup deprecated in eclipse 3 0 code startup code has been replaced by link plugin start bundle context context implementations of code startup code should be changed to extend code start bundle context context code and call code super start context code instead of code super startup code like code super startup code code super stop context code must be called as the very first thing the code startup code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in in contrast the code start code method is always called public void startup throws core exception this method no longer does anything the code that used to be here in 2 1 has moved to start bundle context super startup abstractuiplugin bundlecontext bundlecontext coreexception bundlecontext the code abstractui plugin code implementation of this code plugin code method does nothing subclasses may extend this method but must send super first deprecated in eclipse 3 0 code shutdown code has been replaced by link plugin stop bundle context context implementations of code shutdown code should be changed to extend code stop bundle context context code and call code super stop context code instead of code super shutdown code unlike code super shutdown code code super stop context code must be called as the very b last b thing rather than as the very first thing the code shutdown code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in in contrast the code stop code method is always called public void shutdown throws core exception this method no longer does anything interesting the code that used to be here in 2 1 has moved to stop bundle context which is called regardless of whether the plug in being instantiated requires org eclipse core runtime compatibility super shutdown abstractuiplugin bundlecontext bundlecontext coreexception bundlecontext the code abstractui plugin code implementation of this code plugin code method refreshes the plug in actions subclasses may extend this method but must send super b first b inherit doc since 3 0 public void start bundle context context throws exception super start context final bundle context fc context should only attempt refresh plugin actions once the bundle has been fully started otherwise action delegates can be created while in the process of creating a triggering action delegate if ui events are processed during startup also if the start throws an exception the bundle will be shut down we don t want to have created any delegates if this happens see bug 63324 for more details bundle listener new bundle listener public void bundle changed bundle event event if event get bundle get bundle if event get type bundle event started we re getting notified that the bundle has been started make sure it s still active it may have been shut down between the time this event was queued and now if get bundle get state bundle active refresh plugin actions fc remove bundle listener this context add bundle listener bundle listener bundle listener is removed in stop bundle context abstractuiplugin inheritdoc bundlecontext bundlecontext refreshpluginactions bundlelistener bundlelistener bundlechanged bundleevent getbundle getbundle gettype bundleevent getbundle getstate refreshpluginactions removebundlelistener addbundlelistener bundlelistener bundlelistener bundlecontext bundle listener new bundle listener public void bundle changed bundle event event if event get bundle get bundle if event get type bundle event started we re getting notified that the bundle has been started make sure it s still active it may have been shut down between the time this event was queued and now if get bundle get state bundle active refresh plugin actions fc remove bundle listener this bundlelistener bundlelistener bundlechanged bundleevent getbundle getbundle gettype bundleevent getbundle getstate refreshpluginactions removebundlelistener the code abstractui plugin code implementation of this code plugin code method saves this plug in s preference and dialog stores and shuts down its image registry if they are in use subclasses may extend this method but must send super b last b a try finally statement should be used where necessary to ensure that code super shutdown code is always done inherit doc since 3 0 public void stop bundle context context throws exception try if bundle listener null context remove bundle listener bundle listener save dialog settings save preference store preference store null image registry null finally super stop context abstractuiplugin inheritdoc bundlecontext bundlelistener removebundlelistener bundlelistener savedialogsettings savepreferencestore preferencestore imageregistry creates and returns a new image descriptor for an image file located within the specified plug in p this is a convenience method that simply locates the image file in within the plug in no image registries are involved the path is relative to the root of the plug in and takes into account files coming from plug in fragments the path may include arg elements however the path must not have a leading or path separator clients should use a path like icons mysample gif rather than icons mysample gif or icons mysample gif p param plugin id the id of the plug in containing the image file code null code is returned if the plug in does not exist param image file path the relative path of the image file relative to the root of the plug in the path must be legal return an image descriptor or code null code if no image could be found since 3 0 public static image descriptor image descriptor from plugin string plugin id string image file path if plugin id null image file path null throw new illegal argument exception if the bundle is not ready then there is no image bundle bundle platform get bundle plugin id if bundle utility is ready bundle return null look for the image this will check both the plugin and fragment folders url full path string bundle utility find bundle image file path if full path string null try full path string new url image file path catch malformedurl exception e return null if full path string null return null return image descriptor create fromurl full path string pluginid imagefilepath imagedescriptor imagedescriptorfromplugin pluginid imagefilepath pluginid imagefilepath illegalargumentexception getbundle pluginid bundleutility isready fullpathstring bundleutility imagefilepath fullpathstring fullpathstring imagefilepath malformedurlexception fullpathstring imagedescriptor createfromurl fullpathstring for internal workbench use only returns the path to a location in the file system that can be used to persist restore state between workbench invocations if the location did not exist prior to this call it will be created returns code null code if no such location is available return path to a location in the file system where this plug in can persist data between sessions or code null code if no such location is available since 3 1 private i path get state location or null try return get state location catch illegal state exception e this occurs if data none is explicitly specified so ignore this silently is this ok see bug 85071 return null ipath getstatelocationornull getstatelocation illegalstateexception creates an abstract ui plug in runtime object for the given plug in descriptor p note that instances of plug in runtime classes are automatically created by the platform in the course of plug in activation p param descriptor the plug in descriptor see plugin plugin org eclipse core runtime i plugin descriptor descriptor deprecated in eclipse 3 0 this constructor has been replaced by link abstractui plugin implementations of code my plugin i plugin descriptor descriptor code should be changed to code my plugin code and call code super code instead of code super descriptor code the code my plugin i plugin descriptor descriptor code constructor is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in or as in this case subclasses which might public abstractui plugin i plugin descriptor descriptor super descriptor iplugindescriptor abstractuiplugin myplugin iplugindescriptor myplugin myplugin iplugindescriptor abstractuiplugin iplugindescriptor creates an abstract ui plug in runtime object p plug in runtime classes are code bundle activators code and so must have an default constructor this method is called by the runtime when the associated bundle is being activated p for more details see code plugin code s default constructor see plugin plugin since 3 0 public abstractui plugin super bundleactivators abstractuiplugin returns a new image registry for this plugin in the registry will be used to manage images which are frequently used by the plugin in p the default implementation of this method creates an empty registry subclasses may override this method if needed p return image registry the resulting registry see get image registry protected image registry create image registry if we are in the ui thread use that if display get current null return new image registry display get current if platformui is workbench running return new image registry platformui get workbench get display invalid thread access if it is not the ui thread and the workbench is not created throw new swt error swt error thread invalid access imageregistry getimageregistry imageregistry createimageregistry getcurrent imageregistry getcurrent isworkbenchrunning imageregistry getworkbench getdisplay swterror error_thread_invalid_access returns the dialog settings for this ui plug in the dialog settings is used to hold persistent state data for the various wizards and dialogs of this plug in in the context of a workbench p if an error occurs reading the dialog store an empty one is quietly created and returned p p subclasses may override this method but are not expected to p return the dialog settings public i dialog settings get dialog settings if dialog settings null load dialog settings return dialog settings idialogsettings getdialogsettings dialogsettings loaddialogsettings dialogsettings returns the image registry for this ui plug in p the image registry contains the images used by this plug in that are very frequently used and so need to be globally shared within the plug in since many o ss have a severe limit on the number of images that can be in memory at any given time a plug in should only keep a small number of images in their registry p subclasses should reimplement code initialize image registry code if they have custom graphic images to load p p subclasses may override this method but are not expected to p return the image registry public image registry get image registry if image registry null image registry create image registry initialize image registry image registry return image registry oss initializeimageregistry imageregistry getimageregistry imageregistry imageregistry createimageregistry initializeimageregistry imageregistry imageregistry returns the preference store for this ui plug in this preference store is used to hold persistent settings for this plug in in the context of a workbench some of these settings will be user controlled whereas others may be internal setting that are never exposed to the user p if an error occurs reading the preference store an empty preference store is quietly created initialized with defaults and returned p p strong note strong as of eclipse 3 1 this method is no longer referring to the core runtime compatibility layer and so plug ins relying on plugin initialize default preferences will have to access the compatibility layer themselves p return the preference store public i preference store get preference store create the preference store lazily if preference store null preference store new scoped preference store new instance scope get bundle get symbolic name return preference store initializedefaultpreferences ipreferencestore getpreferencestore preferencestore preferencestore scopedpreferencestore instancescope getbundle getsymbolicname preferencestore returns the platform ui workbench p this method exists as a convenience for plugin implementors the workbench can also be accessed by invoking code platformui get workbench code p return i workbench the workbench for this plug in public i workbench get workbench return platformui get workbench getworkbench iworkbench iworkbench getworkbench getworkbench initializes a preference store with default preference values for this plug in p this method is called after the preference store is initially loaded default values are never stored in preference stores p p the default implementation of this method does nothing subclasses should reimplement this method if the plug in has any preferences p p a subclass may reimplement this method to set default values for the preference store using j face api this is the older way of initializing default values if this method is reimplemented do not override code initialize default plugin preferences code p param store the preference store to fill deprecated this is only called if the runtime compatibility layer is present see link initialize default plugin preferences protected void initialize default preferences i preference store store spec ed to do nothing jface initializedefaultpluginpreferences initializedefaultpluginpreferences initializedefaultpreferences ipreferencestore the code abstractui plugin code implementation of this code plugin code method forwards to code initialize default preferences i preference store code p a subclass may reimplement this method to set default values for the core runtime preference store in the standard way this is the recommended way to do this the older code initialize default preferences i preference store code method serves a similar purpose if this method is reimplemented do not send super and do not override code initialize default preferences i preference store code p deprecated this is only called if the runtime compatibility layer is present see the deprecated comment in link plugin initialize default plugin preferences see initialize default preferences since 2 0 protected void initialize default plugin preferences n b by the time this method is called the plug in has a core runtime preference store no default values call load preference store only for backwards compatibility with eclipse 1 0 load preference store call initialize default preferences only for backwards compatibility with eclipse 1 0 initialize default preferences get preference store abstractuiplugin initializedefaultpreferences ipreferencestore initializedefaultpreferences ipreferencestore initializedefaultpreferences ipreferencestore initializedefaultpluginpreferences initializedefaultpreferences initializedefaultpluginpreferences loadpreferencestore loadpreferencestore initializedefaultpreferences initializedefaultpreferences getpreferencestore initializes an image registry with images which are frequently used by the plugin p the image registry contains the images used by this plug in that are very frequently used and so need to be globally shared within the plug in since many o ss have a severe limit on the number of images that can be in memory at any given time each plug in should only keep a small number of images in its registry p p implementors should create a j face image descriptor for each frequently used image the descriptors describe how to create find the image should it be needed the image described by the descriptor is not actually allocated until someone retrieves it p p subclasses may override this method to fill the image registry p param reg the registry to initalize see get image registry protected void initialize image registry image registry reg spec ed to do nothing oss jface getimageregistry initializeimageregistry imageregistry loads the dialog settings for this plug in the default implementation first looks for a standard named file in the plug in s read write state area if no such file exists the plug in s install directory is checked to see if one was installed with some default settings if no file is found in either place a new empty dialog settings is created if a problem occurs an empty settings is silently used p this framework method may be overridden although this is typically unnecessary p protected void load dialog settings dialog settings new dialog settings workbench non nls 1 bug 69387 the instance area should not be created in the call to get state location if data none or data no default was used i path data location get state location or null if data location null try r w state area in the local file system string read write path data location append fn dialog settings toos string file settings file new file read write path if settings file exists try dialog settings load read write path catch io exception e load failed so ensure we have an empty settings dialog settings new dialog settings workbench non nls 1 return otherwise look for bundle specific dialog settings url dsurl bundle utility find get bundle fn dialog settings if dsurl null return input stream is null try is dsurl open stream buffered reader reader new buffered reader new input stream reader is utf 8 non nls 1 dialog settings load reader catch io exception e load failed so ensure we have an empty settings dialog settings new dialog settings workbench non nls 1 finally try if is null is close catch io exception e do nothing loaddialogsettings dialogsettings dialogsettings getstatelocation nodefault ipath datalocation getstatelocationornull datalocation readwritepath datalocation fn_dialog_settings toosstring settingsfile readwritepath settingsfile dialogsettings readwritepath ioexception dialogsettings dialogsettings bundleutility getbundle fn_dialog_settings inputstream openstream bufferedreader bufferedreader inputstreamreader dialogsettings ioexception dialogsettings dialogsettings ioexception loads the preference store for this plug in the default implementation looks for a standard named file in the plug in s read write state area if no file is found or a problem occurs a new empty preference store is silently created p this framework method may be overridden although this is typically unnecessary p deprecated as of eclipse 2 0 a basic preference store exists for all plug ins this method now exists only for backwards compatibility it is called as the plug in s preference store is being initialized the plug ins preferences are loaded from the file regardless of what this method does protected void load preference store do nothing by default loadpreferencestore refreshes the actions for the plugin this method is called from code startup code p this framework method may be overridden although this is typically unnecessary p protected void refresh plugin actions if the workbench is not started yet or is no longer running do nothing if platformui is workbench running return startup is not guaranteed to be called in the ui thread but refresh plugin actions must run in the ui thread so use async exec see bug 6623 for more details display get default async exec new runnable public void run w win plugin action refresh action list refreshpluginactions isworkbenchrunning refreshpluginactions asyncexec getdefault asyncexec wwinpluginaction refreshactionlist so use async exec see bug 6623 for more details display get default async exec new runnable public void run w win plugin action refresh action list asyncexec getdefault asyncexec wwinpluginaction refreshactionlist saves this plug in s dialog settings any problems which arise are silently ignored protected void save dialog settings if dialog settings null return try i path path get state location or null if path null return string read write path path append fn dialog settings toos string dialog settings save read write path catch io exception e spec ed to ignore problems catch illegal state exception e spec ed to ignore problems savedialogsettings dialogsettings ipath getstatelocationornull readwritepath fn_dialog_settings toosstring dialogsettings readwritepath ioexception illegalstateexception saves this plug in s preference store any problems which arise are silently ignored see plugin save plugin preferences deprecated as of eclipse 2 0 preferences exist for all plug ins the equivalent of this method is code plugin save plugin preferences code this method now calls code save plugin preferences code and exists only for backwards compatibility protected void save preference store save plugin preferences savepluginpreferences savepluginpreferences savepluginpreferences savepreferencestore savepluginpreferences the code abstractui plugin code implementation of this code plugin code method does nothing subclasses may extend this method but must send super first p warning plug ins may not be started in the ui thread the code startup code method should not assume that its code runs in the ui thread otherwise swt thread exceptions may occur on startup deprecated in eclipse 3 0 code startup code has been replaced by link plugin start bundle context context implementations of code startup code should be changed to extend code start bundle context context code and call code super start context code instead of code super startup code like code super startup code code super stop context code must be called as the very first thing the code startup code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in in contrast the code start code method is always called public void startup throws core exception this method no longer does anything the code that used to be here in 2 1 has moved to start bundle context super startup abstractuiplugin bundlecontext bundlecontext coreexception bundlecontext the code abstractui plugin code implementation of this code plugin code method does nothing subclasses may extend this method but must send super first deprecated in eclipse 3 0 code shutdown code has been replaced by link plugin stop bundle context context implementations of code shutdown code should be changed to extend code stop bundle context context code and call code super stop context code instead of code super shutdown code unlike code super shutdown code code super stop context code must be called as the very b last b thing rather than as the very first thing the code shutdown code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in in contrast the code stop code method is always called public void shutdown throws core exception this method no longer does anything interesting the code that used to be here in 2 1 has moved to stop bundle context which is called regardless of whether the plug in being instantiated requires org eclipse core runtime compatibility super shutdown abstractuiplugin bundlecontext bundlecontext coreexception bundlecontext the code abstractui plugin code implementation of this code plugin code method refreshes the plug in actions subclasses may extend this method but must send super b first b inherit doc since 3 0 public void start bundle context context throws exception super start context final bundle context fc context should only attempt refresh plugin actions once the bundle has been fully started otherwise action delegates can be created while in the process of creating a triggering action delegate if ui events are processed during startup also if the start throws an exception the bundle will be shut down we don t want to have created any delegates if this happens see bug 63324 for more details bundle listener new bundle listener public void bundle changed bundle event event if event get bundle get bundle if event get type bundle event started we re getting notified that the bundle has been started make sure it s still active it may have been shut down between the time this event was queued and now if get bundle get state bundle active refresh plugin actions fc remove bundle listener this context add bundle listener bundle listener bundle listener is removed in stop bundle context abstractuiplugin inheritdoc bundlecontext bundlecontext refreshpluginactions bundlelistener bundlelistener bundlechanged bundleevent getbundle getbundle gettype bundleevent getbundle getstate refreshpluginactions removebundlelistener addbundlelistener bundlelistener bundlelistener bundlecontext bundle listener new bundle listener public void bundle changed bundle event event if event get bundle get bundle if event get type bundle event started we re getting notified that the bundle has been started make sure it s still active it may have been shut down between the time this event was queued and now if get bundle get state bundle active refresh plugin actions fc remove bundle listener this bundlelistener bundlelistener bundlechanged bundleevent getbundle getbundle gettype bundleevent getbundle getstate refreshpluginactions removebundlelistener the code abstractui plugin code implementation of this code plugin code method saves this plug in s preference and dialog stores and shuts down its image registry if they are in use subclasses may extend this method but must send super b last b a try finally statement should be used where necessary to ensure that code super shutdown code is always done inherit doc since 3 0 public void stop bundle context context throws exception try if bundle listener null context remove bundle listener bundle listener save dialog settings save preference store preference store null image registry null finally super stop context abstractuiplugin inheritdoc bundlecontext bundlelistener removebundlelistener bundlelistener savedialogsettings savepreferencestore preferencestore imageregistry creates and returns a new image descriptor for an image file located within the specified plug in p this is a convenience method that simply locates the image file in within the plug in no image registries are involved the path is relative to the root of the plug in and takes into account files coming from plug in fragments the path may include arg elements however the path must not have a leading or path separator clients should use a path like icons mysample gif rather than icons mysample gif or icons mysample gif p param plugin id the id of the plug in containing the image file code null code is returned if the plug in does not exist param image file path the relative path of the image file relative to the root of the plug in the path must be legal return an image descriptor or code null code if no image could be found since 3 0 public static image descriptor image descriptor from plugin string plugin id string image file path if plugin id null image file path null throw new illegal argument exception if the bundle is not ready then there is no image bundle bundle platform get bundle plugin id if bundle utility is ready bundle return null look for the image this will check both the plugin and fragment folders url full path string bundle utility find bundle image file path if full path string null try full path string new url image file path catch malformedurl exception e return null if full path string null return null return image descriptor create fromurl full path string pluginid imagefilepath imagedescriptor imagedescriptorfromplugin pluginid imagefilepath pluginid imagefilepath illegalargumentexception getbundle pluginid bundleutility isready fullpathstring bundleutility imagefilepath fullpathstring fullpathstring imagefilepath malformedurlexception fullpathstring imagedescriptor createfromurl fullpathstring for internal workbench use only returns the path to a location in the file system that can be used to persist restore state between workbench invocations if the location did not exist prior to this call it will be created returns code null code if no such location is available return path to a location in the file system where this plug in can persist data between sessions or code null code if no such location is available since 3 1 private i path get state location or null try return get state location catch illegal state exception e this occurs if data none is explicitly specified so ignore this silently is this ok see bug 85071 return null ipath getstatelocationornull getstatelocation illegalstateexception creates an abstract ui plug in runtime object for the given plug in descriptor p note that instances of plug in runtime classes are automatically created by the platform in the course of plug in activation p param descriptor the plug in descriptor see plugin plugin org eclipse core runtime i plugin descriptor descriptor deprecated in eclipse 3 0 this constructor has been replaced by link abstractui plugin implementations of code my plugin i plugin descriptor descriptor code should be changed to code my plugin code and call code super code instead of code super descriptor code the code my plugin i plugin descriptor descriptor code constructor is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in or as in this case subclasses which might public abstractui plugin i plugin descriptor descriptor super descriptor iplugindescriptor abstractuiplugin myplugin iplugindescriptor myplugin myplugin iplugindescriptor abstractuiplugin iplugindescriptor creates an abstract ui plug in runtime object p plug in runtime classes are code bundle activators code and so must have an default constructor this method is called by the runtime when the associated bundle is being activated p for more details see code plugin code s default constructor see plugin plugin since 3 0 public abstractui plugin super bundleactivators abstractuiplugin returns a new image registry for this plugin in the registry will be used to manage images which are frequently used by the plugin in p the default implementation of this method creates an empty registry subclasses may override this method if needed p return image registry the resulting registry see get image registry protected image registry create image registry if we are in the ui thread use that if display get current null return new image registry display get current if platformui is workbench running return new image registry platformui get workbench get display invalid thread access if it is not the ui thread and the workbench is not created throw new swt error swt error thread invalid access imageregistry getimageregistry imageregistry createimageregistry getcurrent imageregistry getcurrent isworkbenchrunning imageregistry getworkbench getdisplay swterror error_thread_invalid_access returns the dialog settings for this ui plug in the dialog settings is used to hold persistent state data for the various wizards and dialogs of this plug in in the context of a workbench p if an error occurs reading the dialog store an empty one is quietly created and returned p p subclasses may override this method but are not expected to p return the dialog settings public i dialog settings get dialog settings if dialog settings null load dialog settings return dialog settings idialogsettings getdialogsettings dialogsettings loaddialogsettings dialogsettings returns the image registry for this ui plug in p the image registry contains the images used by this plug in that are very frequently used and so need to be globally shared within the plug in since many o ss have a severe limit on the number of images that can be in memory at any given time a plug in should only keep a small number of images in their registry p subclasses should reimplement code initialize image registry code if they have custom graphic images to load p p subclasses may override this method but are not expected to p return the image registry public image registry get image registry if image registry null image registry create image registry initialize image registry image registry return image registry oss initializeimageregistry imageregistry getimageregistry imageregistry imageregistry createimageregistry initializeimageregistry imageregistry imageregistry returns the preference store for this ui plug in this preference store is used to hold persistent settings for this plug in in the context of a workbench some of these settings will be user controlled whereas others may be internal setting that are never exposed to the user p if an error occurs reading the preference store an empty preference store is quietly created initialized with defaults and returned p p strong note strong as of eclipse 3 1 this method is no longer referring to the core runtime compatibility layer and so plug ins relying on plugin initialize default preferences will have to access the compatibility layer themselves p return the preference store public i preference store get preference store create the preference store lazily if preference store null preference store new scoped preference store new instance scope get bundle get symbolic name return preference store initializedefaultpreferences ipreferencestore getpreferencestore preferencestore preferencestore scopedpreferencestore instancescope getbundle getsymbolicname preferencestore returns the platform ui workbench p this method exists as a convenience for plugin implementors the workbench can also be accessed by invoking code platformui get workbench code p return i workbench the workbench for this plug in public i workbench get workbench return platformui get workbench getworkbench iworkbench iworkbench getworkbench getworkbench initializes a preference store with default preference values for this plug in p this method is called after the preference store is initially loaded default values are never stored in preference stores p p the default implementation of this method does nothing subclasses should reimplement this method if the plug in has any preferences p p a subclass may reimplement this method to set default values for the preference store using j face api this is the older way of initializing default values if this method is reimplemented do not override code initialize default plugin preferences code p param store the preference store to fill deprecated this is only called if the runtime compatibility layer is present see link initialize default plugin preferences protected void initialize default preferences i preference store store spec ed to do nothing jface initializedefaultpluginpreferences initializedefaultpluginpreferences initializedefaultpreferences ipreferencestore the code abstractui plugin code implementation of this code plugin code method forwards to code initialize default preferences i preference store code p a subclass may reimplement this method to set default values for the core runtime preference store in the standard way this is the recommended way to do this the older code initialize default preferences i preference store code method serves a similar purpose if this method is reimplemented do not send super and do not override code initialize default preferences i preference store code p deprecated this is only called if the runtime compatibility layer is present see the deprecated comment in link plugin initialize default plugin preferences see initialize default preferences since 2 0 protected void initialize default plugin preferences n b by the time this method is called the plug in has a core runtime preference store no default values call load preference store only for backwards compatibility with eclipse 1 0 load preference store call initialize default preferences only for backwards compatibility with eclipse 1 0 initialize default preferences get preference store abstractuiplugin initializedefaultpreferences ipreferencestore initializedefaultpreferences ipreferencestore initializedefaultpreferences ipreferencestore initializedefaultpluginpreferences initializedefaultpreferences initializedefaultpluginpreferences loadpreferencestore loadpreferencestore initializedefaultpreferences initializedefaultpreferences getpreferencestore initializes an image registry with images which are frequently used by the plugin p the image registry contains the images used by this plug in that are very frequently used and so need to be globally shared within the plug in since many o ss have a severe limit on the number of images that can be in memory at any given time each plug in should only keep a small number of images in its registry p p implementors should create a j face image descriptor for each frequently used image the descriptors describe how to create find the image should it be needed the image described by the descriptor is not actually allocated until someone retrieves it p p subclasses may override this method to fill the image registry p param reg the registry to initalize see get image registry protected void initialize image registry image registry reg spec ed to do nothing oss jface getimageregistry initializeimageregistry imageregistry loads the dialog settings for this plug in the default implementation first looks for a standard named file in the plug in s read write state area if no such file exists the plug in s install directory is checked to see if one was installed with some default settings if no file is found in either place a new empty dialog settings is created if a problem occurs an empty settings is silently used p this framework method may be overridden although this is typically unnecessary p protected void load dialog settings dialog settings new dialog settings workbench non nls 1 bug 69387 the instance area should not be created in the call to get state location if data none or data no default was used i path data location get state location or null if data location null try r w state area in the local file system string read write path data location append fn dialog settings toos string file settings file new file read write path if settings file exists try dialog settings load read write path catch io exception e load failed so ensure we have an empty settings dialog settings new dialog settings workbench non nls 1 return otherwise look for bundle specific dialog settings url dsurl bundle utility find get bundle fn dialog settings if dsurl null return input stream is null try is dsurl open stream buffered reader reader new buffered reader new input stream reader is utf 8 non nls 1 dialog settings load reader catch io exception e load failed so ensure we have an empty settings dialog settings new dialog settings workbench non nls 1 finally try if is null is close catch io exception e do nothing loaddialogsettings dialogsettings dialogsettings getstatelocation nodefault ipath datalocation getstatelocationornull datalocation readwritepath datalocation fn_dialog_settings toosstring settingsfile readwritepath settingsfile dialogsettings readwritepath ioexception dialogsettings dialogsettings bundleutility getbundle fn_dialog_settings inputstream openstream bufferedreader bufferedreader inputstreamreader dialogsettings ioexception dialogsettings dialogsettings ioexception loads the preference store for this plug in the default implementation looks for a standard named file in the plug in s read write state area if no file is found or a problem occurs a new empty preference store is silently created p this framework method may be overridden although this is typically unnecessary p deprecated as of eclipse 2 0 a basic preference store exists for all plug ins this method now exists only for backwards compatibility it is called as the plug in s preference store is being initialized the plug ins preferences are loaded from the file regardless of what this method does protected void load preference store do nothing by default loadpreferencestore refreshes the actions for the plugin this method is called from code startup code p this framework method may be overridden although this is typically unnecessary p protected void refresh plugin actions if the workbench is not started yet or is no longer running do nothing if platformui is workbench running return startup is not guaranteed to be called in the ui thread but refresh plugin actions must run in the ui thread so use async exec see bug 6623 for more details display get default async exec new runnable public void run w win plugin action refresh action list refreshpluginactions isworkbenchrunning refreshpluginactions asyncexec getdefault asyncexec wwinpluginaction refreshactionlist so use async exec see bug 6623 for more details display get default async exec new runnable public void run w win plugin action refresh action list asyncexec getdefault asyncexec wwinpluginaction refreshactionlist saves this plug in s dialog settings any problems which arise are silently ignored protected void save dialog settings if dialog settings null return try i path path get state location or null if path null return string read write path path append fn dialog settings toos string dialog settings save read write path catch io exception e spec ed to ignore problems catch illegal state exception e spec ed to ignore problems savedialogsettings dialogsettings ipath getstatelocationornull readwritepath fn_dialog_settings toosstring dialogsettings readwritepath ioexception illegalstateexception saves this plug in s preference store any problems which arise are silently ignored see plugin save plugin preferences deprecated as of eclipse 2 0 preferences exist for all plug ins the equivalent of this method is code plugin save plugin preferences code this method now calls code save plugin preferences code and exists only for backwards compatibility protected void save preference store save plugin preferences savepluginpreferences savepluginpreferences savepluginpreferences savepreferencestore savepluginpreferences the code abstractui plugin code implementation of this code plugin code method does nothing subclasses may extend this method but must send super first p warning plug ins may not be started in the ui thread the code startup code method should not assume that its code runs in the ui thread otherwise swt thread exceptions may occur on startup deprecated in eclipse 3 0 code startup code has been replaced by link plugin start bundle context context implementations of code startup code should be changed to extend code start bundle context context code and call code super start context code instead of code super startup code like code super startup code code super stop context code must be called as the very first thing the code startup code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in in contrast the code start code method is always called public void startup throws core exception this method no longer does anything the code that used to be here in 2 1 has moved to start bundle context super startup abstractuiplugin bundlecontext bundlecontext coreexception bundlecontext the code abstractui plugin code implementation of this code plugin code method does nothing subclasses may extend this method but must send super first deprecated in eclipse 3 0 code shutdown code has been replaced by link plugin stop bundle context context implementations of code shutdown code should be changed to extend code stop bundle context context code and call code super stop context code instead of code super shutdown code unlike code super shutdown code code super stop context code must be called as the very b last b thing rather than as the very first thing the code shutdown code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in in contrast the code stop code method is always called public void shutdown throws core exception this method no longer does anything interesting the code that used to be here in 2 1 has moved to stop bundle context which is called regardless of whether the plug in being instantiated requires org eclipse core runtime compatibility super shutdown abstractuiplugin bundlecontext bundlecontext coreexception bundlecontext the code abstractui plugin code implementation of this code plugin code method refreshes the plug in actions subclasses may extend this method but must send super b first b inherit doc since 3 0 public void start bundle context context throws exception super start context final bundle context fc context should only attempt refresh plugin actions once the bundle has been fully started otherwise action delegates can be created while in the process of creating a triggering action delegate if ui events are processed during startup also if the start throws an exception the bundle will be shut down we don t want to have created any delegates if this happens see bug 63324 for more details bundle listener new bundle listener public void bundle changed bundle event event if event get bundle get bundle if event get type bundle event started we re getting notified that the bundle has been started make sure it s still active it may have been shut down between the time this event was queued and now if get bundle get state bundle active refresh plugin actions fc remove bundle listener this context add bundle listener bundle listener bundle listener is removed in stop bundle context abstractuiplugin inheritdoc bundlecontext bundlecontext refreshpluginactions bundlelistener bundlelistener bundlechanged bundleevent getbundle getbundle gettype bundleevent getbundle getstate refreshpluginactions removebundlelistener addbundlelistener bundlelistener bundlelistener bundlecontext bundle listener new bundle listener public void bundle changed bundle event event if event get bundle get bundle if event get type bundle event started we re getting notified that the bundle has been started make sure it s still active it may have been shut down between the time this event was queued and now if get bundle get state bundle active refresh plugin actions fc remove bundle listener this bundlelistener bundlelistener bundlechanged bundleevent getbundle getbundle gettype bundleevent getbundle getstate refreshpluginactions removebundlelistener the code abstractui plugin code implementation of this code plugin code method saves this plug in s preference and dialog stores and shuts down its image registry if they are in use subclasses may extend this method but must send super b last b a try finally statement should be used where necessary to ensure that code super shutdown code is always done inherit doc since 3 0 public void stop bundle context context throws exception try if bundle listener null context remove bundle listener bundle listener save dialog settings save preference store preference store null image registry null finally super stop context abstractuiplugin inheritdoc bundlecontext bundlelistener removebundlelistener bundlelistener savedialogsettings savepreferencestore preferencestore imageregistry creates and returns a new image descriptor for an image file located within the specified plug in p this is a convenience method that simply locates the image file in within the plug in no image registries are involved the path is relative to the root of the plug in and takes into account files coming from plug in fragments the path may include arg elements however the path must not have a leading or path separator clients should use a path like icons mysample gif rather than icons mysample gif or icons mysample gif p param plugin id the id of the plug in containing the image file code null code is returned if the plug in does not exist param image file path the relative path of the image file relative to the root of the plug in the path must be legal return an image descriptor or code null code if no image could be found since 3 0 public static image descriptor image descriptor from plugin string plugin id string image file path if plugin id null image file path null throw new illegal argument exception if the bundle is not ready then there is no image bundle bundle platform get bundle plugin id if bundle utility is ready bundle return null look for the image this will check both the plugin and fragment folders url full path string bundle utility find bundle image file path if full path string null try full path string new url image file path catch malformedurl exception e return null if full path string null return null return image descriptor create fromurl full path string pluginid imagefilepath imagedescriptor imagedescriptorfromplugin pluginid imagefilepath pluginid imagefilepath illegalargumentexception getbundle pluginid bundleutility isready fullpathstring bundleutility imagefilepath fullpathstring fullpathstring imagefilepath malformedurlexception fullpathstring imagedescriptor createfromurl fullpathstring for internal workbench use only returns the path to a location in the file system that can be used to persist restore state between workbench invocations if the location did not exist prior to this call it will be created returns code null code if no such location is available return path to a location in the file system where this plug in can persist data between sessions or code null code if no such location is available since 3 1 private i path get state location or null try return get state location catch illegal state exception e this occurs if data none is explicitly specified so ignore this silently is this ok see bug 85071 return null ipath getstatelocationornull getstatelocation illegalstateexception creates an abstract ui plug in runtime object for the given plug in descriptor p note that instances of plug in runtime classes are automatically created by the platform in the course of plug in activation p param descriptor the plug in descriptor see plugin plugin org eclipse core runtime i plugin descriptor descriptor deprecated in eclipse 3 0 this constructor has been replaced by link abstractui plugin implementations of code my plugin i plugin descriptor descriptor code should be changed to code my plugin code and call code super code instead of code super descriptor code the code my plugin i plugin descriptor descriptor code constructor is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in or as in this case subclasses which might public abstractui plugin i plugin descriptor descriptor super descriptor iplugindescriptor abstractuiplugin myplugin iplugindescriptor myplugin myplugin iplugindescriptor abstractuiplugin iplugindescriptor creates an abstract ui plug in runtime object p plug in runtime classes are code bundle activators code and so must have an default constructor this method is called by the runtime when the associated bundle is being activated p for more details see code plugin code s default constructor see plugin plugin since 3 0 public abstractui plugin super bundleactivators abstractuiplugin returns a new image registry for this plugin in the registry will be used to manage images which are frequently used by the plugin in p the default implementation of this method creates an empty registry subclasses may override this method if needed p return image registry the resulting registry see get image registry protected image registry create image registry if we are in the ui thread use that if display get current null return new image registry display get current if platformui is workbench running return new image registry platformui get workbench get display invalid thread access if it is not the ui thread and the workbench is not created throw new swt error swt error thread invalid access imageregistry getimageregistry imageregistry createimageregistry getcurrent imageregistry getcurrent isworkbenchrunning imageregistry getworkbench getdisplay swterror error_thread_invalid_access returns the dialog settings for this ui plug in the dialog settings is used to hold persistent state data for the various wizards and dialogs of this plug in in the context of a workbench p if an error occurs reading the dialog store an empty one is quietly created and returned p p subclasses may override this method but are not expected to p return the dialog settings public i dialog settings get dialog settings if dialog settings null load dialog settings return dialog settings idialogsettings getdialogsettings dialogsettings loaddialogsettings dialogsettings returns the image registry for this ui plug in p the image registry contains the images used by this plug in that are very frequently used and so need to be globally shared within the plug in since many o ss have a severe limit on the number of images that can be in memory at any given time a plug in should only keep a small number of images in their registry p subclasses should reimplement code initialize image registry code if they have custom graphic images to load p p subclasses may override this method but are not expected to p return the image registry public image registry get image registry if image registry null image registry create image registry initialize image registry image registry return image registry oss initializeimageregistry imageregistry getimageregistry imageregistry imageregistry createimageregistry initializeimageregistry imageregistry imageregistry returns the preference store for this ui plug in this preference store is used to hold persistent settings for this plug in in the context of a workbench some of these settings will be user controlled whereas others may be internal setting that are never exposed to the user p if an error occurs reading the preference store an empty preference store is quietly created initialized with defaults and returned p p strong note strong as of eclipse 3 1 this method is no longer referring to the core runtime compatibility layer and so plug ins relying on plugin initialize default preferences will have to access the compatibility layer themselves p return the preference store public i preference store get preference store create the preference store lazily if preference store null preference store new scoped preference store new instance scope get bundle get symbolic name return preference store initializedefaultpreferences ipreferencestore getpreferencestore preferencestore preferencestore scopedpreferencestore instancescope getbundle getsymbolicname preferencestore returns the platform ui workbench p this method exists as a convenience for plugin implementors the workbench can also be accessed by invoking code platformui get workbench code p return i workbench the workbench for this plug in public i workbench get workbench return platformui get workbench getworkbench iworkbench iworkbench getworkbench getworkbench initializes a preference store with default preference values for this plug in p this method is called after the preference store is initially loaded default values are never stored in preference stores p p the default implementation of this method does nothing subclasses should reimplement this method if the plug in has any preferences p p a subclass may reimplement this method to set default values for the preference store using j face api this is the older way of initializing default values if this method is reimplemented do not override code initialize default plugin preferences code p param store the preference store to fill deprecated this is only called if the runtime compatibility layer is present see link initialize default plugin preferences protected void initialize default preferences i preference store store spec ed to do nothing jface initializedefaultpluginpreferences initializedefaultpluginpreferences initializedefaultpreferences ipreferencestore the code abstractui plugin code implementation of this code plugin code method forwards to code initialize default preferences i preference store code p a subclass may reimplement this method to set default values for the core runtime preference store in the standard way this is the recommended way to do this the older code initialize default preferences i preference store code method serves a similar purpose if this method is reimplemented do not send super and do not override code initialize default preferences i preference store code p deprecated this is only called if the runtime compatibility layer is present see the deprecated comment in link plugin initialize default plugin preferences see initialize default preferences since 2 0 protected void initialize default plugin preferences n b by the time this method is called the plug in has a core runtime preference store no default values call load preference store only for backwards compatibility with eclipse 1 0 load preference store call initialize default preferences only for backwards compatibility with eclipse 1 0 initialize default preferences get preference store abstractuiplugin initializedefaultpreferences ipreferencestore initializedefaultpreferences ipreferencestore initializedefaultpreferences ipreferencestore initializedefaultpluginpreferences initializedefaultpreferences initializedefaultpluginpreferences loadpreferencestore loadpreferencestore initializedefaultpreferences initializedefaultpreferences getpreferencestore initializes an image registry with images which are frequently used by the plugin p the image registry contains the images used by this plug in that are very frequently used and so need to be globally shared within the plug in since many o ss have a severe limit on the number of images that can be in memory at any given time each plug in should only keep a small number of images in its registry p p implementors should create a j face image descriptor for each frequently used image the descriptors describe how to create find the image should it be needed the image described by the descriptor is not actually allocated until someone retrieves it p p subclasses may override this method to fill the image registry p param reg the registry to initalize see get image registry protected void initialize image registry image registry reg spec ed to do nothing oss jface getimageregistry initializeimageregistry imageregistry loads the dialog settings for this plug in the default implementation first looks for a standard named file in the plug in s read write state area if no such file exists the plug in s install directory is checked to see if one was installed with some default settings if no file is found in either place a new empty dialog settings is created if a problem occurs an empty settings is silently used p this framework method may be overridden although this is typically unnecessary p protected void load dialog settings dialog settings new dialog settings workbench non nls 1 bug 69387 the instance area should not be created in the call to get state location if data none or data no default was used i path data location get state location or null if data location null try r w state area in the local file system string read write path data location append fn dialog settings toos string file settings file new file read write path if settings file exists try dialog settings load read write path catch io exception e load failed so ensure we have an empty settings dialog settings new dialog settings workbench non nls 1 return otherwise look for bundle specific dialog settings url dsurl bundle utility find get bundle fn dialog settings if dsurl null return input stream is null try is dsurl open stream buffered reader reader new buffered reader new input stream reader is utf 8 non nls 1 dialog settings load reader catch io exception e load failed so ensure we have an empty settings dialog settings new dialog settings workbench non nls 1 finally try if is null is close catch io exception e do nothing loaddialogsettings dialogsettings dialogsettings getstatelocation nodefault ipath datalocation getstatelocationornull datalocation readwritepath datalocation fn_dialog_settings toosstring settingsfile readwritepath settingsfile dialogsettings readwritepath ioexception dialogsettings dialogsettings bundleutility getbundle fn_dialog_settings inputstream openstream bufferedreader bufferedreader inputstreamreader dialogsettings ioexception dialogsettings dialogsettings ioexception loads the preference store for this plug in the default implementation looks for a standard named file in the plug in s read write state area if no file is found or a problem occurs a new empty preference store is silently created p this framework method may be overridden although this is typically unnecessary p deprecated as of eclipse 2 0 a basic preference store exists for all plug ins this method now exists only for backwards compatibility it is called as the plug in s preference store is being initialized the plug ins preferences are loaded from the file regardless of what this method does protected void load preference store do nothing by default loadpreferencestore refreshes the actions for the plugin this method is called from code startup code p this framework method may be overridden although this is typically unnecessary p protected void refresh plugin actions if the workbench is not started yet or is no longer running do nothing if platformui is workbench running return startup is not guaranteed to be called in the ui thread but refresh plugin actions must run in the ui thread so use async exec see bug 6623 for more details display get default async exec new runnable public void run w win plugin action refresh action list refreshpluginactions isworkbenchrunning refreshpluginactions asyncexec getdefault asyncexec wwinpluginaction refreshactionlist so use async exec see bug 6623 for more details display get default async exec new runnable public void run w win plugin action refresh action list asyncexec getdefault asyncexec wwinpluginaction refreshactionlist saves this plug in s dialog settings any problems which arise are silently ignored protected void save dialog settings if dialog settings null return try i path path get state location or null if path null return string read write path path append fn dialog settings toos string dialog settings save read write path catch io exception e spec ed to ignore problems catch illegal state exception e spec ed to ignore problems savedialogsettings dialogsettings ipath getstatelocationornull readwritepath fn_dialog_settings toosstring dialogsettings readwritepath ioexception illegalstateexception saves this plug in s preference store any problems which arise are silently ignored see plugin save plugin preferences deprecated as of eclipse 2 0 preferences exist for all plug ins the equivalent of this method is code plugin save plugin preferences code this method now calls code save plugin preferences code and exists only for backwards compatibility protected void save preference store save plugin preferences savepluginpreferences savepluginpreferences savepluginpreferences savepreferencestore savepluginpreferences the code abstractui plugin code implementation of this code plugin code method does nothing subclasses may extend this method but must send super first p warning plug ins may not be started in the ui thread the code startup code method should not assume that its code runs in the ui thread otherwise swt thread exceptions may occur on startup deprecated in eclipse 3 0 code startup code has been replaced by link plugin start bundle context context implementations of code startup code should be changed to extend code start bundle context context code and call code super start context code instead of code super startup code like code super startup code code super stop context code must be called as the very first thing the code startup code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in in contrast the code start code method is always called public void startup throws core exception this method no longer does anything the code that used to be here in 2 1 has moved to start bundle context super startup abstractuiplugin bundlecontext bundlecontext coreexception bundlecontext the code abstractui plugin code implementation of this code plugin code method does nothing subclasses may extend this method but must send super first deprecated in eclipse 3 0 code shutdown code has been replaced by link plugin stop bundle context context implementations of code shutdown code should be changed to extend code stop bundle context context code and call code super stop context code instead of code super shutdown code unlike code super shutdown code code super stop context code must be called as the very b last b thing rather than as the very first thing the code shutdown code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in in contrast the code stop code method is always called public void shutdown throws core exception this method no longer does anything interesting the code that used to be here in 2 1 has moved to stop bundle context which is called regardless of whether the plug in being instantiated requires org eclipse core runtime compatibility super shutdown abstractuiplugin bundlecontext bundlecontext coreexception bundlecontext the code abstractui plugin code implementation of this code plugin code method refreshes the plug in actions subclasses may extend this method but must send super b first b inherit doc since 3 0 public void start bundle context context throws exception super start context final bundle context fc context should only attempt refresh plugin actions once the bundle has been fully started otherwise action delegates can be created while in the process of creating a triggering action delegate if ui events are processed during startup also if the start throws an exception the bundle will be shut down we don t want to have created any delegates if this happens see bug 63324 for more details bundle listener new bundle listener public void bundle changed bundle event event if event get bundle get bundle if event get type bundle event started we re getting notified that the bundle has been started make sure it s still active it may have been shut down between the time this event was queued and now if get bundle get state bundle active refresh plugin actions fc remove bundle listener this context add bundle listener bundle listener bundle listener is removed in stop bundle context abstractuiplugin inheritdoc bundlecontext bundlecontext refreshpluginactions bundlelistener bundlelistener bundlechanged bundleevent getbundle getbundle gettype bundleevent getbundle getstate refreshpluginactions removebundlelistener addbundlelistener bundlelistener bundlelistener bundlecontext bundle listener new bundle listener public void bundle changed bundle event event if event get bundle get bundle if event get type bundle event started we re getting notified that the bundle has been started make sure it s still active it may have been shut down between the time this event was queued and now if get bundle get state bundle active refresh plugin actions fc remove bundle listener this bundlelistener bundlelistener bundlechanged bundleevent getbundle getbundle gettype bundleevent getbundle getstate refreshpluginactions removebundlelistener the code abstractui plugin code implementation of this code plugin code method saves this plug in s preference and dialog stores and shuts down its image registry if they are in use subclasses may extend this method but must send super b last b a try finally statement should be used where necessary to ensure that code super shutdown code is always done inherit doc since 3 0 public void stop bundle context context throws exception try if bundle listener null context remove bundle listener bundle listener save dialog settings save preference store preference store null image registry null finally super stop context abstractuiplugin inheritdoc bundlecontext bundlelistener removebundlelistener bundlelistener savedialogsettings savepreferencestore preferencestore imageregistry creates and returns a new image descriptor for an image file located within the specified plug in p this is a convenience method that simply locates the image file in within the plug in no image registries are involved the path is relative to the root of the plug in and takes into account files coming from plug in fragments the path may include arg elements however the path must not have a leading or path separator clients should use a path like icons mysample gif rather than icons mysample gif or icons mysample gif p param plugin id the id of the plug in containing the image file code null code is returned if the plug in does not exist param image file path the relative path of the image file relative to the root of the plug in the path must be legal return an image descriptor or code null code if no image could be found since 3 0 public static image descriptor image descriptor from plugin string plugin id string image file path if plugin id null image file path null throw new illegal argument exception if the bundle is not ready then there is no image bundle bundle platform get bundle plugin id if bundle utility is ready bundle return null look for the image this will check both the plugin and fragment folders url full path string bundle utility find bundle image file path if full path string null try full path string new url image file path catch malformedurl exception e return null if full path string null return null return image descriptor create fromurl full path string pluginid imagefilepath imagedescriptor imagedescriptorfromplugin pluginid imagefilepath pluginid imagefilepath illegalargumentexception getbundle pluginid bundleutility isready fullpathstring bundleutility imagefilepath fullpathstring fullpathstring imagefilepath malformedurlexception fullpathstring imagedescriptor createfromurl fullpathstring for internal workbench use only returns the path to a location in the file system that can be used to persist restore state between workbench invocations if the location did not exist prior to this call it will be created returns code null code if no such location is available return path to a location in the file system where this plug in can persist data between sessions or code null code if no such location is available since 3 1 private i path get state location or null try return get state location catch illegal state exception e this occurs if data none is explicitly specified so ignore this silently is this ok see bug 85071 return null ipath getstatelocationornull getstatelocation illegalstateexception constructor public mozilla factory super mozillafactory on some o ses 0 is always returned by which command it is necessary to examine ouput to find out failure param outputs param errors return throws interrupted exception private boolean errors in output stream consumer outputs stream consumer errors try outputs join 1000 if outputs get last line null outputs get last line index of no executable in non nls 1 non nls 2 0 return true errors join 1000 if errors get last line null errors get last line index of no executable in non nls 1 non nls 2 0 return true catch interrupted exception ie ignore return false see browser factory create browser public i web browser create browser string id string location string parameters create single browser for all clients if browser instance null browser instance new mozilla browser id location return browser instance oses interruptedexception errorsinoutput streamconsumer streamconsumer getlastline getlastline indexof getlastline getlastline indexof interruptedexception browserfactory createbrowser iwebbrowser createbrowser browserinstance browserinstance mozillabrowser browserinstance public abstract class device resource descriptor creates the resource described by this descriptor since 3 1 param device the device on which to allocate the resource return the newly allocated resource not null throws device resource exception if unable to allocate the resource deviceresourcedescriptor deviceresourceexception undoes everything that was done by a previous call to create given the object that was returned by create since 3 1 param previously created object an object that was returned by an equal descriptor in a previous call to create resource previouslycreatedobject createresource public abstract class device resource descriptor creates the resource described by this descriptor since 3 1 param device the device on which to allocate the resource return the newly allocated resource not null throws device resource exception if unable to allocate the resource deviceresourcedescriptor deviceresourceexception undoes everything that was done by a previous call to create given the object that was returned by create since 3 1 param previously created object an object that was returned by an equal descriptor in a previous call to create resource previouslycreatedobject createresource public abstract class device resource descriptor creates the resource described by this descriptor since 3 1 param device the device on which to allocate the resource return the newly allocated resource not null throws device resource exception if unable to allocate the resource deviceresourcedescriptor deviceresourceexception undoes everything that was done by a previous call to create given the object that was returned by create since 3 1 param previously created object an object that was returned by an equal descriptor in a previous call to create resource previouslycreatedobject createresource public abstract class device resource descriptor creates the resource described by this descriptor since 3 1 param device the device on which to allocate the resource return the newly allocated resource not null throws device resource exception if unable to allocate the resource deviceresourcedescriptor deviceresourceexception undoes everything that was done by a previous call to create given the object that was returned by create since 3 1 param previously created object an object that was returned by an equal descriptor in a previous call to create resource previouslycreatedobject createresource public abstract class device resource descriptor creates the resource described by this descriptor since 3 1 param device the device on which to allocate the resource return the newly allocated resource not null throws device resource exception if unable to allocate the resource deviceresourcedescriptor deviceresourceexception undoes everything that was done by a previous call to create given the object that was returned by create since 3 1 param previously created object an object that was returned by an equal descriptor in a previous call to create resource previouslycreatedobject createresource public abstract class device resource descriptor creates the resource described by this descriptor since 3 1 param device the device on which to allocate the resource return the newly allocated resource not null throws device resource exception if unable to allocate the resource deviceresourcedescriptor deviceresourceexception undoes everything that was done by a previous call to create given the object that was returned by create since 3 1 param previously created object an object that was returned by an equal descriptor in a previous call to create resource previouslycreatedobject createresource public abstract class device resource descriptor creates the resource described by this descriptor since 3 1 param device the device on which to allocate the resource return the newly allocated resource not null throws device resource exception if unable to allocate the resource deviceresourcedescriptor deviceresourceexception undoes everything that was done by a previous call to create given the object that was returned by create since 3 1 param previously created object an object that was returned by an equal descriptor in a previous call to create resource previouslycreatedobject createresource public abstract class device resource descriptor creates the resource described by this descriptor since 3 1 param device the device on which to allocate the resource return the newly allocated resource not null throws device resource exception if unable to allocate the resource deviceresourcedescriptor deviceresourceexception undoes everything that was done by a previous call to create given the object that was returned by create since 3 1 param previously created object an object that was returned by an equal descriptor in a previous call to create resource previouslycreatedobject createresource public abstract class device resource descriptor creates the resource described by this descriptor since 3 1 param device the device on which to allocate the resource return the newly allocated resource not null throws device resource exception if unable to allocate the resource deviceresourcedescriptor deviceresourceexception undoes everything that was done by a previous call to create given the object that was returned by create since 3 1 param previously created object an object that was returned by an equal descriptor in a previous call to create resource previouslycreatedobject createresource public abstract class device resource descriptor creates the resource described by this descriptor since 3 1 param device the device on which to allocate the resource return the newly allocated resource not null throws device resource exception if unable to allocate the resource deviceresourcedescriptor deviceresourceexception undoes everything that was done by a previous call to create given the object that was returned by create since 3 1 param previously created object an object that was returned by an equal descriptor in a previous call to create resource previouslycreatedobject createresource public abstract class device resource descriptor creates the resource described by this descriptor since 3 1 param device the device on which to allocate the resource return the newly allocated resource not null throws device resource exception if unable to allocate the resource deviceresourcedescriptor deviceresourceexception undoes everything that was done by a previous call to create given the object that was returned by create since 3 1 param previously created object an object that was returned by an equal descriptor in a previous call to create resource previouslycreatedobject createresource public abstract class device resource descriptor creates the resource described by this descriptor since 3 1 param device the device on which to allocate the resource return the newly allocated resource not null throws device resource exception if unable to allocate the resource deviceresourcedescriptor deviceresourceexception undoes everything that was done by a previous call to create given the object that was returned by create since 3 1 param previously created object an object that was returned by an equal descriptor in a previous call to create resource previouslycreatedobject createresource public abstract class device resource descriptor creates the resource described by this descriptor since 3 1 param device the device on which to allocate the resource return the newly allocated resource not null throws device resource exception if unable to allocate the resource deviceresourcedescriptor deviceresourceexception undoes everything that was done by a previous call to create given the object that was returned by create since 3 1 param previously created object an object that was returned by an equal descriptor in a previous call to create resource previouslycreatedobject createresource public abstract class device resource descriptor creates the resource described by this descriptor since 3 1 param device the device on which to allocate the resource return the newly allocated resource not null throws device resource exception if unable to allocate the resource deviceresourcedescriptor deviceresourceexception undoes everything that was done by a previous call to create given the object that was returned by create since 3 1 param previously created object an object that was returned by an equal descriptor in a previous call to create resource previouslycreatedobject createresource public abstract class device resource descriptor creates the resource described by this descriptor since 3 1 param device the device on which to allocate the resource return the newly allocated resource not null throws device resource exception if unable to allocate the resource deviceresourcedescriptor deviceresourceexception undoes everything that was done by a previous call to create given the object that was returned by create since 3 1 param previously created object an object that was returned by an equal descriptor in a previous call to create resource previouslycreatedobject createresource public abstract class device resource descriptor creates the resource described by this descriptor since 3 1 param device the device on which to allocate the resource return the newly allocated resource not null throws device resource exception if unable to allocate the resource deviceresourcedescriptor deviceresourceexception undoes everything that was done by a previous call to create given the object that was returned by create since 3 1 param previously created object an object that was returned by an equal descriptor in a previous call to create resource previouslycreatedobject createresource public abstract class device resource descriptor creates the resource described by this descriptor since 3 1 param device the device on which to allocate the resource return the newly allocated resource not null throws device resource exception if unable to allocate the resource deviceresourcedescriptor deviceresourceexception undoes everything that was done by a previous call to create given the object that was returned by create since 3 1 param previously created object an object that was returned by an equal descriptor in a previous call to create resource previouslycreatedobject createresource public abstract class device resource descriptor creates the resource described by this descriptor since 3 1 param device the device on which to allocate the resource return the newly allocated resource not null throws device resource exception if unable to allocate the resource deviceresourcedescriptor deviceresourceexception undoes everything that was done by a previous call to create given the object that was returned by create since 3 1 param previously created object an object that was returned by an equal descriptor in a previous call to create resource previouslycreatedobject createresource public abstract class device resource descriptor creates the resource described by this descriptor since 3 1 param device the device on which to allocate the resource return the newly allocated resource not null throws device resource exception if unable to allocate the resource deviceresourcedescriptor deviceresourceexception undoes everything that was done by a previous call to create given the object that was returned by create since 3 1 param previously created object an object that was returned by an equal descriptor in a previous call to create resource previouslycreatedobject createresource public abstract class device resource descriptor creates the resource described by this descriptor since 3 1 param device the device on which to allocate the resource return the newly allocated resource not null throws device resource exception if unable to allocate the resource deviceresourcedescriptor deviceresourceexception undoes everything that was done by a previous call to create given the object that was returned by create since 3 1 param previously created object an object that was returned by an equal descriptor in a previous call to create resource previouslycreatedobject createresource public abstract class device resource descriptor creates the resource described by this descriptor since 3 1 param device the device on which to allocate the resource return the newly allocated resource not null throws device resource exception if unable to allocate the resource deviceresourcedescriptor deviceresourceexception undoes everything that was done by a previous call to create given the object that was returned by create since 3 1 param previously created object an object that was returned by an equal descriptor in a previous call to create resource previouslycreatedobject createresource public abstract class device resource descriptor creates the resource described by this descriptor since 3 1 param device the device on which to allocate the resource return the newly allocated resource not null throws device resource exception if unable to allocate the resource deviceresourcedescriptor deviceresourceexception undoes everything that was done by a previous call to create given the object that was returned by create since 3 1 param previously created object an object that was returned by an equal descriptor in a previous call to create resource previouslycreatedobject createresource public abstract class device resource descriptor creates the resource described by this descriptor since 3 1 param device the device on which to allocate the resource return the newly allocated resource not null throws device resource exception if unable to allocate the resource deviceresourcedescriptor deviceresourceexception undoes everything that was done by a previous call to create given the object that was returned by create since 3 1 param previously created object an object that was returned by an equal descriptor in a previous call to create resource previouslycreatedobject createresource public abstract class device resource descriptor creates the resource described by this descriptor since 3 1 param device the device on which to allocate the resource return the newly allocated resource not null throws device resource exception if unable to allocate the resource deviceresourcedescriptor deviceresourceexception undoes everything that was done by a previous call to create given the object that was returned by create since 3 1 param previously created object an object that was returned by an equal descriptor in a previous call to create resource previouslycreatedobject createresource public abstract class device resource descriptor creates the resource described by this descriptor since 3 1 param device the device on which to allocate the resource return the newly allocated resource not null throws device resource exception if unable to allocate the resource deviceresourcedescriptor deviceresourceexception undoes everything that was done by a previous call to create given the object that was returned by create since 3 1 param previously created object an object that was returned by an equal descriptor in a previous call to create resource previouslycreatedobject createresource public abstract class device resource descriptor creates the resource described by this descriptor since 3 1 param device the device on which to allocate the resource return the newly allocated resource not null throws device resource exception if unable to allocate the resource deviceresourcedescriptor deviceresourceexception undoes everything that was done by a previous call to create given the object that was returned by create since 3 1 param previously created object an object that was returned by an equal descriptor in a previous call to create resource previouslycreatedobject createresource public default browser string id string location string parameters super id this location location this parameters parameters defaultbrowser see org eclipse help browser i browser displayurl java lang string public void openurl url url2 throws part init exception string url url2 to external form string path location string command prepare command path url trace trace trace finer command command non nls 1 try process pr runtime get runtime exec command thread out consumer new stream consumer pr get input stream out consumer set name custom browser adapter output reader non nls 1 out consumer start thread err consumer new stream consumer pr get error stream err consumer set name custom browser adapter error reader non nls 1 err consumer start catch exception e web browserui plugin log error launching url non nls 1 url using browser program non nls 1 path has failed specify another browser in help preferences non nls 1 e throw new part init exception nls bind messages error could not launch web browser path ibrowser partinitexception toexternalform preparecommand getruntime outconsumer streamconsumer getinputstream outconsumer setname outconsumer errconsumer streamconsumer geterrorstream errconsumer setname errconsumer webbrowseruiplugin logerror partinitexception errorcouldnotlaunchwebbrowser creates the final command to launch param path param url return string protected string prepare command string path string url array list token list new array list divide along quotation marks string tokenizer q tokenizer new string tokenizer path trim true non nls 1 boolean within quotation false string quoted string non nls 1 while q tokenizer has more tokens string cur token q tokenizer next token if cur token equals non nls 1 if within quotation if constants os win32 equals ignore case platform getos need to quote ur ls on windows token list add quoted string non nls 1 non nls 2 else quotes prevent launching on unix 35673 token list add quoted string else quoted string non nls 1 within quotation within quotation continue else if within quotation quoted string cur token continue else divide unquoted strings along white space string tokenizer parser new string tokenizer cur token trim while parser has more tokens token list add parser next token substitute 1 by url boolean substituted false for int i 0 i token list size i string token string token list get i string new token do substitutions token url if new token null token list set i new token substituted true add the url if not substituted already if substituted token list add url string command new string token list size token list to array command return command preparecommand arraylist tokenlist arraylist stringtokenizer qtokenizer stringtokenizer withinquotation quotedstring qtokenizer hasmoretokens curtoken qtokenizer nexttoken curtoken withinquotation os_win32 equalsignorecase urls tokenlist quotedstring tokenlist quotedstring quotedstring withinquotation withinquotation withinquotation quotedstring curtoken stringtokenizer stringtokenizer curtoken hasmoretokens tokenlist nexttoken tokenlist tokenlist newtoken dosubstitutions newtoken tokenlist newtoken tokenlist tokenlist tokenlist toarray replaces any occurrences of code 1 code or code 1 code with the url param token the token in which the substitutions should be made must not be code null code return the substituted string if a substitution is made code null code if no substitution is made protected string do substitutions string token string url boolean substituted false string buffer new token new string buffer token string substitution marker 1 non nls 1 int index new token index of substitution marker while index 1 new token replace index index substitution marker length url index new token index of substitution marker index url length substituted true if substituted return new token to string return null dosubstitutions stringbuffer newtoken stringbuffer substitutionmarker newtoken indexof substitutionmarker newtoken substitutionmarker newtoken indexof substitutionmarker newtoken tostring public interface i workbench action extends i action disposes of this action once disposed this action cannot be used this operation has no effect if the action has already been disposed iworkbenchaction iaction public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new about action window action set id get id i product product platform get product string product name null if product null product name product get name if product name null product name non nls 1 action set text nls bind workbench messages aboutaction text product name action set tool tip text nls bind workbench messages aboutaction tooltip product name return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction aboutaction setid getid iproduct getproduct productname productname getname productname productname settext workbenchmessages aboutaction_text productname settooltiptext workbenchmessages aboutaction_tooltip productname public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new activate editor action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction activateeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench back action set tool tip text workbench messages workbench backtooltip window get part service add part listener action action set action definition id org eclipse ui navigate back non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_back settooltiptext workbenchmessages workbench_backtooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new navigation history action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction navigationhistoryaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close editor action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close all action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeallaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close all perspectives action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeallperspectivesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close all saved action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeallsavedaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close perspective action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new intro action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction introaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench copy action set tool tip text workbench messages workbench copytooltip window get part service add part listener action action set action definition id org eclipse ui edit copy non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool copy action set disabled image descriptor shared images get image descriptor i shared images img tool copy disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_copy settooltiptext workbenchmessages workbench_copytooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_copy setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_copy_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench cut action set tool tip text workbench messages workbench cuttooltip window get part service add part listener action action set action definition id org eclipse ui edit cut non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool cut action set disabled image descriptor shared images get image descriptor i shared images img tool cut disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_cut settooltiptext workbenchmessages workbench_cuttooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_cut setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_cut_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench delete action set tool tip text workbench messages workbench deletetooltip window get part service add part listener action action set action definition id org eclipse ui edit delete non nls 1 action enable accelerator false window get workbench get help system set help action i workbench help context ids delete retarget action i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool delete action set disabled image descriptor shared images get image descriptor i shared images img tool delete disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_delete settooltiptext workbenchmessages workbench_deletetooltip getpartservice addpartlistener setactiondefinitionid enableaccelerator getworkbench gethelpsystem sethelp iworkbenchhelpcontextids delete_retarget_action isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_delete setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_delete_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new edit action sets action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction editactionsetsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new export resources action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction exportresourcesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench findreplace action set tool tip text workbench messages workbench findreplacetooltip window get part service add part listener action action set action definition id org eclipse ui edit find replace non nls 1 find s images are commented out due to a conflict with search see bug 16412 action set image descriptor workbench images get image descriptor i workbench graphic constants img etool search src action set disabled image descriptor workbench images get image descriptor i workbench graphic constants img etool search src disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_findreplace settooltiptext workbenchmessages workbench_findreplacetooltip getpartservice addpartlistener setactiondefinitionid findreplace setimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_search_src setdisabledimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_search_src_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench forward action set tool tip text workbench messages workbench forwardtooltip window get part service add part listener action action set action definition id org eclipse ui navigate forward non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_forward settooltiptext workbenchmessages workbench_forwardtooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new navigation history action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction navigationhistoryaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench gointo action set tool tip text workbench messages workbench gointotooltip window get part service add part listener action action set action definition id org eclipse ui navigate go into non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_gointo settooltiptext workbenchmessages workbench_gointotooltip getpartservice addpartlistener setactiondefinitionid gointo public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new import resources action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction importresourcesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new lock tool bar action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction locktoolbaraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new maximize part action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction maximizepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new minimize part action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction minimizepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench move action set tool tip text workbench messages workbench movetooltip window get part service add part listener action action set action definition id org eclipse ui edit move non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_move settooltiptext workbenchmessages workbench_movetooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new new wizard action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction newwizardaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new new wizard drop down action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction newwizarddropdownaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench next action set tool tip text workbench messages workbench nexttooltip window get part service add part listener action action set action definition id org eclipse ui navigate next non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_next settooltiptext workbenchmessages workbench_nexttooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle editor action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle part action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cyclepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle perspective action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new open in new window action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction openinnewwindowaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench paste action set tool tip text workbench messages workbench pastetooltip window get part service add part listener action action set action definition id org eclipse ui edit paste non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool paste action set disabled image descriptor shared images get image descriptor i shared images img tool paste disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_paste settooltiptext workbenchmessages workbench_pastetooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_paste setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_paste_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new open preferences action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction openpreferencesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench previous action set tool tip text workbench messages workbench previoustooltip window get part service add part listener action action set action definition id org eclipse ui navigate previous non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_previous settooltiptext workbenchmessages workbench_previoustooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle editor action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle part action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cyclepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle perspective action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench print action set tool tip text workbench messages workbench printtooltip window get part service add part listener action action set action definition id org eclipse ui file print non nls 1 action set image descriptor workbench images get image descriptor i workbench graphic constants img etool print edit action set disabled image descriptor workbench images get image descriptor i workbench graphic constants img etool print edit disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_print settooltiptext workbenchmessages workbench_printtooltip getpartservice addpartlistener setactiondefinitionid setimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_print_edit setdisabledimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_print_edit_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench properties action set tool tip text workbench messages workbench propertiestooltip window get part service add part listener action action set action definition id org eclipse ui file properties non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_properties settooltiptext workbenchmessages workbench_propertiestooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new quit action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction quitaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception label retarget action action new label retarget action get id workbench messages workbench redo action set tool tip text workbench messages workbench redotooltip window get part service add part listener action action set action definition id org eclipse ui edit redo non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool redo action set disabled image descriptor shared images get image descriptor i shared images img tool redo disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception labelretargetaction labelretargetaction getid workbenchmessages workbench_redo settooltiptext workbenchmessages workbench_redotooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_redo setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_redo_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench refresh action set tool tip text workbench messages workbench refreshtooltip window get part service add part listener action action set action definition id org eclipse ui file refresh non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_refresh settooltiptext workbenchmessages workbench_refreshtooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench rename action set tool tip text workbench messages workbench renametooltip window get part service add part listener action action set action definition id org eclipse ui edit rename non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_rename settooltiptext workbenchmessages workbench_renametooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new reset perspective action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction resetperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench revert action set tool tip text workbench messages workbench reverttooltip window get part service add part listener action action set action definition id org eclipse ui file revert non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_revert settooltiptext workbenchmessages workbench_reverttooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save all action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveallaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save as action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveasaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save perspective action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench selectall action set tool tip text workbench messages workbench selectalltooltip window get part service add part listener action action set action definition id org eclipse ui edit select all non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_selectall settooltiptext workbenchmessages workbench_selectalltooltip getpartservice addpartlistener setactiondefinitionid selectall public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new toggle editors visibility action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction toggleeditorsvisibilityaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new workbench editors action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction workbencheditorsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new workbook editors action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction workbookeditorsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new show part pane menu action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction showpartpanemenuaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new show view menu action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction showviewmenuaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception label retarget action action new label retarget action get id workbench messages workbench undo action set tool tip text workbench messages workbench undotooltip window get part service add part listener action action set action definition id org eclipse ui edit undo non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool undo action set disabled image descriptor shared images get image descriptor i shared images img tool undo disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception labelretargetaction labelretargetaction getid workbenchmessages workbench_undo settooltiptext workbenchmessages workbench_undotooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_undo setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_undo_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench up action set tool tip text workbench messages workbench uptooltip window get part service add part listener action action set action definition id org eclipse ui navigate up non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_up settooltiptext workbenchmessages workbench_uptooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new help contents action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction helpcontentsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new help search action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction helpsearchaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new dynamic help action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction dynamichelpaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new open perspective dialog action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction openperspectivedialogaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new new editor action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction neweditoraction setid getid establishes bi direction connections between the forward and backward actions of a cycle pair p example usage pre action factory i workbench action next editor action action factory next editor create window action factory i workbench action previous editor action action factory previous editor create window action factory link cycle action pair next editor action previous editor action pre p param next the action that moves forward param previous the action that moves backward public static void link cycle action pair i workbench action next i workbench action previous if next instanceof cycle part action throw new illegal argument exception if previous instanceof cycle part action throw new illegal argument exception cycle part action n cycle part action next cycle part action p cycle part action previous n set forward action definition id next get action definition id n set backward action definition id previous get action definition id p set forward action definition id next get action definition id p set backward action definition id previous get action definition id actionfactory iworkbenchaction nexteditoraction actionfactory next_editor actionfactory iworkbenchaction previouseditoraction actionfactory previous_editor actionfactory linkcycleactionpair nexteditoraction previouseditoraction linkcycleactionpair iworkbenchaction iworkbenchaction cyclepartaction illegalargumentexception cyclepartaction illegalargumentexception cyclepartaction cyclepartaction cyclepartaction cyclepartaction setforwardactiondefinitionid getactiondefinitionid setbackwardactiondefinitionid getactiondefinitionid setforwardactiondefinitionid getactiondefinitionid setbackwardactiondefinitionid getactiondefinitionid creates a new workbench action factory with the given id param action id the id of actions created by this action factory protected action factory string action id this action id action id actionid actionfactory actionid actionid actionid creates a new standard action for the given workbench window the action has an id as specified by the particular factory p actions automatically register listeners against the workbench window so that they can keep their enablement state up to date ordinarily the window s references to these listeners will be dropped automatically when the window closes however if the client needs to get rid of an action while the window is still open the client must call link i workbench action dispose dispose to give the action an opportunity to deregister its listeners and to perform any other cleanup p param window the workbench window return the workbench action iworkbenchaction returns the id of this action factory return the id of actions created by this action factory public string get id return action id getid actionid public interface i workbench action extends i action disposes of this action once disposed this action cannot be used this operation has no effect if the action has already been disposed iworkbenchaction iaction public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new about action window action set id get id i product product platform get product string product name null if product null product name product get name if product name null product name non nls 1 action set text nls bind workbench messages aboutaction text product name action set tool tip text nls bind workbench messages aboutaction tooltip product name return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction aboutaction setid getid iproduct getproduct productname productname getname productname productname settext workbenchmessages aboutaction_text productname settooltiptext workbenchmessages aboutaction_tooltip productname public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new activate editor action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction activateeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench back action set tool tip text workbench messages workbench backtooltip window get part service add part listener action action set action definition id org eclipse ui navigate back non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_back settooltiptext workbenchmessages workbench_backtooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new navigation history action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction navigationhistoryaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close editor action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close all action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeallaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close all perspectives action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeallperspectivesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close all saved action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeallsavedaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close perspective action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new intro action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction introaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench copy action set tool tip text workbench messages workbench copytooltip window get part service add part listener action action set action definition id org eclipse ui edit copy non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool copy action set disabled image descriptor shared images get image descriptor i shared images img tool copy disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_copy settooltiptext workbenchmessages workbench_copytooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_copy setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_copy_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench cut action set tool tip text workbench messages workbench cuttooltip window get part service add part listener action action set action definition id org eclipse ui edit cut non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool cut action set disabled image descriptor shared images get image descriptor i shared images img tool cut disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_cut settooltiptext workbenchmessages workbench_cuttooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_cut setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_cut_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench delete action set tool tip text workbench messages workbench deletetooltip window get part service add part listener action action set action definition id org eclipse ui edit delete non nls 1 action enable accelerator false window get workbench get help system set help action i workbench help context ids delete retarget action i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool delete action set disabled image descriptor shared images get image descriptor i shared images img tool delete disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_delete settooltiptext workbenchmessages workbench_deletetooltip getpartservice addpartlistener setactiondefinitionid enableaccelerator getworkbench gethelpsystem sethelp iworkbenchhelpcontextids delete_retarget_action isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_delete setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_delete_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new edit action sets action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction editactionsetsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new export resources action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction exportresourcesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench findreplace action set tool tip text workbench messages workbench findreplacetooltip window get part service add part listener action action set action definition id org eclipse ui edit find replace non nls 1 find s images are commented out due to a conflict with search see bug 16412 action set image descriptor workbench images get image descriptor i workbench graphic constants img etool search src action set disabled image descriptor workbench images get image descriptor i workbench graphic constants img etool search src disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_findreplace settooltiptext workbenchmessages workbench_findreplacetooltip getpartservice addpartlistener setactiondefinitionid findreplace setimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_search_src setdisabledimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_search_src_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench forward action set tool tip text workbench messages workbench forwardtooltip window get part service add part listener action action set action definition id org eclipse ui navigate forward non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_forward settooltiptext workbenchmessages workbench_forwardtooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new navigation history action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction navigationhistoryaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench gointo action set tool tip text workbench messages workbench gointotooltip window get part service add part listener action action set action definition id org eclipse ui navigate go into non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_gointo settooltiptext workbenchmessages workbench_gointotooltip getpartservice addpartlistener setactiondefinitionid gointo public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new import resources action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction importresourcesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new lock tool bar action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction locktoolbaraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new maximize part action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction maximizepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new minimize part action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction minimizepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench move action set tool tip text workbench messages workbench movetooltip window get part service add part listener action action set action definition id org eclipse ui edit move non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_move settooltiptext workbenchmessages workbench_movetooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new new wizard action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction newwizardaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new new wizard drop down action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction newwizarddropdownaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench next action set tool tip text workbench messages workbench nexttooltip window get part service add part listener action action set action definition id org eclipse ui navigate next non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_next settooltiptext workbenchmessages workbench_nexttooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle editor action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle part action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cyclepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle perspective action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new open in new window action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction openinnewwindowaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench paste action set tool tip text workbench messages workbench pastetooltip window get part service add part listener action action set action definition id org eclipse ui edit paste non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool paste action set disabled image descriptor shared images get image descriptor i shared images img tool paste disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_paste settooltiptext workbenchmessages workbench_pastetooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_paste setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_paste_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new open preferences action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction openpreferencesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench previous action set tool tip text workbench messages workbench previoustooltip window get part service add part listener action action set action definition id org eclipse ui navigate previous non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_previous settooltiptext workbenchmessages workbench_previoustooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle editor action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle part action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cyclepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle perspective action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench print action set tool tip text workbench messages workbench printtooltip window get part service add part listener action action set action definition id org eclipse ui file print non nls 1 action set image descriptor workbench images get image descriptor i workbench graphic constants img etool print edit action set disabled image descriptor workbench images get image descriptor i workbench graphic constants img etool print edit disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_print settooltiptext workbenchmessages workbench_printtooltip getpartservice addpartlistener setactiondefinitionid setimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_print_edit setdisabledimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_print_edit_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench properties action set tool tip text workbench messages workbench propertiestooltip window get part service add part listener action action set action definition id org eclipse ui file properties non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_properties settooltiptext workbenchmessages workbench_propertiestooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new quit action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction quitaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception label retarget action action new label retarget action get id workbench messages workbench redo action set tool tip text workbench messages workbench redotooltip window get part service add part listener action action set action definition id org eclipse ui edit redo non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool redo action set disabled image descriptor shared images get image descriptor i shared images img tool redo disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception labelretargetaction labelretargetaction getid workbenchmessages workbench_redo settooltiptext workbenchmessages workbench_redotooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_redo setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_redo_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench refresh action set tool tip text workbench messages workbench refreshtooltip window get part service add part listener action action set action definition id org eclipse ui file refresh non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_refresh settooltiptext workbenchmessages workbench_refreshtooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench rename action set tool tip text workbench messages workbench renametooltip window get part service add part listener action action set action definition id org eclipse ui edit rename non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_rename settooltiptext workbenchmessages workbench_renametooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new reset perspective action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction resetperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench revert action set tool tip text workbench messages workbench reverttooltip window get part service add part listener action action set action definition id org eclipse ui file revert non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_revert settooltiptext workbenchmessages workbench_reverttooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save all action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveallaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save as action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveasaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save perspective action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench selectall action set tool tip text workbench messages workbench selectalltooltip window get part service add part listener action action set action definition id org eclipse ui edit select all non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_selectall settooltiptext workbenchmessages workbench_selectalltooltip getpartservice addpartlistener setactiondefinitionid selectall public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new toggle editors visibility action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction toggleeditorsvisibilityaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new workbench editors action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction workbencheditorsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new workbook editors action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction workbookeditorsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new show part pane menu action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction showpartpanemenuaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new show view menu action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction showviewmenuaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception label retarget action action new label retarget action get id workbench messages workbench undo action set tool tip text workbench messages workbench undotooltip window get part service add part listener action action set action definition id org eclipse ui edit undo non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool undo action set disabled image descriptor shared images get image descriptor i shared images img tool undo disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception labelretargetaction labelretargetaction getid workbenchmessages workbench_undo settooltiptext workbenchmessages workbench_undotooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_undo setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_undo_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench up action set tool tip text workbench messages workbench uptooltip window get part service add part listener action action set action definition id org eclipse ui navigate up non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_up settooltiptext workbenchmessages workbench_uptooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new help contents action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction helpcontentsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new help search action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction helpsearchaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new dynamic help action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction dynamichelpaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new open perspective dialog action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction openperspectivedialogaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new new editor action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction neweditoraction setid getid establishes bi direction connections between the forward and backward actions of a cycle pair p example usage pre action factory i workbench action next editor action action factory next editor create window action factory i workbench action previous editor action action factory previous editor create window action factory link cycle action pair next editor action previous editor action pre p param next the action that moves forward param previous the action that moves backward public static void link cycle action pair i workbench action next i workbench action previous if next instanceof cycle part action throw new illegal argument exception if previous instanceof cycle part action throw new illegal argument exception cycle part action n cycle part action next cycle part action p cycle part action previous n set forward action definition id next get action definition id n set backward action definition id previous get action definition id p set forward action definition id next get action definition id p set backward action definition id previous get action definition id actionfactory iworkbenchaction nexteditoraction actionfactory next_editor actionfactory iworkbenchaction previouseditoraction actionfactory previous_editor actionfactory linkcycleactionpair nexteditoraction previouseditoraction linkcycleactionpair iworkbenchaction iworkbenchaction cyclepartaction illegalargumentexception cyclepartaction illegalargumentexception cyclepartaction cyclepartaction cyclepartaction cyclepartaction setforwardactiondefinitionid getactiondefinitionid setbackwardactiondefinitionid getactiondefinitionid setforwardactiondefinitionid getactiondefinitionid setbackwardactiondefinitionid getactiondefinitionid creates a new workbench action factory with the given id param action id the id of actions created by this action factory protected action factory string action id this action id action id actionid actionfactory actionid actionid actionid creates a new standard action for the given workbench window the action has an id as specified by the particular factory p actions automatically register listeners against the workbench window so that they can keep their enablement state up to date ordinarily the window s references to these listeners will be dropped automatically when the window closes however if the client needs to get rid of an action while the window is still open the client must call link i workbench action dispose dispose to give the action an opportunity to deregister its listeners and to perform any other cleanup p param window the workbench window return the workbench action iworkbenchaction returns the id of this action factory return the id of actions created by this action factory public string get id return action id getid actionid public interface i workbench action extends i action disposes of this action once disposed this action cannot be used this operation has no effect if the action has already been disposed iworkbenchaction iaction public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new about action window action set id get id i product product platform get product string product name null if product null product name product get name if product name null product name non nls 1 action set text nls bind workbench messages aboutaction text product name action set tool tip text nls bind workbench messages aboutaction tooltip product name return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction aboutaction setid getid iproduct getproduct productname productname getname productname productname settext workbenchmessages aboutaction_text productname settooltiptext workbenchmessages aboutaction_tooltip productname public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new activate editor action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction activateeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench back action set tool tip text workbench messages workbench backtooltip window get part service add part listener action action set action definition id org eclipse ui navigate back non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_back settooltiptext workbenchmessages workbench_backtooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new navigation history action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction navigationhistoryaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close editor action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close all action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeallaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close all perspectives action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeallperspectivesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close all saved action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeallsavedaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close perspective action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new intro action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction introaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench copy action set tool tip text workbench messages workbench copytooltip window get part service add part listener action action set action definition id org eclipse ui edit copy non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool copy action set disabled image descriptor shared images get image descriptor i shared images img tool copy disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_copy settooltiptext workbenchmessages workbench_copytooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_copy setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_copy_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench cut action set tool tip text workbench messages workbench cuttooltip window get part service add part listener action action set action definition id org eclipse ui edit cut non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool cut action set disabled image descriptor shared images get image descriptor i shared images img tool cut disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_cut settooltiptext workbenchmessages workbench_cuttooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_cut setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_cut_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench delete action set tool tip text workbench messages workbench deletetooltip window get part service add part listener action action set action definition id org eclipse ui edit delete non nls 1 action enable accelerator false window get workbench get help system set help action i workbench help context ids delete retarget action i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool delete action set disabled image descriptor shared images get image descriptor i shared images img tool delete disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_delete settooltiptext workbenchmessages workbench_deletetooltip getpartservice addpartlistener setactiondefinitionid enableaccelerator getworkbench gethelpsystem sethelp iworkbenchhelpcontextids delete_retarget_action isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_delete setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_delete_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new edit action sets action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction editactionsetsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new export resources action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction exportresourcesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench findreplace action set tool tip text workbench messages workbench findreplacetooltip window get part service add part listener action action set action definition id org eclipse ui edit find replace non nls 1 find s images are commented out due to a conflict with search see bug 16412 action set image descriptor workbench images get image descriptor i workbench graphic constants img etool search src action set disabled image descriptor workbench images get image descriptor i workbench graphic constants img etool search src disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_findreplace settooltiptext workbenchmessages workbench_findreplacetooltip getpartservice addpartlistener setactiondefinitionid findreplace setimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_search_src setdisabledimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_search_src_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench forward action set tool tip text workbench messages workbench forwardtooltip window get part service add part listener action action set action definition id org eclipse ui navigate forward non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_forward settooltiptext workbenchmessages workbench_forwardtooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new navigation history action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction navigationhistoryaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench gointo action set tool tip text workbench messages workbench gointotooltip window get part service add part listener action action set action definition id org eclipse ui navigate go into non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_gointo settooltiptext workbenchmessages workbench_gointotooltip getpartservice addpartlistener setactiondefinitionid gointo public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new import resources action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction importresourcesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new lock tool bar action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction locktoolbaraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new maximize part action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction maximizepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new minimize part action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction minimizepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench move action set tool tip text workbench messages workbench movetooltip window get part service add part listener action action set action definition id org eclipse ui edit move non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_move settooltiptext workbenchmessages workbench_movetooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new new wizard action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction newwizardaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new new wizard drop down action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction newwizarddropdownaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench next action set tool tip text workbench messages workbench nexttooltip window get part service add part listener action action set action definition id org eclipse ui navigate next non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_next settooltiptext workbenchmessages workbench_nexttooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle editor action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle part action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cyclepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle perspective action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new open in new window action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction openinnewwindowaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench paste action set tool tip text workbench messages workbench pastetooltip window get part service add part listener action action set action definition id org eclipse ui edit paste non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool paste action set disabled image descriptor shared images get image descriptor i shared images img tool paste disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_paste settooltiptext workbenchmessages workbench_pastetooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_paste setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_paste_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new open preferences action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction openpreferencesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench previous action set tool tip text workbench messages workbench previoustooltip window get part service add part listener action action set action definition id org eclipse ui navigate previous non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_previous settooltiptext workbenchmessages workbench_previoustooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle editor action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle part action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cyclepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle perspective action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench print action set tool tip text workbench messages workbench printtooltip window get part service add part listener action action set action definition id org eclipse ui file print non nls 1 action set image descriptor workbench images get image descriptor i workbench graphic constants img etool print edit action set disabled image descriptor workbench images get image descriptor i workbench graphic constants img etool print edit disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_print settooltiptext workbenchmessages workbench_printtooltip getpartservice addpartlistener setactiondefinitionid setimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_print_edit setdisabledimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_print_edit_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench properties action set tool tip text workbench messages workbench propertiestooltip window get part service add part listener action action set action definition id org eclipse ui file properties non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_properties settooltiptext workbenchmessages workbench_propertiestooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new quit action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction quitaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception label retarget action action new label retarget action get id workbench messages workbench redo action set tool tip text workbench messages workbench redotooltip window get part service add part listener action action set action definition id org eclipse ui edit redo non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool redo action set disabled image descriptor shared images get image descriptor i shared images img tool redo disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception labelretargetaction labelretargetaction getid workbenchmessages workbench_redo settooltiptext workbenchmessages workbench_redotooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_redo setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_redo_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench refresh action set tool tip text workbench messages workbench refreshtooltip window get part service add part listener action action set action definition id org eclipse ui file refresh non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_refresh settooltiptext workbenchmessages workbench_refreshtooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench rename action set tool tip text workbench messages workbench renametooltip window get part service add part listener action action set action definition id org eclipse ui edit rename non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_rename settooltiptext workbenchmessages workbench_renametooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new reset perspective action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction resetperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench revert action set tool tip text workbench messages workbench reverttooltip window get part service add part listener action action set action definition id org eclipse ui file revert non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_revert settooltiptext workbenchmessages workbench_reverttooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save all action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveallaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save as action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveasaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save perspective action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench selectall action set tool tip text workbench messages workbench selectalltooltip window get part service add part listener action action set action definition id org eclipse ui edit select all non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_selectall settooltiptext workbenchmessages workbench_selectalltooltip getpartservice addpartlistener setactiondefinitionid selectall public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new toggle editors visibility action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction toggleeditorsvisibilityaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new workbench editors action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction workbencheditorsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new workbook editors action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction workbookeditorsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new show part pane menu action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction showpartpanemenuaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new show view menu action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction showviewmenuaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception label retarget action action new label retarget action get id workbench messages workbench undo action set tool tip text workbench messages workbench undotooltip window get part service add part listener action action set action definition id org eclipse ui edit undo non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool undo action set disabled image descriptor shared images get image descriptor i shared images img tool undo disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception labelretargetaction labelretargetaction getid workbenchmessages workbench_undo settooltiptext workbenchmessages workbench_undotooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_undo setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_undo_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench up action set tool tip text workbench messages workbench uptooltip window get part service add part listener action action set action definition id org eclipse ui navigate up non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_up settooltiptext workbenchmessages workbench_uptooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new help contents action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction helpcontentsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new help search action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction helpsearchaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new dynamic help action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction dynamichelpaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new open perspective dialog action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction openperspectivedialogaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new new editor action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction neweditoraction setid getid establishes bi direction connections between the forward and backward actions of a cycle pair p example usage pre action factory i workbench action next editor action action factory next editor create window action factory i workbench action previous editor action action factory previous editor create window action factory link cycle action pair next editor action previous editor action pre p param next the action that moves forward param previous the action that moves backward public static void link cycle action pair i workbench action next i workbench action previous if next instanceof cycle part action throw new illegal argument exception if previous instanceof cycle part action throw new illegal argument exception cycle part action n cycle part action next cycle part action p cycle part action previous n set forward action definition id next get action definition id n set backward action definition id previous get action definition id p set forward action definition id next get action definition id p set backward action definition id previous get action definition id actionfactory iworkbenchaction nexteditoraction actionfactory next_editor actionfactory iworkbenchaction previouseditoraction actionfactory previous_editor actionfactory linkcycleactionpair nexteditoraction previouseditoraction linkcycleactionpair iworkbenchaction iworkbenchaction cyclepartaction illegalargumentexception cyclepartaction illegalargumentexception cyclepartaction cyclepartaction cyclepartaction cyclepartaction setforwardactiondefinitionid getactiondefinitionid setbackwardactiondefinitionid getactiondefinitionid setforwardactiondefinitionid getactiondefinitionid setbackwardactiondefinitionid getactiondefinitionid creates a new workbench action factory with the given id param action id the id of actions created by this action factory protected action factory string action id this action id action id actionid actionfactory actionid actionid actionid creates a new standard action for the given workbench window the action has an id as specified by the particular factory p actions automatically register listeners against the workbench window so that they can keep their enablement state up to date ordinarily the window s references to these listeners will be dropped automatically when the window closes however if the client needs to get rid of an action while the window is still open the client must call link i workbench action dispose dispose to give the action an opportunity to deregister its listeners and to perform any other cleanup p param window the workbench window return the workbench action iworkbenchaction returns the id of this action factory return the id of actions created by this action factory public string get id return action id getid actionid public interface i workbench action extends i action disposes of this action once disposed this action cannot be used this operation has no effect if the action has already been disposed iworkbenchaction iaction public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new about action window action set id get id i product product platform get product string product name null if product null product name product get name if product name null product name non nls 1 action set text nls bind workbench messages aboutaction text product name action set tool tip text nls bind workbench messages aboutaction tooltip product name return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction aboutaction setid getid iproduct getproduct productname productname getname productname productname settext workbenchmessages aboutaction_text productname settooltiptext workbenchmessages aboutaction_tooltip productname public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new activate editor action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction activateeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench back action set tool tip text workbench messages workbench backtooltip window get part service add part listener action action set action definition id org eclipse ui navigate back non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_back settooltiptext workbenchmessages workbench_backtooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new navigation history action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction navigationhistoryaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close editor action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close all action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeallaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close all perspectives action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeallperspectivesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close all saved action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeallsavedaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close perspective action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new intro action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction introaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench copy action set tool tip text workbench messages workbench copytooltip window get part service add part listener action action set action definition id org eclipse ui edit copy non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool copy action set disabled image descriptor shared images get image descriptor i shared images img tool copy disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_copy settooltiptext workbenchmessages workbench_copytooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_copy setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_copy_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench cut action set tool tip text workbench messages workbench cuttooltip window get part service add part listener action action set action definition id org eclipse ui edit cut non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool cut action set disabled image descriptor shared images get image descriptor i shared images img tool cut disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_cut settooltiptext workbenchmessages workbench_cuttooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_cut setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_cut_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench delete action set tool tip text workbench messages workbench deletetooltip window get part service add part listener action action set action definition id org eclipse ui edit delete non nls 1 action enable accelerator false window get workbench get help system set help action i workbench help context ids delete retarget action i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool delete action set disabled image descriptor shared images get image descriptor i shared images img tool delete disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_delete settooltiptext workbenchmessages workbench_deletetooltip getpartservice addpartlistener setactiondefinitionid enableaccelerator getworkbench gethelpsystem sethelp iworkbenchhelpcontextids delete_retarget_action isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_delete setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_delete_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new edit action sets action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction editactionsetsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new export resources action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction exportresourcesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench findreplace action set tool tip text workbench messages workbench findreplacetooltip window get part service add part listener action action set action definition id org eclipse ui edit find replace non nls 1 find s images are commented out due to a conflict with search see bug 16412 action set image descriptor workbench images get image descriptor i workbench graphic constants img etool search src action set disabled image descriptor workbench images get image descriptor i workbench graphic constants img etool search src disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_findreplace settooltiptext workbenchmessages workbench_findreplacetooltip getpartservice addpartlistener setactiondefinitionid findreplace setimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_search_src setdisabledimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_search_src_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench forward action set tool tip text workbench messages workbench forwardtooltip window get part service add part listener action action set action definition id org eclipse ui navigate forward non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_forward settooltiptext workbenchmessages workbench_forwardtooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new navigation history action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction navigationhistoryaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench gointo action set tool tip text workbench messages workbench gointotooltip window get part service add part listener action action set action definition id org eclipse ui navigate go into non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_gointo settooltiptext workbenchmessages workbench_gointotooltip getpartservice addpartlistener setactiondefinitionid gointo public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new import resources action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction importresourcesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new lock tool bar action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction locktoolbaraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new maximize part action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction maximizepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new minimize part action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction minimizepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench move action set tool tip text workbench messages workbench movetooltip window get part service add part listener action action set action definition id org eclipse ui edit move non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_move settooltiptext workbenchmessages workbench_movetooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new new wizard action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction newwizardaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new new wizard drop down action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction newwizarddropdownaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench next action set tool tip text workbench messages workbench nexttooltip window get part service add part listener action action set action definition id org eclipse ui navigate next non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_next settooltiptext workbenchmessages workbench_nexttooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle editor action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle part action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cyclepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle perspective action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new open in new window action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction openinnewwindowaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench paste action set tool tip text workbench messages workbench pastetooltip window get part service add part listener action action set action definition id org eclipse ui edit paste non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool paste action set disabled image descriptor shared images get image descriptor i shared images img tool paste disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_paste settooltiptext workbenchmessages workbench_pastetooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_paste setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_paste_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new open preferences action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction openpreferencesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench previous action set tool tip text workbench messages workbench previoustooltip window get part service add part listener action action set action definition id org eclipse ui navigate previous non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_previous settooltiptext workbenchmessages workbench_previoustooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle editor action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle part action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cyclepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle perspective action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench print action set tool tip text workbench messages workbench printtooltip window get part service add part listener action action set action definition id org eclipse ui file print non nls 1 action set image descriptor workbench images get image descriptor i workbench graphic constants img etool print edit action set disabled image descriptor workbench images get image descriptor i workbench graphic constants img etool print edit disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_print settooltiptext workbenchmessages workbench_printtooltip getpartservice addpartlistener setactiondefinitionid setimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_print_edit setdisabledimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_print_edit_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench properties action set tool tip text workbench messages workbench propertiestooltip window get part service add part listener action action set action definition id org eclipse ui file properties non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_properties settooltiptext workbenchmessages workbench_propertiestooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new quit action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction quitaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception label retarget action action new label retarget action get id workbench messages workbench redo action set tool tip text workbench messages workbench redotooltip window get part service add part listener action action set action definition id org eclipse ui edit redo non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool redo action set disabled image descriptor shared images get image descriptor i shared images img tool redo disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception labelretargetaction labelretargetaction getid workbenchmessages workbench_redo settooltiptext workbenchmessages workbench_redotooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_redo setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_redo_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench refresh action set tool tip text workbench messages workbench refreshtooltip window get part service add part listener action action set action definition id org eclipse ui file refresh non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_refresh settooltiptext workbenchmessages workbench_refreshtooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench rename action set tool tip text workbench messages workbench renametooltip window get part service add part listener action action set action definition id org eclipse ui edit rename non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_rename settooltiptext workbenchmessages workbench_renametooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new reset perspective action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction resetperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench revert action set tool tip text workbench messages workbench reverttooltip window get part service add part listener action action set action definition id org eclipse ui file revert non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_revert settooltiptext workbenchmessages workbench_reverttooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save all action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveallaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save as action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveasaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save perspective action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench selectall action set tool tip text workbench messages workbench selectalltooltip window get part service add part listener action action set action definition id org eclipse ui edit select all non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_selectall settooltiptext workbenchmessages workbench_selectalltooltip getpartservice addpartlistener setactiondefinitionid selectall public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new toggle editors visibility action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction toggleeditorsvisibilityaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new workbench editors action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction workbencheditorsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new workbook editors action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction workbookeditorsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new show part pane menu action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction showpartpanemenuaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new show view menu action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction showviewmenuaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception label retarget action action new label retarget action get id workbench messages workbench undo action set tool tip text workbench messages workbench undotooltip window get part service add part listener action action set action definition id org eclipse ui edit undo non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool undo action set disabled image descriptor shared images get image descriptor i shared images img tool undo disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception labelretargetaction labelretargetaction getid workbenchmessages workbench_undo settooltiptext workbenchmessages workbench_undotooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_undo setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_undo_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench up action set tool tip text workbench messages workbench uptooltip window get part service add part listener action action set action definition id org eclipse ui navigate up non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_up settooltiptext workbenchmessages workbench_uptooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new help contents action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction helpcontentsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new help search action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction helpsearchaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new dynamic help action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction dynamichelpaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new open perspective dialog action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction openperspectivedialogaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new new editor action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction neweditoraction setid getid establishes bi direction connections between the forward and backward actions of a cycle pair p example usage pre action factory i workbench action next editor action action factory next editor create window action factory i workbench action previous editor action action factory previous editor create window action factory link cycle action pair next editor action previous editor action pre p param next the action that moves forward param previous the action that moves backward public static void link cycle action pair i workbench action next i workbench action previous if next instanceof cycle part action throw new illegal argument exception if previous instanceof cycle part action throw new illegal argument exception cycle part action n cycle part action next cycle part action p cycle part action previous n set forward action definition id next get action definition id n set backward action definition id previous get action definition id p set forward action definition id next get action definition id p set backward action definition id previous get action definition id actionfactory iworkbenchaction nexteditoraction actionfactory next_editor actionfactory iworkbenchaction previouseditoraction actionfactory previous_editor actionfactory linkcycleactionpair nexteditoraction previouseditoraction linkcycleactionpair iworkbenchaction iworkbenchaction cyclepartaction illegalargumentexception cyclepartaction illegalargumentexception cyclepartaction cyclepartaction cyclepartaction cyclepartaction setforwardactiondefinitionid getactiondefinitionid setbackwardactiondefinitionid getactiondefinitionid setforwardactiondefinitionid getactiondefinitionid setbackwardactiondefinitionid getactiondefinitionid creates a new workbench action factory with the given id param action id the id of actions created by this action factory protected action factory string action id this action id action id actionid actionfactory actionid actionid actionid creates a new standard action for the given workbench window the action has an id as specified by the particular factory p actions automatically register listeners against the workbench window so that they can keep their enablement state up to date ordinarily the window s references to these listeners will be dropped automatically when the window closes however if the client needs to get rid of an action while the window is still open the client must call link i workbench action dispose dispose to give the action an opportunity to deregister its listeners and to perform any other cleanup p param window the workbench window return the workbench action iworkbenchaction returns the id of this action factory return the id of actions created by this action factory public string get id return action id getid actionid public interface i workbench action extends i action disposes of this action once disposed this action cannot be used this operation has no effect if the action has already been disposed iworkbenchaction iaction public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new about action window action set id get id i product product platform get product string product name null if product null product name product get name if product name null product name non nls 1 action set text nls bind workbench messages aboutaction text product name action set tool tip text nls bind workbench messages aboutaction tooltip product name return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction aboutaction setid getid iproduct getproduct productname productname getname productname productname settext workbenchmessages aboutaction_text productname settooltiptext workbenchmessages aboutaction_tooltip productname public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new activate editor action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction activateeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench back action set tool tip text workbench messages workbench backtooltip window get part service add part listener action action set action definition id org eclipse ui navigate back non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_back settooltiptext workbenchmessages workbench_backtooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new navigation history action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction navigationhistoryaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close editor action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close all action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeallaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close all perspectives action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeallperspectivesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close all saved action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeallsavedaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close perspective action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new intro action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction introaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench copy action set tool tip text workbench messages workbench copytooltip window get part service add part listener action action set action definition id org eclipse ui edit copy non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool copy action set disabled image descriptor shared images get image descriptor i shared images img tool copy disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_copy settooltiptext workbenchmessages workbench_copytooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_copy setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_copy_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench cut action set tool tip text workbench messages workbench cuttooltip window get part service add part listener action action set action definition id org eclipse ui edit cut non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool cut action set disabled image descriptor shared images get image descriptor i shared images img tool cut disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_cut settooltiptext workbenchmessages workbench_cuttooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_cut setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_cut_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench delete action set tool tip text workbench messages workbench deletetooltip window get part service add part listener action action set action definition id org eclipse ui edit delete non nls 1 action enable accelerator false window get workbench get help system set help action i workbench help context ids delete retarget action i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool delete action set disabled image descriptor shared images get image descriptor i shared images img tool delete disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_delete settooltiptext workbenchmessages workbench_deletetooltip getpartservice addpartlistener setactiondefinitionid enableaccelerator getworkbench gethelpsystem sethelp iworkbenchhelpcontextids delete_retarget_action isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_delete setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_delete_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new edit action sets action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction editactionsetsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new export resources action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction exportresourcesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench findreplace action set tool tip text workbench messages workbench findreplacetooltip window get part service add part listener action action set action definition id org eclipse ui edit find replace non nls 1 find s images are commented out due to a conflict with search see bug 16412 action set image descriptor workbench images get image descriptor i workbench graphic constants img etool search src action set disabled image descriptor workbench images get image descriptor i workbench graphic constants img etool search src disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_findreplace settooltiptext workbenchmessages workbench_findreplacetooltip getpartservice addpartlistener setactiondefinitionid findreplace setimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_search_src setdisabledimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_search_src_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench forward action set tool tip text workbench messages workbench forwardtooltip window get part service add part listener action action set action definition id org eclipse ui navigate forward non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_forward settooltiptext workbenchmessages workbench_forwardtooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new navigation history action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction navigationhistoryaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench gointo action set tool tip text workbench messages workbench gointotooltip window get part service add part listener action action set action definition id org eclipse ui navigate go into non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_gointo settooltiptext workbenchmessages workbench_gointotooltip getpartservice addpartlistener setactiondefinitionid gointo public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new import resources action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction importresourcesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new lock tool bar action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction locktoolbaraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new maximize part action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction maximizepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new minimize part action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction minimizepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench move action set tool tip text workbench messages workbench movetooltip window get part service add part listener action action set action definition id org eclipse ui edit move non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_move settooltiptext workbenchmessages workbench_movetooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new new wizard action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction newwizardaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new new wizard drop down action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction newwizarddropdownaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench next action set tool tip text workbench messages workbench nexttooltip window get part service add part listener action action set action definition id org eclipse ui navigate next non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_next settooltiptext workbenchmessages workbench_nexttooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle editor action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle part action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cyclepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle perspective action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new open in new window action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction openinnewwindowaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench paste action set tool tip text workbench messages workbench pastetooltip window get part service add part listener action action set action definition id org eclipse ui edit paste non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool paste action set disabled image descriptor shared images get image descriptor i shared images img tool paste disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_paste settooltiptext workbenchmessages workbench_pastetooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_paste setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_paste_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new open preferences action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction openpreferencesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench previous action set tool tip text workbench messages workbench previoustooltip window get part service add part listener action action set action definition id org eclipse ui navigate previous non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_previous settooltiptext workbenchmessages workbench_previoustooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle editor action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle part action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cyclepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle perspective action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench print action set tool tip text workbench messages workbench printtooltip window get part service add part listener action action set action definition id org eclipse ui file print non nls 1 action set image descriptor workbench images get image descriptor i workbench graphic constants img etool print edit action set disabled image descriptor workbench images get image descriptor i workbench graphic constants img etool print edit disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_print settooltiptext workbenchmessages workbench_printtooltip getpartservice addpartlistener setactiondefinitionid setimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_print_edit setdisabledimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_print_edit_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench properties action set tool tip text workbench messages workbench propertiestooltip window get part service add part listener action action set action definition id org eclipse ui file properties non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_properties settooltiptext workbenchmessages workbench_propertiestooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new quit action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction quitaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception label retarget action action new label retarget action get id workbench messages workbench redo action set tool tip text workbench messages workbench redotooltip window get part service add part listener action action set action definition id org eclipse ui edit redo non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool redo action set disabled image descriptor shared images get image descriptor i shared images img tool redo disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception labelretargetaction labelretargetaction getid workbenchmessages workbench_redo settooltiptext workbenchmessages workbench_redotooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_redo setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_redo_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench refresh action set tool tip text workbench messages workbench refreshtooltip window get part service add part listener action action set action definition id org eclipse ui file refresh non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_refresh settooltiptext workbenchmessages workbench_refreshtooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench rename action set tool tip text workbench messages workbench renametooltip window get part service add part listener action action set action definition id org eclipse ui edit rename non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_rename settooltiptext workbenchmessages workbench_renametooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new reset perspective action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction resetperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench revert action set tool tip text workbench messages workbench reverttooltip window get part service add part listener action action set action definition id org eclipse ui file revert non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_revert settooltiptext workbenchmessages workbench_reverttooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save all action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveallaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save as action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveasaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save perspective action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench selectall action set tool tip text workbench messages workbench selectalltooltip window get part service add part listener action action set action definition id org eclipse ui edit select all non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_selectall settooltiptext workbenchmessages workbench_selectalltooltip getpartservice addpartlistener setactiondefinitionid selectall public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new toggle editors visibility action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction toggleeditorsvisibilityaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new workbench editors action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction workbencheditorsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new workbook editors action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction workbookeditorsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new show part pane menu action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction showpartpanemenuaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new show view menu action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction showviewmenuaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception label retarget action action new label retarget action get id workbench messages workbench undo action set tool tip text workbench messages workbench undotooltip window get part service add part listener action action set action definition id org eclipse ui edit undo non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool undo action set disabled image descriptor shared images get image descriptor i shared images img tool undo disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception labelretargetaction labelretargetaction getid workbenchmessages workbench_undo settooltiptext workbenchmessages workbench_undotooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_undo setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_undo_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench up action set tool tip text workbench messages workbench uptooltip window get part service add part listener action action set action definition id org eclipse ui navigate up non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_up settooltiptext workbenchmessages workbench_uptooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new help contents action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction helpcontentsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new help search action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction helpsearchaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new dynamic help action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction dynamichelpaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new open perspective dialog action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction openperspectivedialogaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new new editor action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction neweditoraction setid getid establishes bi direction connections between the forward and backward actions of a cycle pair p example usage pre action factory i workbench action next editor action action factory next editor create window action factory i workbench action previous editor action action factory previous editor create window action factory link cycle action pair next editor action previous editor action pre p param next the action that moves forward param previous the action that moves backward public static void link cycle action pair i workbench action next i workbench action previous if next instanceof cycle part action throw new illegal argument exception if previous instanceof cycle part action throw new illegal argument exception cycle part action n cycle part action next cycle part action p cycle part action previous n set forward action definition id next get action definition id n set backward action definition id previous get action definition id p set forward action definition id next get action definition id p set backward action definition id previous get action definition id actionfactory iworkbenchaction nexteditoraction actionfactory next_editor actionfactory iworkbenchaction previouseditoraction actionfactory previous_editor actionfactory linkcycleactionpair nexteditoraction previouseditoraction linkcycleactionpair iworkbenchaction iworkbenchaction cyclepartaction illegalargumentexception cyclepartaction illegalargumentexception cyclepartaction cyclepartaction cyclepartaction cyclepartaction setforwardactiondefinitionid getactiondefinitionid setbackwardactiondefinitionid getactiondefinitionid setforwardactiondefinitionid getactiondefinitionid setbackwardactiondefinitionid getactiondefinitionid creates a new workbench action factory with the given id param action id the id of actions created by this action factory protected action factory string action id this action id action id actionid actionfactory actionid actionid actionid creates a new standard action for the given workbench window the action has an id as specified by the particular factory p actions automatically register listeners against the workbench window so that they can keep their enablement state up to date ordinarily the window s references to these listeners will be dropped automatically when the window closes however if the client needs to get rid of an action while the window is still open the client must call link i workbench action dispose dispose to give the action an opportunity to deregister its listeners and to perform any other cleanup p param window the workbench window return the workbench action iworkbenchaction returns the id of this action factory return the id of actions created by this action factory public string get id return action id getid actionid public interface i workbench action extends i action disposes of this action once disposed this action cannot be used this operation has no effect if the action has already been disposed iworkbenchaction iaction public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new about action window action set id get id i product product platform get product string product name null if product null product name product get name if product name null product name non nls 1 action set text nls bind workbench messages aboutaction text product name action set tool tip text nls bind workbench messages aboutaction tooltip product name return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction aboutaction setid getid iproduct getproduct productname productname getname productname productname settext workbenchmessages aboutaction_text productname settooltiptext workbenchmessages aboutaction_tooltip productname public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new activate editor action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction activateeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench back action set tool tip text workbench messages workbench backtooltip window get part service add part listener action action set action definition id org eclipse ui navigate back non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_back settooltiptext workbenchmessages workbench_backtooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new navigation history action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction navigationhistoryaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close editor action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close all action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeallaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close all perspectives action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeallperspectivesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close all saved action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeallsavedaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close perspective action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new intro action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction introaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench copy action set tool tip text workbench messages workbench copytooltip window get part service add part listener action action set action definition id org eclipse ui edit copy non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool copy action set disabled image descriptor shared images get image descriptor i shared images img tool copy disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_copy settooltiptext workbenchmessages workbench_copytooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_copy setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_copy_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench cut action set tool tip text workbench messages workbench cuttooltip window get part service add part listener action action set action definition id org eclipse ui edit cut non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool cut action set disabled image descriptor shared images get image descriptor i shared images img tool cut disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_cut settooltiptext workbenchmessages workbench_cuttooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_cut setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_cut_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench delete action set tool tip text workbench messages workbench deletetooltip window get part service add part listener action action set action definition id org eclipse ui edit delete non nls 1 action enable accelerator false window get workbench get help system set help action i workbench help context ids delete retarget action i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool delete action set disabled image descriptor shared images get image descriptor i shared images img tool delete disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_delete settooltiptext workbenchmessages workbench_deletetooltip getpartservice addpartlistener setactiondefinitionid enableaccelerator getworkbench gethelpsystem sethelp iworkbenchhelpcontextids delete_retarget_action isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_delete setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_delete_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new edit action sets action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction editactionsetsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new export resources action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction exportresourcesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench findreplace action set tool tip text workbench messages workbench findreplacetooltip window get part service add part listener action action set action definition id org eclipse ui edit find replace non nls 1 find s images are commented out due to a conflict with search see bug 16412 action set image descriptor workbench images get image descriptor i workbench graphic constants img etool search src action set disabled image descriptor workbench images get image descriptor i workbench graphic constants img etool search src disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_findreplace settooltiptext workbenchmessages workbench_findreplacetooltip getpartservice addpartlistener setactiondefinitionid findreplace setimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_search_src setdisabledimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_search_src_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench forward action set tool tip text workbench messages workbench forwardtooltip window get part service add part listener action action set action definition id org eclipse ui navigate forward non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_forward settooltiptext workbenchmessages workbench_forwardtooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new navigation history action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction navigationhistoryaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench gointo action set tool tip text workbench messages workbench gointotooltip window get part service add part listener action action set action definition id org eclipse ui navigate go into non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_gointo settooltiptext workbenchmessages workbench_gointotooltip getpartservice addpartlistener setactiondefinitionid gointo public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new import resources action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction importresourcesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new lock tool bar action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction locktoolbaraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new maximize part action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction maximizepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new minimize part action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction minimizepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench move action set tool tip text workbench messages workbench movetooltip window get part service add part listener action action set action definition id org eclipse ui edit move non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_move settooltiptext workbenchmessages workbench_movetooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new new wizard action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction newwizardaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new new wizard drop down action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction newwizarddropdownaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench next action set tool tip text workbench messages workbench nexttooltip window get part service add part listener action action set action definition id org eclipse ui navigate next non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_next settooltiptext workbenchmessages workbench_nexttooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle editor action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle part action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cyclepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle perspective action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new open in new window action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction openinnewwindowaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench paste action set tool tip text workbench messages workbench pastetooltip window get part service add part listener action action set action definition id org eclipse ui edit paste non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool paste action set disabled image descriptor shared images get image descriptor i shared images img tool paste disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_paste settooltiptext workbenchmessages workbench_pastetooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_paste setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_paste_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new open preferences action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction openpreferencesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench previous action set tool tip text workbench messages workbench previoustooltip window get part service add part listener action action set action definition id org eclipse ui navigate previous non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_previous settooltiptext workbenchmessages workbench_previoustooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle editor action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle part action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cyclepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle perspective action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench print action set tool tip text workbench messages workbench printtooltip window get part service add part listener action action set action definition id org eclipse ui file print non nls 1 action set image descriptor workbench images get image descriptor i workbench graphic constants img etool print edit action set disabled image descriptor workbench images get image descriptor i workbench graphic constants img etool print edit disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_print settooltiptext workbenchmessages workbench_printtooltip getpartservice addpartlistener setactiondefinitionid setimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_print_edit setdisabledimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_print_edit_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench properties action set tool tip text workbench messages workbench propertiestooltip window get part service add part listener action action set action definition id org eclipse ui file properties non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_properties settooltiptext workbenchmessages workbench_propertiestooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new quit action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction quitaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception label retarget action action new label retarget action get id workbench messages workbench redo action set tool tip text workbench messages workbench redotooltip window get part service add part listener action action set action definition id org eclipse ui edit redo non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool redo action set disabled image descriptor shared images get image descriptor i shared images img tool redo disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception labelretargetaction labelretargetaction getid workbenchmessages workbench_redo settooltiptext workbenchmessages workbench_redotooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_redo setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_redo_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench refresh action set tool tip text workbench messages workbench refreshtooltip window get part service add part listener action action set action definition id org eclipse ui file refresh non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_refresh settooltiptext workbenchmessages workbench_refreshtooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench rename action set tool tip text workbench messages workbench renametooltip window get part service add part listener action action set action definition id org eclipse ui edit rename non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_rename settooltiptext workbenchmessages workbench_renametooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new reset perspective action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction resetperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench revert action set tool tip text workbench messages workbench reverttooltip window get part service add part listener action action set action definition id org eclipse ui file revert non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_revert settooltiptext workbenchmessages workbench_reverttooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save all action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveallaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save as action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveasaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save perspective action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench selectall action set tool tip text workbench messages workbench selectalltooltip window get part service add part listener action action set action definition id org eclipse ui edit select all non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_selectall settooltiptext workbenchmessages workbench_selectalltooltip getpartservice addpartlistener setactiondefinitionid selectall public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new toggle editors visibility action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction toggleeditorsvisibilityaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new workbench editors action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction workbencheditorsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new workbook editors action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction workbookeditorsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new show part pane menu action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction showpartpanemenuaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new show view menu action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction showviewmenuaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception label retarget action action new label retarget action get id workbench messages workbench undo action set tool tip text workbench messages workbench undotooltip window get part service add part listener action action set action definition id org eclipse ui edit undo non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool undo action set disabled image descriptor shared images get image descriptor i shared images img tool undo disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception labelretargetaction labelretargetaction getid workbenchmessages workbench_undo settooltiptext workbenchmessages workbench_undotooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_undo setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_undo_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench up action set tool tip text workbench messages workbench uptooltip window get part service add part listener action action set action definition id org eclipse ui navigate up non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_up settooltiptext workbenchmessages workbench_uptooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new help contents action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction helpcontentsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new help search action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction helpsearchaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new dynamic help action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction dynamichelpaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new open perspective dialog action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction openperspectivedialogaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new new editor action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction neweditoraction setid getid establishes bi direction connections between the forward and backward actions of a cycle pair p example usage pre action factory i workbench action next editor action action factory next editor create window action factory i workbench action previous editor action action factory previous editor create window action factory link cycle action pair next editor action previous editor action pre p param next the action that moves forward param previous the action that moves backward public static void link cycle action pair i workbench action next i workbench action previous if next instanceof cycle part action throw new illegal argument exception if previous instanceof cycle part action throw new illegal argument exception cycle part action n cycle part action next cycle part action p cycle part action previous n set forward action definition id next get action definition id n set backward action definition id previous get action definition id p set forward action definition id next get action definition id p set backward action definition id previous get action definition id actionfactory iworkbenchaction nexteditoraction actionfactory next_editor actionfactory iworkbenchaction previouseditoraction actionfactory previous_editor actionfactory linkcycleactionpair nexteditoraction previouseditoraction linkcycleactionpair iworkbenchaction iworkbenchaction cyclepartaction illegalargumentexception cyclepartaction illegalargumentexception cyclepartaction cyclepartaction cyclepartaction cyclepartaction setforwardactiondefinitionid getactiondefinitionid setbackwardactiondefinitionid getactiondefinitionid setforwardactiondefinitionid getactiondefinitionid setbackwardactiondefinitionid getactiondefinitionid creates a new workbench action factory with the given id param action id the id of actions created by this action factory protected action factory string action id this action id action id actionid actionfactory actionid actionid actionid creates a new standard action for the given workbench window the action has an id as specified by the particular factory p actions automatically register listeners against the workbench window so that they can keep their enablement state up to date ordinarily the window s references to these listeners will be dropped automatically when the window closes however if the client needs to get rid of an action while the window is still open the client must call link i workbench action dispose dispose to give the action an opportunity to deregister its listeners and to perform any other cleanup p param window the workbench window return the workbench action iworkbenchaction returns the id of this action factory return the id of actions created by this action factory public string get id return action id getid actionid public interface i workbench action extends i action disposes of this action once disposed this action cannot be used this operation has no effect if the action has already been disposed iworkbenchaction iaction public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new about action window action set id get id i product product platform get product string product name null if product null product name product get name if product name null product name non nls 1 action set text nls bind workbench messages aboutaction text product name action set tool tip text nls bind workbench messages aboutaction tooltip product name return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction aboutaction setid getid iproduct getproduct productname productname getname productname productname settext workbenchmessages aboutaction_text productname settooltiptext workbenchmessages aboutaction_tooltip productname public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new activate editor action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction activateeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench back action set tool tip text workbench messages workbench backtooltip window get part service add part listener action action set action definition id org eclipse ui navigate back non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_back settooltiptext workbenchmessages workbench_backtooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new navigation history action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction navigationhistoryaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close editor action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close all action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeallaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close all perspectives action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeallperspectivesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close all saved action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeallsavedaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close perspective action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new intro action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction introaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench copy action set tool tip text workbench messages workbench copytooltip window get part service add part listener action action set action definition id org eclipse ui edit copy non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool copy action set disabled image descriptor shared images get image descriptor i shared images img tool copy disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_copy settooltiptext workbenchmessages workbench_copytooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_copy setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_copy_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench cut action set tool tip text workbench messages workbench cuttooltip window get part service add part listener action action set action definition id org eclipse ui edit cut non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool cut action set disabled image descriptor shared images get image descriptor i shared images img tool cut disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_cut settooltiptext workbenchmessages workbench_cuttooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_cut setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_cut_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench delete action set tool tip text workbench messages workbench deletetooltip window get part service add part listener action action set action definition id org eclipse ui edit delete non nls 1 action enable accelerator false window get workbench get help system set help action i workbench help context ids delete retarget action i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool delete action set disabled image descriptor shared images get image descriptor i shared images img tool delete disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_delete settooltiptext workbenchmessages workbench_deletetooltip getpartservice addpartlistener setactiondefinitionid enableaccelerator getworkbench gethelpsystem sethelp iworkbenchhelpcontextids delete_retarget_action isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_delete setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_delete_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new edit action sets action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction editactionsetsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new export resources action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction exportresourcesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench findreplace action set tool tip text workbench messages workbench findreplacetooltip window get part service add part listener action action set action definition id org eclipse ui edit find replace non nls 1 find s images are commented out due to a conflict with search see bug 16412 action set image descriptor workbench images get image descriptor i workbench graphic constants img etool search src action set disabled image descriptor workbench images get image descriptor i workbench graphic constants img etool search src disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_findreplace settooltiptext workbenchmessages workbench_findreplacetooltip getpartservice addpartlistener setactiondefinitionid findreplace setimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_search_src setdisabledimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_search_src_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench forward action set tool tip text workbench messages workbench forwardtooltip window get part service add part listener action action set action definition id org eclipse ui navigate forward non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_forward settooltiptext workbenchmessages workbench_forwardtooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new navigation history action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction navigationhistoryaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench gointo action set tool tip text workbench messages workbench gointotooltip window get part service add part listener action action set action definition id org eclipse ui navigate go into non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_gointo settooltiptext workbenchmessages workbench_gointotooltip getpartservice addpartlistener setactiondefinitionid gointo public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new import resources action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction importresourcesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new lock tool bar action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction locktoolbaraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new maximize part action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction maximizepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new minimize part action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction minimizepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench move action set tool tip text workbench messages workbench movetooltip window get part service add part listener action action set action definition id org eclipse ui edit move non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_move settooltiptext workbenchmessages workbench_movetooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new new wizard action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction newwizardaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new new wizard drop down action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction newwizarddropdownaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench next action set tool tip text workbench messages workbench nexttooltip window get part service add part listener action action set action definition id org eclipse ui navigate next non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_next settooltiptext workbenchmessages workbench_nexttooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle editor action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle part action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cyclepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle perspective action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new open in new window action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction openinnewwindowaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench paste action set tool tip text workbench messages workbench pastetooltip window get part service add part listener action action set action definition id org eclipse ui edit paste non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool paste action set disabled image descriptor shared images get image descriptor i shared images img tool paste disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_paste settooltiptext workbenchmessages workbench_pastetooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_paste setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_paste_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new open preferences action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction openpreferencesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench previous action set tool tip text workbench messages workbench previoustooltip window get part service add part listener action action set action definition id org eclipse ui navigate previous non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_previous settooltiptext workbenchmessages workbench_previoustooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle editor action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle part action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cyclepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle perspective action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench print action set tool tip text workbench messages workbench printtooltip window get part service add part listener action action set action definition id org eclipse ui file print non nls 1 action set image descriptor workbench images get image descriptor i workbench graphic constants img etool print edit action set disabled image descriptor workbench images get image descriptor i workbench graphic constants img etool print edit disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_print settooltiptext workbenchmessages workbench_printtooltip getpartservice addpartlistener setactiondefinitionid setimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_print_edit setdisabledimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_print_edit_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench properties action set tool tip text workbench messages workbench propertiestooltip window get part service add part listener action action set action definition id org eclipse ui file properties non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_properties settooltiptext workbenchmessages workbench_propertiestooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new quit action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction quitaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception label retarget action action new label retarget action get id workbench messages workbench redo action set tool tip text workbench messages workbench redotooltip window get part service add part listener action action set action definition id org eclipse ui edit redo non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool redo action set disabled image descriptor shared images get image descriptor i shared images img tool redo disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception labelretargetaction labelretargetaction getid workbenchmessages workbench_redo settooltiptext workbenchmessages workbench_redotooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_redo setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_redo_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench refresh action set tool tip text workbench messages workbench refreshtooltip window get part service add part listener action action set action definition id org eclipse ui file refresh non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_refresh settooltiptext workbenchmessages workbench_refreshtooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench rename action set tool tip text workbench messages workbench renametooltip window get part service add part listener action action set action definition id org eclipse ui edit rename non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_rename settooltiptext workbenchmessages workbench_renametooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new reset perspective action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction resetperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench revert action set tool tip text workbench messages workbench reverttooltip window get part service add part listener action action set action definition id org eclipse ui file revert non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_revert settooltiptext workbenchmessages workbench_reverttooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save all action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveallaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save as action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveasaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save perspective action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench selectall action set tool tip text workbench messages workbench selectalltooltip window get part service add part listener action action set action definition id org eclipse ui edit select all non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_selectall settooltiptext workbenchmessages workbench_selectalltooltip getpartservice addpartlistener setactiondefinitionid selectall public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new toggle editors visibility action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction toggleeditorsvisibilityaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new workbench editors action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction workbencheditorsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new workbook editors action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction workbookeditorsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new show part pane menu action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction showpartpanemenuaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new show view menu action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction showviewmenuaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception label retarget action action new label retarget action get id workbench messages workbench undo action set tool tip text workbench messages workbench undotooltip window get part service add part listener action action set action definition id org eclipse ui edit undo non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool undo action set disabled image descriptor shared images get image descriptor i shared images img tool undo disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception labelretargetaction labelretargetaction getid workbenchmessages workbench_undo settooltiptext workbenchmessages workbench_undotooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_undo setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_undo_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench up action set tool tip text workbench messages workbench uptooltip window get part service add part listener action action set action definition id org eclipse ui navigate up non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_up settooltiptext workbenchmessages workbench_uptooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new help contents action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction helpcontentsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new help search action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction helpsearchaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new dynamic help action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction dynamichelpaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new open perspective dialog action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction openperspectivedialogaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new new editor action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction neweditoraction setid getid establishes bi direction connections between the forward and backward actions of a cycle pair p example usage pre action factory i workbench action next editor action action factory next editor create window action factory i workbench action previous editor action action factory previous editor create window action factory link cycle action pair next editor action previous editor action pre p param next the action that moves forward param previous the action that moves backward public static void link cycle action pair i workbench action next i workbench action previous if next instanceof cycle part action throw new illegal argument exception if previous instanceof cycle part action throw new illegal argument exception cycle part action n cycle part action next cycle part action p cycle part action previous n set forward action definition id next get action definition id n set backward action definition id previous get action definition id p set forward action definition id next get action definition id p set backward action definition id previous get action definition id actionfactory iworkbenchaction nexteditoraction actionfactory next_editor actionfactory iworkbenchaction previouseditoraction actionfactory previous_editor actionfactory linkcycleactionpair nexteditoraction previouseditoraction linkcycleactionpair iworkbenchaction iworkbenchaction cyclepartaction illegalargumentexception cyclepartaction illegalargumentexception cyclepartaction cyclepartaction cyclepartaction cyclepartaction setforwardactiondefinitionid getactiondefinitionid setbackwardactiondefinitionid getactiondefinitionid setforwardactiondefinitionid getactiondefinitionid setbackwardactiondefinitionid getactiondefinitionid creates a new workbench action factory with the given id param action id the id of actions created by this action factory protected action factory string action id this action id action id actionid actionfactory actionid actionid actionid creates a new standard action for the given workbench window the action has an id as specified by the particular factory p actions automatically register listeners against the workbench window so that they can keep their enablement state up to date ordinarily the window s references to these listeners will be dropped automatically when the window closes however if the client needs to get rid of an action while the window is still open the client must call link i workbench action dispose dispose to give the action an opportunity to deregister its listeners and to perform any other cleanup p param window the workbench window return the workbench action iworkbenchaction returns the id of this action factory return the id of actions created by this action factory public string get id return action id getid actionid public interface i workbench action extends i action disposes of this action once disposed this action cannot be used this operation has no effect if the action has already been disposed iworkbenchaction iaction public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new about action window action set id get id i product product platform get product string product name null if product null product name product get name if product name null product name non nls 1 action set text nls bind workbench messages aboutaction text product name action set tool tip text nls bind workbench messages aboutaction tooltip product name return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction aboutaction setid getid iproduct getproduct productname productname getname productname productname settext workbenchmessages aboutaction_text productname settooltiptext workbenchmessages aboutaction_tooltip productname public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new activate editor action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction activateeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench back action set tool tip text workbench messages workbench backtooltip window get part service add part listener action action set action definition id org eclipse ui navigate back non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_back settooltiptext workbenchmessages workbench_backtooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new navigation history action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction navigationhistoryaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close editor action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close all action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeallaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close all perspectives action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeallperspectivesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close all saved action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeallsavedaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close perspective action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new intro action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction introaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench copy action set tool tip text workbench messages workbench copytooltip window get part service add part listener action action set action definition id org eclipse ui edit copy non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool copy action set disabled image descriptor shared images get image descriptor i shared images img tool copy disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_copy settooltiptext workbenchmessages workbench_copytooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_copy setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_copy_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench cut action set tool tip text workbench messages workbench cuttooltip window get part service add part listener action action set action definition id org eclipse ui edit cut non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool cut action set disabled image descriptor shared images get image descriptor i shared images img tool cut disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_cut settooltiptext workbenchmessages workbench_cuttooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_cut setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_cut_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench delete action set tool tip text workbench messages workbench deletetooltip window get part service add part listener action action set action definition id org eclipse ui edit delete non nls 1 action enable accelerator false window get workbench get help system set help action i workbench help context ids delete retarget action i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool delete action set disabled image descriptor shared images get image descriptor i shared images img tool delete disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_delete settooltiptext workbenchmessages workbench_deletetooltip getpartservice addpartlistener setactiondefinitionid enableaccelerator getworkbench gethelpsystem sethelp iworkbenchhelpcontextids delete_retarget_action isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_delete setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_delete_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new edit action sets action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction editactionsetsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new export resources action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction exportresourcesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench findreplace action set tool tip text workbench messages workbench findreplacetooltip window get part service add part listener action action set action definition id org eclipse ui edit find replace non nls 1 find s images are commented out due to a conflict with search see bug 16412 action set image descriptor workbench images get image descriptor i workbench graphic constants img etool search src action set disabled image descriptor workbench images get image descriptor i workbench graphic constants img etool search src disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_findreplace settooltiptext workbenchmessages workbench_findreplacetooltip getpartservice addpartlistener setactiondefinitionid findreplace setimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_search_src setdisabledimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_search_src_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench forward action set tool tip text workbench messages workbench forwardtooltip window get part service add part listener action action set action definition id org eclipse ui navigate forward non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_forward settooltiptext workbenchmessages workbench_forwardtooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new navigation history action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction navigationhistoryaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench gointo action set tool tip text workbench messages workbench gointotooltip window get part service add part listener action action set action definition id org eclipse ui navigate go into non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_gointo settooltiptext workbenchmessages workbench_gointotooltip getpartservice addpartlistener setactiondefinitionid gointo public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new import resources action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction importresourcesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new lock tool bar action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction locktoolbaraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new maximize part action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction maximizepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new minimize part action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction minimizepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench move action set tool tip text workbench messages workbench movetooltip window get part service add part listener action action set action definition id org eclipse ui edit move non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_move settooltiptext workbenchmessages workbench_movetooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new new wizard action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction newwizardaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new new wizard drop down action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction newwizarddropdownaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench next action set tool tip text workbench messages workbench nexttooltip window get part service add part listener action action set action definition id org eclipse ui navigate next non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_next settooltiptext workbenchmessages workbench_nexttooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle editor action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle part action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cyclepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle perspective action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new open in new window action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction openinnewwindowaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench paste action set tool tip text workbench messages workbench pastetooltip window get part service add part listener action action set action definition id org eclipse ui edit paste non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool paste action set disabled image descriptor shared images get image descriptor i shared images img tool paste disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_paste settooltiptext workbenchmessages workbench_pastetooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_paste setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_paste_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new open preferences action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction openpreferencesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench previous action set tool tip text workbench messages workbench previoustooltip window get part service add part listener action action set action definition id org eclipse ui navigate previous non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_previous settooltiptext workbenchmessages workbench_previoustooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle editor action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle part action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cyclepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle perspective action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench print action set tool tip text workbench messages workbench printtooltip window get part service add part listener action action set action definition id org eclipse ui file print non nls 1 action set image descriptor workbench images get image descriptor i workbench graphic constants img etool print edit action set disabled image descriptor workbench images get image descriptor i workbench graphic constants img etool print edit disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_print settooltiptext workbenchmessages workbench_printtooltip getpartservice addpartlistener setactiondefinitionid setimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_print_edit setdisabledimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_print_edit_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench properties action set tool tip text workbench messages workbench propertiestooltip window get part service add part listener action action set action definition id org eclipse ui file properties non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_properties settooltiptext workbenchmessages workbench_propertiestooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new quit action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction quitaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception label retarget action action new label retarget action get id workbench messages workbench redo action set tool tip text workbench messages workbench redotooltip window get part service add part listener action action set action definition id org eclipse ui edit redo non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool redo action set disabled image descriptor shared images get image descriptor i shared images img tool redo disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception labelretargetaction labelretargetaction getid workbenchmessages workbench_redo settooltiptext workbenchmessages workbench_redotooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_redo setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_redo_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench refresh action set tool tip text workbench messages workbench refreshtooltip window get part service add part listener action action set action definition id org eclipse ui file refresh non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_refresh settooltiptext workbenchmessages workbench_refreshtooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench rename action set tool tip text workbench messages workbench renametooltip window get part service add part listener action action set action definition id org eclipse ui edit rename non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_rename settooltiptext workbenchmessages workbench_renametooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new reset perspective action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction resetperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench revert action set tool tip text workbench messages workbench reverttooltip window get part service add part listener action action set action definition id org eclipse ui file revert non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_revert settooltiptext workbenchmessages workbench_reverttooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save all action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveallaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save as action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveasaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save perspective action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench selectall action set tool tip text workbench messages workbench selectalltooltip window get part service add part listener action action set action definition id org eclipse ui edit select all non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_selectall settooltiptext workbenchmessages workbench_selectalltooltip getpartservice addpartlistener setactiondefinitionid selectall public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new toggle editors visibility action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction toggleeditorsvisibilityaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new workbench editors action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction workbencheditorsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new workbook editors action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction workbookeditorsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new show part pane menu action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction showpartpanemenuaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new show view menu action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction showviewmenuaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception label retarget action action new label retarget action get id workbench messages workbench undo action set tool tip text workbench messages workbench undotooltip window get part service add part listener action action set action definition id org eclipse ui edit undo non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool undo action set disabled image descriptor shared images get image descriptor i shared images img tool undo disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception labelretargetaction labelretargetaction getid workbenchmessages workbench_undo settooltiptext workbenchmessages workbench_undotooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_undo setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_undo_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench up action set tool tip text workbench messages workbench uptooltip window get part service add part listener action action set action definition id org eclipse ui navigate up non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_up settooltiptext workbenchmessages workbench_uptooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new help contents action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction helpcontentsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new help search action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction helpsearchaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new dynamic help action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction dynamichelpaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new open perspective dialog action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction openperspectivedialogaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new new editor action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction neweditoraction setid getid establishes bi direction connections between the forward and backward actions of a cycle pair p example usage pre action factory i workbench action next editor action action factory next editor create window action factory i workbench action previous editor action action factory previous editor create window action factory link cycle action pair next editor action previous editor action pre p param next the action that moves forward param previous the action that moves backward public static void link cycle action pair i workbench action next i workbench action previous if next instanceof cycle part action throw new illegal argument exception if previous instanceof cycle part action throw new illegal argument exception cycle part action n cycle part action next cycle part action p cycle part action previous n set forward action definition id next get action definition id n set backward action definition id previous get action definition id p set forward action definition id next get action definition id p set backward action definition id previous get action definition id actionfactory iworkbenchaction nexteditoraction actionfactory next_editor actionfactory iworkbenchaction previouseditoraction actionfactory previous_editor actionfactory linkcycleactionpair nexteditoraction previouseditoraction linkcycleactionpair iworkbenchaction iworkbenchaction cyclepartaction illegalargumentexception cyclepartaction illegalargumentexception cyclepartaction cyclepartaction cyclepartaction cyclepartaction setforwardactiondefinitionid getactiondefinitionid setbackwardactiondefinitionid getactiondefinitionid setforwardactiondefinitionid getactiondefinitionid setbackwardactiondefinitionid getactiondefinitionid creates a new workbench action factory with the given id param action id the id of actions created by this action factory protected action factory string action id this action id action id actionid actionfactory actionid actionid actionid creates a new standard action for the given workbench window the action has an id as specified by the particular factory p actions automatically register listeners against the workbench window so that they can keep their enablement state up to date ordinarily the window s references to these listeners will be dropped automatically when the window closes however if the client needs to get rid of an action while the window is still open the client must call link i workbench action dispose dispose to give the action an opportunity to deregister its listeners and to perform any other cleanup p param window the workbench window return the workbench action iworkbenchaction returns the id of this action factory return the id of actions created by this action factory public string get id return action id getid actionid public interface i workbench action extends i action disposes of this action once disposed this action cannot be used this operation has no effect if the action has already been disposed iworkbenchaction iaction public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new about action window action set id get id i product product platform get product string product name null if product null product name product get name if product name null product name non nls 1 action set text nls bind workbench messages aboutaction text product name action set tool tip text nls bind workbench messages aboutaction tooltip product name return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction aboutaction setid getid iproduct getproduct productname productname getname productname productname settext workbenchmessages aboutaction_text productname settooltiptext workbenchmessages aboutaction_tooltip productname public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new activate editor action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction activateeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench back action set tool tip text workbench messages workbench backtooltip window get part service add part listener action action set action definition id org eclipse ui navigate back non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_back settooltiptext workbenchmessages workbench_backtooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new navigation history action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction navigationhistoryaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close editor action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close all action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeallaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close all perspectives action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeallperspectivesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close all saved action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeallsavedaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close perspective action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new intro action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction introaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench copy action set tool tip text workbench messages workbench copytooltip window get part service add part listener action action set action definition id org eclipse ui edit copy non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool copy action set disabled image descriptor shared images get image descriptor i shared images img tool copy disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_copy settooltiptext workbenchmessages workbench_copytooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_copy setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_copy_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench cut action set tool tip text workbench messages workbench cuttooltip window get part service add part listener action action set action definition id org eclipse ui edit cut non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool cut action set disabled image descriptor shared images get image descriptor i shared images img tool cut disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_cut settooltiptext workbenchmessages workbench_cuttooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_cut setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_cut_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench delete action set tool tip text workbench messages workbench deletetooltip window get part service add part listener action action set action definition id org eclipse ui edit delete non nls 1 action enable accelerator false window get workbench get help system set help action i workbench help context ids delete retarget action i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool delete action set disabled image descriptor shared images get image descriptor i shared images img tool delete disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_delete settooltiptext workbenchmessages workbench_deletetooltip getpartservice addpartlistener setactiondefinitionid enableaccelerator getworkbench gethelpsystem sethelp iworkbenchhelpcontextids delete_retarget_action isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_delete setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_delete_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new edit action sets action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction editactionsetsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new export resources action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction exportresourcesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench findreplace action set tool tip text workbench messages workbench findreplacetooltip window get part service add part listener action action set action definition id org eclipse ui edit find replace non nls 1 find s images are commented out due to a conflict with search see bug 16412 action set image descriptor workbench images get image descriptor i workbench graphic constants img etool search src action set disabled image descriptor workbench images get image descriptor i workbench graphic constants img etool search src disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_findreplace settooltiptext workbenchmessages workbench_findreplacetooltip getpartservice addpartlistener setactiondefinitionid findreplace setimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_search_src setdisabledimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_search_src_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench forward action set tool tip text workbench messages workbench forwardtooltip window get part service add part listener action action set action definition id org eclipse ui navigate forward non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_forward settooltiptext workbenchmessages workbench_forwardtooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new navigation history action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction navigationhistoryaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench gointo action set tool tip text workbench messages workbench gointotooltip window get part service add part listener action action set action definition id org eclipse ui navigate go into non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_gointo settooltiptext workbenchmessages workbench_gointotooltip getpartservice addpartlistener setactiondefinitionid gointo public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new import resources action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction importresourcesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new lock tool bar action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction locktoolbaraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new maximize part action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction maximizepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new minimize part action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction minimizepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench move action set tool tip text workbench messages workbench movetooltip window get part service add part listener action action set action definition id org eclipse ui edit move non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_move settooltiptext workbenchmessages workbench_movetooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new new wizard action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction newwizardaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new new wizard drop down action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction newwizarddropdownaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench next action set tool tip text workbench messages workbench nexttooltip window get part service add part listener action action set action definition id org eclipse ui navigate next non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_next settooltiptext workbenchmessages workbench_nexttooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle editor action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle part action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cyclepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle perspective action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new open in new window action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction openinnewwindowaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench paste action set tool tip text workbench messages workbench pastetooltip window get part service add part listener action action set action definition id org eclipse ui edit paste non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool paste action set disabled image descriptor shared images get image descriptor i shared images img tool paste disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_paste settooltiptext workbenchmessages workbench_pastetooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_paste setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_paste_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new open preferences action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction openpreferencesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench previous action set tool tip text workbench messages workbench previoustooltip window get part service add part listener action action set action definition id org eclipse ui navigate previous non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_previous settooltiptext workbenchmessages workbench_previoustooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle editor action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle part action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cyclepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle perspective action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench print action set tool tip text workbench messages workbench printtooltip window get part service add part listener action action set action definition id org eclipse ui file print non nls 1 action set image descriptor workbench images get image descriptor i workbench graphic constants img etool print edit action set disabled image descriptor workbench images get image descriptor i workbench graphic constants img etool print edit disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_print settooltiptext workbenchmessages workbench_printtooltip getpartservice addpartlistener setactiondefinitionid setimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_print_edit setdisabledimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_print_edit_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench properties action set tool tip text workbench messages workbench propertiestooltip window get part service add part listener action action set action definition id org eclipse ui file properties non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_properties settooltiptext workbenchmessages workbench_propertiestooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new quit action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction quitaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception label retarget action action new label retarget action get id workbench messages workbench redo action set tool tip text workbench messages workbench redotooltip window get part service add part listener action action set action definition id org eclipse ui edit redo non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool redo action set disabled image descriptor shared images get image descriptor i shared images img tool redo disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception labelretargetaction labelretargetaction getid workbenchmessages workbench_redo settooltiptext workbenchmessages workbench_redotooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_redo setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_redo_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench refresh action set tool tip text workbench messages workbench refreshtooltip window get part service add part listener action action set action definition id org eclipse ui file refresh non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_refresh settooltiptext workbenchmessages workbench_refreshtooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench rename action set tool tip text workbench messages workbench renametooltip window get part service add part listener action action set action definition id org eclipse ui edit rename non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_rename settooltiptext workbenchmessages workbench_renametooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new reset perspective action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction resetperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench revert action set tool tip text workbench messages workbench reverttooltip window get part service add part listener action action set action definition id org eclipse ui file revert non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_revert settooltiptext workbenchmessages workbench_reverttooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save all action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveallaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save as action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveasaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save perspective action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench selectall action set tool tip text workbench messages workbench selectalltooltip window get part service add part listener action action set action definition id org eclipse ui edit select all non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_selectall settooltiptext workbenchmessages workbench_selectalltooltip getpartservice addpartlistener setactiondefinitionid selectall public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new toggle editors visibility action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction toggleeditorsvisibilityaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new workbench editors action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction workbencheditorsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new workbook editors action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction workbookeditorsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new show part pane menu action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction showpartpanemenuaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new show view menu action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction showviewmenuaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception label retarget action action new label retarget action get id workbench messages workbench undo action set tool tip text workbench messages workbench undotooltip window get part service add part listener action action set action definition id org eclipse ui edit undo non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool undo action set disabled image descriptor shared images get image descriptor i shared images img tool undo disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception labelretargetaction labelretargetaction getid workbenchmessages workbench_undo settooltiptext workbenchmessages workbench_undotooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_undo setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_undo_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench up action set tool tip text workbench messages workbench uptooltip window get part service add part listener action action set action definition id org eclipse ui navigate up non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_up settooltiptext workbenchmessages workbench_uptooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new help contents action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction helpcontentsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new help search action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction helpsearchaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new dynamic help action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction dynamichelpaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new open perspective dialog action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction openperspectivedialogaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new new editor action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction neweditoraction setid getid establishes bi direction connections between the forward and backward actions of a cycle pair p example usage pre action factory i workbench action next editor action action factory next editor create window action factory i workbench action previous editor action action factory previous editor create window action factory link cycle action pair next editor action previous editor action pre p param next the action that moves forward param previous the action that moves backward public static void link cycle action pair i workbench action next i workbench action previous if next instanceof cycle part action throw new illegal argument exception if previous instanceof cycle part action throw new illegal argument exception cycle part action n cycle part action next cycle part action p cycle part action previous n set forward action definition id next get action definition id n set backward action definition id previous get action definition id p set forward action definition id next get action definition id p set backward action definition id previous get action definition id actionfactory iworkbenchaction nexteditoraction actionfactory next_editor actionfactory iworkbenchaction previouseditoraction actionfactory previous_editor actionfactory linkcycleactionpair nexteditoraction previouseditoraction linkcycleactionpair iworkbenchaction iworkbenchaction cyclepartaction illegalargumentexception cyclepartaction illegalargumentexception cyclepartaction cyclepartaction cyclepartaction cyclepartaction setforwardactiondefinitionid getactiondefinitionid setbackwardactiondefinitionid getactiondefinitionid setforwardactiondefinitionid getactiondefinitionid setbackwardactiondefinitionid getactiondefinitionid creates a new workbench action factory with the given id param action id the id of actions created by this action factory protected action factory string action id this action id action id actionid actionfactory actionid actionid actionid creates a new standard action for the given workbench window the action has an id as specified by the particular factory p actions automatically register listeners against the workbench window so that they can keep their enablement state up to date ordinarily the window s references to these listeners will be dropped automatically when the window closes however if the client needs to get rid of an action while the window is still open the client must call link i workbench action dispose dispose to give the action an opportunity to deregister its listeners and to perform any other cleanup p param window the workbench window return the workbench action iworkbenchaction returns the id of this action factory return the id of actions created by this action factory public string get id return action id getid actionid public interface i workbench action extends i action disposes of this action once disposed this action cannot be used this operation has no effect if the action has already been disposed iworkbenchaction iaction public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new about action window action set id get id i product product platform get product string product name null if product null product name product get name if product name null product name non nls 1 action set text nls bind workbench messages aboutaction text product name action set tool tip text nls bind workbench messages aboutaction tooltip product name return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction aboutaction setid getid iproduct getproduct productname productname getname productname productname settext workbenchmessages aboutaction_text productname settooltiptext workbenchmessages aboutaction_tooltip productname public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new activate editor action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction activateeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench back action set tool tip text workbench messages workbench backtooltip window get part service add part listener action action set action definition id org eclipse ui navigate back non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_back settooltiptext workbenchmessages workbench_backtooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new navigation history action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction navigationhistoryaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close editor action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close all action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeallaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close all perspectives action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeallperspectivesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close all saved action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeallsavedaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close perspective action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new intro action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction introaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench copy action set tool tip text workbench messages workbench copytooltip window get part service add part listener action action set action definition id org eclipse ui edit copy non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool copy action set disabled image descriptor shared images get image descriptor i shared images img tool copy disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_copy settooltiptext workbenchmessages workbench_copytooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_copy setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_copy_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench cut action set tool tip text workbench messages workbench cuttooltip window get part service add part listener action action set action definition id org eclipse ui edit cut non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool cut action set disabled image descriptor shared images get image descriptor i shared images img tool cut disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_cut settooltiptext workbenchmessages workbench_cuttooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_cut setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_cut_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench delete action set tool tip text workbench messages workbench deletetooltip window get part service add part listener action action set action definition id org eclipse ui edit delete non nls 1 action enable accelerator false window get workbench get help system set help action i workbench help context ids delete retarget action i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool delete action set disabled image descriptor shared images get image descriptor i shared images img tool delete disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_delete settooltiptext workbenchmessages workbench_deletetooltip getpartservice addpartlistener setactiondefinitionid enableaccelerator getworkbench gethelpsystem sethelp iworkbenchhelpcontextids delete_retarget_action isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_delete setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_delete_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new edit action sets action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction editactionsetsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new export resources action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction exportresourcesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench findreplace action set tool tip text workbench messages workbench findreplacetooltip window get part service add part listener action action set action definition id org eclipse ui edit find replace non nls 1 find s images are commented out due to a conflict with search see bug 16412 action set image descriptor workbench images get image descriptor i workbench graphic constants img etool search src action set disabled image descriptor workbench images get image descriptor i workbench graphic constants img etool search src disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_findreplace settooltiptext workbenchmessages workbench_findreplacetooltip getpartservice addpartlistener setactiondefinitionid findreplace setimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_search_src setdisabledimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_search_src_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench forward action set tool tip text workbench messages workbench forwardtooltip window get part service add part listener action action set action definition id org eclipse ui navigate forward non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_forward settooltiptext workbenchmessages workbench_forwardtooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new navigation history action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction navigationhistoryaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench gointo action set tool tip text workbench messages workbench gointotooltip window get part service add part listener action action set action definition id org eclipse ui navigate go into non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_gointo settooltiptext workbenchmessages workbench_gointotooltip getpartservice addpartlistener setactiondefinitionid gointo public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new import resources action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction importresourcesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new lock tool bar action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction locktoolbaraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new maximize part action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction maximizepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new minimize part action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction minimizepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench move action set tool tip text workbench messages workbench movetooltip window get part service add part listener action action set action definition id org eclipse ui edit move non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_move settooltiptext workbenchmessages workbench_movetooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new new wizard action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction newwizardaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new new wizard drop down action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction newwizarddropdownaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench next action set tool tip text workbench messages workbench nexttooltip window get part service add part listener action action set action definition id org eclipse ui navigate next non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_next settooltiptext workbenchmessages workbench_nexttooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle editor action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle part action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cyclepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle perspective action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new open in new window action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction openinnewwindowaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench paste action set tool tip text workbench messages workbench pastetooltip window get part service add part listener action action set action definition id org eclipse ui edit paste non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool paste action set disabled image descriptor shared images get image descriptor i shared images img tool paste disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_paste settooltiptext workbenchmessages workbench_pastetooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_paste setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_paste_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new open preferences action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction openpreferencesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench previous action set tool tip text workbench messages workbench previoustooltip window get part service add part listener action action set action definition id org eclipse ui navigate previous non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_previous settooltiptext workbenchmessages workbench_previoustooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle editor action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle part action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cyclepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle perspective action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench print action set tool tip text workbench messages workbench printtooltip window get part service add part listener action action set action definition id org eclipse ui file print non nls 1 action set image descriptor workbench images get image descriptor i workbench graphic constants img etool print edit action set disabled image descriptor workbench images get image descriptor i workbench graphic constants img etool print edit disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_print settooltiptext workbenchmessages workbench_printtooltip getpartservice addpartlistener setactiondefinitionid setimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_print_edit setdisabledimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_print_edit_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench properties action set tool tip text workbench messages workbench propertiestooltip window get part service add part listener action action set action definition id org eclipse ui file properties non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_properties settooltiptext workbenchmessages workbench_propertiestooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new quit action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction quitaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception label retarget action action new label retarget action get id workbench messages workbench redo action set tool tip text workbench messages workbench redotooltip window get part service add part listener action action set action definition id org eclipse ui edit redo non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool redo action set disabled image descriptor shared images get image descriptor i shared images img tool redo disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception labelretargetaction labelretargetaction getid workbenchmessages workbench_redo settooltiptext workbenchmessages workbench_redotooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_redo setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_redo_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench refresh action set tool tip text workbench messages workbench refreshtooltip window get part service add part listener action action set action definition id org eclipse ui file refresh non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_refresh settooltiptext workbenchmessages workbench_refreshtooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench rename action set tool tip text workbench messages workbench renametooltip window get part service add part listener action action set action definition id org eclipse ui edit rename non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_rename settooltiptext workbenchmessages workbench_renametooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new reset perspective action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction resetperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench revert action set tool tip text workbench messages workbench reverttooltip window get part service add part listener action action set action definition id org eclipse ui file revert non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_revert settooltiptext workbenchmessages workbench_reverttooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save all action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveallaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save as action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveasaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save perspective action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench selectall action set tool tip text workbench messages workbench selectalltooltip window get part service add part listener action action set action definition id org eclipse ui edit select all non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_selectall settooltiptext workbenchmessages workbench_selectalltooltip getpartservice addpartlistener setactiondefinitionid selectall public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new toggle editors visibility action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction toggleeditorsvisibilityaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new workbench editors action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction workbencheditorsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new workbook editors action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction workbookeditorsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new show part pane menu action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction showpartpanemenuaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new show view menu action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction showviewmenuaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception label retarget action action new label retarget action get id workbench messages workbench undo action set tool tip text workbench messages workbench undotooltip window get part service add part listener action action set action definition id org eclipse ui edit undo non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool undo action set disabled image descriptor shared images get image descriptor i shared images img tool undo disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception labelretargetaction labelretargetaction getid workbenchmessages workbench_undo settooltiptext workbenchmessages workbench_undotooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_undo setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_undo_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench up action set tool tip text workbench messages workbench uptooltip window get part service add part listener action action set action definition id org eclipse ui navigate up non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_up settooltiptext workbenchmessages workbench_uptooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new help contents action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction helpcontentsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new help search action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction helpsearchaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new dynamic help action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction dynamichelpaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new open perspective dialog action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction openperspectivedialogaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new new editor action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction neweditoraction setid getid establishes bi direction connections between the forward and backward actions of a cycle pair p example usage pre action factory i workbench action next editor action action factory next editor create window action factory i workbench action previous editor action action factory previous editor create window action factory link cycle action pair next editor action previous editor action pre p param next the action that moves forward param previous the action that moves backward public static void link cycle action pair i workbench action next i workbench action previous if next instanceof cycle part action throw new illegal argument exception if previous instanceof cycle part action throw new illegal argument exception cycle part action n cycle part action next cycle part action p cycle part action previous n set forward action definition id next get action definition id n set backward action definition id previous get action definition id p set forward action definition id next get action definition id p set backward action definition id previous get action definition id actionfactory iworkbenchaction nexteditoraction actionfactory next_editor actionfactory iworkbenchaction previouseditoraction actionfactory previous_editor actionfactory linkcycleactionpair nexteditoraction previouseditoraction linkcycleactionpair iworkbenchaction iworkbenchaction cyclepartaction illegalargumentexception cyclepartaction illegalargumentexception cyclepartaction cyclepartaction cyclepartaction cyclepartaction setforwardactiondefinitionid getactiondefinitionid setbackwardactiondefinitionid getactiondefinitionid setforwardactiondefinitionid getactiondefinitionid setbackwardactiondefinitionid getactiondefinitionid creates a new workbench action factory with the given id param action id the id of actions created by this action factory protected action factory string action id this action id action id actionid actionfactory actionid actionid actionid creates a new standard action for the given workbench window the action has an id as specified by the particular factory p actions automatically register listeners against the workbench window so that they can keep their enablement state up to date ordinarily the window s references to these listeners will be dropped automatically when the window closes however if the client needs to get rid of an action while the window is still open the client must call link i workbench action dispose dispose to give the action an opportunity to deregister its listeners and to perform any other cleanup p param window the workbench window return the workbench action iworkbenchaction returns the id of this action factory return the id of actions created by this action factory public string get id return action id getid actionid public interface i workbench action extends i action disposes of this action once disposed this action cannot be used this operation has no effect if the action has already been disposed iworkbenchaction iaction public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new about action window action set id get id i product product platform get product string product name null if product null product name product get name if product name null product name non nls 1 action set text nls bind workbench messages aboutaction text product name action set tool tip text nls bind workbench messages aboutaction tooltip product name return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction aboutaction setid getid iproduct getproduct productname productname getname productname productname settext workbenchmessages aboutaction_text productname settooltiptext workbenchmessages aboutaction_tooltip productname public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new activate editor action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction activateeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench back action set tool tip text workbench messages workbench backtooltip window get part service add part listener action action set action definition id org eclipse ui navigate back non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_back settooltiptext workbenchmessages workbench_backtooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new navigation history action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction navigationhistoryaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close editor action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close all action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeallaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close all perspectives action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeallperspectivesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close all saved action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeallsavedaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close perspective action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new intro action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction introaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench copy action set tool tip text workbench messages workbench copytooltip window get part service add part listener action action set action definition id org eclipse ui edit copy non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool copy action set disabled image descriptor shared images get image descriptor i shared images img tool copy disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_copy settooltiptext workbenchmessages workbench_copytooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_copy setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_copy_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench cut action set tool tip text workbench messages workbench cuttooltip window get part service add part listener action action set action definition id org eclipse ui edit cut non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool cut action set disabled image descriptor shared images get image descriptor i shared images img tool cut disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_cut settooltiptext workbenchmessages workbench_cuttooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_cut setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_cut_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench delete action set tool tip text workbench messages workbench deletetooltip window get part service add part listener action action set action definition id org eclipse ui edit delete non nls 1 action enable accelerator false window get workbench get help system set help action i workbench help context ids delete retarget action i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool delete action set disabled image descriptor shared images get image descriptor i shared images img tool delete disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_delete settooltiptext workbenchmessages workbench_deletetooltip getpartservice addpartlistener setactiondefinitionid enableaccelerator getworkbench gethelpsystem sethelp iworkbenchhelpcontextids delete_retarget_action isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_delete setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_delete_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new edit action sets action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction editactionsetsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new export resources action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction exportresourcesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench findreplace action set tool tip text workbench messages workbench findreplacetooltip window get part service add part listener action action set action definition id org eclipse ui edit find replace non nls 1 find s images are commented out due to a conflict with search see bug 16412 action set image descriptor workbench images get image descriptor i workbench graphic constants img etool search src action set disabled image descriptor workbench images get image descriptor i workbench graphic constants img etool search src disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_findreplace settooltiptext workbenchmessages workbench_findreplacetooltip getpartservice addpartlistener setactiondefinitionid findreplace setimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_search_src setdisabledimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_search_src_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench forward action set tool tip text workbench messages workbench forwardtooltip window get part service add part listener action action set action definition id org eclipse ui navigate forward non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_forward settooltiptext workbenchmessages workbench_forwardtooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new navigation history action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction navigationhistoryaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench gointo action set tool tip text workbench messages workbench gointotooltip window get part service add part listener action action set action definition id org eclipse ui navigate go into non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_gointo settooltiptext workbenchmessages workbench_gointotooltip getpartservice addpartlistener setactiondefinitionid gointo public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new import resources action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction importresourcesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new lock tool bar action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction locktoolbaraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new maximize part action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction maximizepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new minimize part action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction minimizepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench move action set tool tip text workbench messages workbench movetooltip window get part service add part listener action action set action definition id org eclipse ui edit move non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_move settooltiptext workbenchmessages workbench_movetooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new new wizard action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction newwizardaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new new wizard drop down action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction newwizarddropdownaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench next action set tool tip text workbench messages workbench nexttooltip window get part service add part listener action action set action definition id org eclipse ui navigate next non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_next settooltiptext workbenchmessages workbench_nexttooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle editor action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle part action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cyclepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle perspective action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new open in new window action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction openinnewwindowaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench paste action set tool tip text workbench messages workbench pastetooltip window get part service add part listener action action set action definition id org eclipse ui edit paste non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool paste action set disabled image descriptor shared images get image descriptor i shared images img tool paste disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_paste settooltiptext workbenchmessages workbench_pastetooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_paste setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_paste_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new open preferences action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction openpreferencesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench previous action set tool tip text workbench messages workbench previoustooltip window get part service add part listener action action set action definition id org eclipse ui navigate previous non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_previous settooltiptext workbenchmessages workbench_previoustooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle editor action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle part action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cyclepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle perspective action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench print action set tool tip text workbench messages workbench printtooltip window get part service add part listener action action set action definition id org eclipse ui file print non nls 1 action set image descriptor workbench images get image descriptor i workbench graphic constants img etool print edit action set disabled image descriptor workbench images get image descriptor i workbench graphic constants img etool print edit disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_print settooltiptext workbenchmessages workbench_printtooltip getpartservice addpartlistener setactiondefinitionid setimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_print_edit setdisabledimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_print_edit_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench properties action set tool tip text workbench messages workbench propertiestooltip window get part service add part listener action action set action definition id org eclipse ui file properties non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_properties settooltiptext workbenchmessages workbench_propertiestooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new quit action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction quitaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception label retarget action action new label retarget action get id workbench messages workbench redo action set tool tip text workbench messages workbench redotooltip window get part service add part listener action action set action definition id org eclipse ui edit redo non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool redo action set disabled image descriptor shared images get image descriptor i shared images img tool redo disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception labelretargetaction labelretargetaction getid workbenchmessages workbench_redo settooltiptext workbenchmessages workbench_redotooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_redo setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_redo_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench refresh action set tool tip text workbench messages workbench refreshtooltip window get part service add part listener action action set action definition id org eclipse ui file refresh non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_refresh settooltiptext workbenchmessages workbench_refreshtooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench rename action set tool tip text workbench messages workbench renametooltip window get part service add part listener action action set action definition id org eclipse ui edit rename non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_rename settooltiptext workbenchmessages workbench_renametooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new reset perspective action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction resetperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench revert action set tool tip text workbench messages workbench reverttooltip window get part service add part listener action action set action definition id org eclipse ui file revert non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_revert settooltiptext workbenchmessages workbench_reverttooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save all action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveallaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save as action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveasaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save perspective action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench selectall action set tool tip text workbench messages workbench selectalltooltip window get part service add part listener action action set action definition id org eclipse ui edit select all non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_selectall settooltiptext workbenchmessages workbench_selectalltooltip getpartservice addpartlistener setactiondefinitionid selectall public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new toggle editors visibility action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction toggleeditorsvisibilityaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new workbench editors action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction workbencheditorsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new workbook editors action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction workbookeditorsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new show part pane menu action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction showpartpanemenuaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new show view menu action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction showviewmenuaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception label retarget action action new label retarget action get id workbench messages workbench undo action set tool tip text workbench messages workbench undotooltip window get part service add part listener action action set action definition id org eclipse ui edit undo non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool undo action set disabled image descriptor shared images get image descriptor i shared images img tool undo disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception labelretargetaction labelretargetaction getid workbenchmessages workbench_undo settooltiptext workbenchmessages workbench_undotooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_undo setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_undo_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench up action set tool tip text workbench messages workbench uptooltip window get part service add part listener action action set action definition id org eclipse ui navigate up non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_up settooltiptext workbenchmessages workbench_uptooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new help contents action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction helpcontentsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new help search action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction helpsearchaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new dynamic help action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction dynamichelpaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new open perspective dialog action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction openperspectivedialogaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new new editor action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction neweditoraction setid getid establishes bi direction connections between the forward and backward actions of a cycle pair p example usage pre action factory i workbench action next editor action action factory next editor create window action factory i workbench action previous editor action action factory previous editor create window action factory link cycle action pair next editor action previous editor action pre p param next the action that moves forward param previous the action that moves backward public static void link cycle action pair i workbench action next i workbench action previous if next instanceof cycle part action throw new illegal argument exception if previous instanceof cycle part action throw new illegal argument exception cycle part action n cycle part action next cycle part action p cycle part action previous n set forward action definition id next get action definition id n set backward action definition id previous get action definition id p set forward action definition id next get action definition id p set backward action definition id previous get action definition id actionfactory iworkbenchaction nexteditoraction actionfactory next_editor actionfactory iworkbenchaction previouseditoraction actionfactory previous_editor actionfactory linkcycleactionpair nexteditoraction previouseditoraction linkcycleactionpair iworkbenchaction iworkbenchaction cyclepartaction illegalargumentexception cyclepartaction illegalargumentexception cyclepartaction cyclepartaction cyclepartaction cyclepartaction setforwardactiondefinitionid getactiondefinitionid setbackwardactiondefinitionid getactiondefinitionid setforwardactiondefinitionid getactiondefinitionid setbackwardactiondefinitionid getactiondefinitionid creates a new workbench action factory with the given id param action id the id of actions created by this action factory protected action factory string action id this action id action id actionid actionfactory actionid actionid actionid creates a new standard action for the given workbench window the action has an id as specified by the particular factory p actions automatically register listeners against the workbench window so that they can keep their enablement state up to date ordinarily the window s references to these listeners will be dropped automatically when the window closes however if the client needs to get rid of an action while the window is still open the client must call link i workbench action dispose dispose to give the action an opportunity to deregister its listeners and to perform any other cleanup p param window the workbench window return the workbench action iworkbenchaction returns the id of this action factory return the id of actions created by this action factory public string get id return action id getid actionid public interface i workbench action extends i action disposes of this action once disposed this action cannot be used this operation has no effect if the action has already been disposed iworkbenchaction iaction public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new about action window action set id get id i product product platform get product string product name null if product null product name product get name if product name null product name non nls 1 action set text nls bind workbench messages aboutaction text product name action set tool tip text nls bind workbench messages aboutaction tooltip product name return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction aboutaction setid getid iproduct getproduct productname productname getname productname productname settext workbenchmessages aboutaction_text productname settooltiptext workbenchmessages aboutaction_tooltip productname public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new activate editor action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction activateeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench back action set tool tip text workbench messages workbench backtooltip window get part service add part listener action action set action definition id org eclipse ui navigate back non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_back settooltiptext workbenchmessages workbench_backtooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new navigation history action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction navigationhistoryaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close editor action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close all action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeallaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close all perspectives action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeallperspectivesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close all saved action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeallsavedaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close perspective action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new intro action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction introaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench copy action set tool tip text workbench messages workbench copytooltip window get part service add part listener action action set action definition id org eclipse ui edit copy non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool copy action set disabled image descriptor shared images get image descriptor i shared images img tool copy disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_copy settooltiptext workbenchmessages workbench_copytooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_copy setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_copy_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench cut action set tool tip text workbench messages workbench cuttooltip window get part service add part listener action action set action definition id org eclipse ui edit cut non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool cut action set disabled image descriptor shared images get image descriptor i shared images img tool cut disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_cut settooltiptext workbenchmessages workbench_cuttooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_cut setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_cut_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench delete action set tool tip text workbench messages workbench deletetooltip window get part service add part listener action action set action definition id org eclipse ui edit delete non nls 1 action enable accelerator false window get workbench get help system set help action i workbench help context ids delete retarget action i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool delete action set disabled image descriptor shared images get image descriptor i shared images img tool delete disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_delete settooltiptext workbenchmessages workbench_deletetooltip getpartservice addpartlistener setactiondefinitionid enableaccelerator getworkbench gethelpsystem sethelp iworkbenchhelpcontextids delete_retarget_action isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_delete setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_delete_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new edit action sets action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction editactionsetsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new export resources action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction exportresourcesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench findreplace action set tool tip text workbench messages workbench findreplacetooltip window get part service add part listener action action set action definition id org eclipse ui edit find replace non nls 1 find s images are commented out due to a conflict with search see bug 16412 action set image descriptor workbench images get image descriptor i workbench graphic constants img etool search src action set disabled image descriptor workbench images get image descriptor i workbench graphic constants img etool search src disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_findreplace settooltiptext workbenchmessages workbench_findreplacetooltip getpartservice addpartlistener setactiondefinitionid findreplace setimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_search_src setdisabledimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_search_src_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench forward action set tool tip text workbench messages workbench forwardtooltip window get part service add part listener action action set action definition id org eclipse ui navigate forward non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_forward settooltiptext workbenchmessages workbench_forwardtooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new navigation history action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction navigationhistoryaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench gointo action set tool tip text workbench messages workbench gointotooltip window get part service add part listener action action set action definition id org eclipse ui navigate go into non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_gointo settooltiptext workbenchmessages workbench_gointotooltip getpartservice addpartlistener setactiondefinitionid gointo public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new import resources action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction importresourcesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new lock tool bar action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction locktoolbaraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new maximize part action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction maximizepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new minimize part action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction minimizepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench move action set tool tip text workbench messages workbench movetooltip window get part service add part listener action action set action definition id org eclipse ui edit move non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_move settooltiptext workbenchmessages workbench_movetooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new new wizard action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction newwizardaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new new wizard drop down action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction newwizarddropdownaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench next action set tool tip text workbench messages workbench nexttooltip window get part service add part listener action action set action definition id org eclipse ui navigate next non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_next settooltiptext workbenchmessages workbench_nexttooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle editor action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle part action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cyclepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle perspective action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new open in new window action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction openinnewwindowaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench paste action set tool tip text workbench messages workbench pastetooltip window get part service add part listener action action set action definition id org eclipse ui edit paste non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool paste action set disabled image descriptor shared images get image descriptor i shared images img tool paste disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_paste settooltiptext workbenchmessages workbench_pastetooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_paste setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_paste_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new open preferences action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction openpreferencesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench previous action set tool tip text workbench messages workbench previoustooltip window get part service add part listener action action set action definition id org eclipse ui navigate previous non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_previous settooltiptext workbenchmessages workbench_previoustooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle editor action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle part action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cyclepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle perspective action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench print action set tool tip text workbench messages workbench printtooltip window get part service add part listener action action set action definition id org eclipse ui file print non nls 1 action set image descriptor workbench images get image descriptor i workbench graphic constants img etool print edit action set disabled image descriptor workbench images get image descriptor i workbench graphic constants img etool print edit disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_print settooltiptext workbenchmessages workbench_printtooltip getpartservice addpartlistener setactiondefinitionid setimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_print_edit setdisabledimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_print_edit_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench properties action set tool tip text workbench messages workbench propertiestooltip window get part service add part listener action action set action definition id org eclipse ui file properties non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_properties settooltiptext workbenchmessages workbench_propertiestooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new quit action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction quitaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception label retarget action action new label retarget action get id workbench messages workbench redo action set tool tip text workbench messages workbench redotooltip window get part service add part listener action action set action definition id org eclipse ui edit redo non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool redo action set disabled image descriptor shared images get image descriptor i shared images img tool redo disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception labelretargetaction labelretargetaction getid workbenchmessages workbench_redo settooltiptext workbenchmessages workbench_redotooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_redo setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_redo_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench refresh action set tool tip text workbench messages workbench refreshtooltip window get part service add part listener action action set action definition id org eclipse ui file refresh non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_refresh settooltiptext workbenchmessages workbench_refreshtooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench rename action set tool tip text workbench messages workbench renametooltip window get part service add part listener action action set action definition id org eclipse ui edit rename non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_rename settooltiptext workbenchmessages workbench_renametooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new reset perspective action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction resetperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench revert action set tool tip text workbench messages workbench reverttooltip window get part service add part listener action action set action definition id org eclipse ui file revert non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_revert settooltiptext workbenchmessages workbench_reverttooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save all action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveallaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save as action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveasaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save perspective action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench selectall action set tool tip text workbench messages workbench selectalltooltip window get part service add part listener action action set action definition id org eclipse ui edit select all non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_selectall settooltiptext workbenchmessages workbench_selectalltooltip getpartservice addpartlistener setactiondefinitionid selectall public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new toggle editors visibility action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction toggleeditorsvisibilityaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new workbench editors action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction workbencheditorsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new workbook editors action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction workbookeditorsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new show part pane menu action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction showpartpanemenuaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new show view menu action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction showviewmenuaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception label retarget action action new label retarget action get id workbench messages workbench undo action set tool tip text workbench messages workbench undotooltip window get part service add part listener action action set action definition id org eclipse ui edit undo non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool undo action set disabled image descriptor shared images get image descriptor i shared images img tool undo disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception labelretargetaction labelretargetaction getid workbenchmessages workbench_undo settooltiptext workbenchmessages workbench_undotooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_undo setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_undo_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench up action set tool tip text workbench messages workbench uptooltip window get part service add part listener action action set action definition id org eclipse ui navigate up non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_up settooltiptext workbenchmessages workbench_uptooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new help contents action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction helpcontentsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new help search action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction helpsearchaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new dynamic help action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction dynamichelpaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new open perspective dialog action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction openperspectivedialogaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new new editor action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction neweditoraction setid getid establishes bi direction connections between the forward and backward actions of a cycle pair p example usage pre action factory i workbench action next editor action action factory next editor create window action factory i workbench action previous editor action action factory previous editor create window action factory link cycle action pair next editor action previous editor action pre p param next the action that moves forward param previous the action that moves backward public static void link cycle action pair i workbench action next i workbench action previous if next instanceof cycle part action throw new illegal argument exception if previous instanceof cycle part action throw new illegal argument exception cycle part action n cycle part action next cycle part action p cycle part action previous n set forward action definition id next get action definition id n set backward action definition id previous get action definition id p set forward action definition id next get action definition id p set backward action definition id previous get action definition id actionfactory iworkbenchaction nexteditoraction actionfactory next_editor actionfactory iworkbenchaction previouseditoraction actionfactory previous_editor actionfactory linkcycleactionpair nexteditoraction previouseditoraction linkcycleactionpair iworkbenchaction iworkbenchaction cyclepartaction illegalargumentexception cyclepartaction illegalargumentexception cyclepartaction cyclepartaction cyclepartaction cyclepartaction setforwardactiondefinitionid getactiondefinitionid setbackwardactiondefinitionid getactiondefinitionid setforwardactiondefinitionid getactiondefinitionid setbackwardactiondefinitionid getactiondefinitionid creates a new workbench action factory with the given id param action id the id of actions created by this action factory protected action factory string action id this action id action id actionid actionfactory actionid actionid actionid creates a new standard action for the given workbench window the action has an id as specified by the particular factory p actions automatically register listeners against the workbench window so that they can keep their enablement state up to date ordinarily the window s references to these listeners will be dropped automatically when the window closes however if the client needs to get rid of an action while the window is still open the client must call link i workbench action dispose dispose to give the action an opportunity to deregister its listeners and to perform any other cleanup p param window the workbench window return the workbench action iworkbenchaction returns the id of this action factory return the id of actions created by this action factory public string get id return action id getid actionid public interface i workbench action extends i action disposes of this action once disposed this action cannot be used this operation has no effect if the action has already been disposed iworkbenchaction iaction public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new about action window action set id get id i product product platform get product string product name null if product null product name product get name if product name null product name non nls 1 action set text nls bind workbench messages aboutaction text product name action set tool tip text nls bind workbench messages aboutaction tooltip product name return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction aboutaction setid getid iproduct getproduct productname productname getname productname productname settext workbenchmessages aboutaction_text productname settooltiptext workbenchmessages aboutaction_tooltip productname public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new activate editor action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction activateeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench back action set tool tip text workbench messages workbench backtooltip window get part service add part listener action action set action definition id org eclipse ui navigate back non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_back settooltiptext workbenchmessages workbench_backtooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new navigation history action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction navigationhistoryaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close editor action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close all action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeallaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close all perspectives action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeallperspectivesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close all saved action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeallsavedaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close perspective action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new intro action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction introaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench copy action set tool tip text workbench messages workbench copytooltip window get part service add part listener action action set action definition id org eclipse ui edit copy non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool copy action set disabled image descriptor shared images get image descriptor i shared images img tool copy disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_copy settooltiptext workbenchmessages workbench_copytooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_copy setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_copy_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench cut action set tool tip text workbench messages workbench cuttooltip window get part service add part listener action action set action definition id org eclipse ui edit cut non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool cut action set disabled image descriptor shared images get image descriptor i shared images img tool cut disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_cut settooltiptext workbenchmessages workbench_cuttooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_cut setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_cut_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench delete action set tool tip text workbench messages workbench deletetooltip window get part service add part listener action action set action definition id org eclipse ui edit delete non nls 1 action enable accelerator false window get workbench get help system set help action i workbench help context ids delete retarget action i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool delete action set disabled image descriptor shared images get image descriptor i shared images img tool delete disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_delete settooltiptext workbenchmessages workbench_deletetooltip getpartservice addpartlistener setactiondefinitionid enableaccelerator getworkbench gethelpsystem sethelp iworkbenchhelpcontextids delete_retarget_action isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_delete setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_delete_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new edit action sets action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction editactionsetsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new export resources action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction exportresourcesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench findreplace action set tool tip text workbench messages workbench findreplacetooltip window get part service add part listener action action set action definition id org eclipse ui edit find replace non nls 1 find s images are commented out due to a conflict with search see bug 16412 action set image descriptor workbench images get image descriptor i workbench graphic constants img etool search src action set disabled image descriptor workbench images get image descriptor i workbench graphic constants img etool search src disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_findreplace settooltiptext workbenchmessages workbench_findreplacetooltip getpartservice addpartlistener setactiondefinitionid findreplace setimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_search_src setdisabledimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_search_src_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench forward action set tool tip text workbench messages workbench forwardtooltip window get part service add part listener action action set action definition id org eclipse ui navigate forward non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_forward settooltiptext workbenchmessages workbench_forwardtooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new navigation history action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction navigationhistoryaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench gointo action set tool tip text workbench messages workbench gointotooltip window get part service add part listener action action set action definition id org eclipse ui navigate go into non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_gointo settooltiptext workbenchmessages workbench_gointotooltip getpartservice addpartlistener setactiondefinitionid gointo public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new import resources action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction importresourcesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new lock tool bar action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction locktoolbaraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new maximize part action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction maximizepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new minimize part action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction minimizepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench move action set tool tip text workbench messages workbench movetooltip window get part service add part listener action action set action definition id org eclipse ui edit move non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_move settooltiptext workbenchmessages workbench_movetooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new new wizard action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction newwizardaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new new wizard drop down action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction newwizarddropdownaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench next action set tool tip text workbench messages workbench nexttooltip window get part service add part listener action action set action definition id org eclipse ui navigate next non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_next settooltiptext workbenchmessages workbench_nexttooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle editor action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle part action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cyclepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle perspective action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new open in new window action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction openinnewwindowaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench paste action set tool tip text workbench messages workbench pastetooltip window get part service add part listener action action set action definition id org eclipse ui edit paste non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool paste action set disabled image descriptor shared images get image descriptor i shared images img tool paste disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_paste settooltiptext workbenchmessages workbench_pastetooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_paste setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_paste_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new open preferences action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction openpreferencesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench previous action set tool tip text workbench messages workbench previoustooltip window get part service add part listener action action set action definition id org eclipse ui navigate previous non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_previous settooltiptext workbenchmessages workbench_previoustooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle editor action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle part action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cyclepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle perspective action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench print action set tool tip text workbench messages workbench printtooltip window get part service add part listener action action set action definition id org eclipse ui file print non nls 1 action set image descriptor workbench images get image descriptor i workbench graphic constants img etool print edit action set disabled image descriptor workbench images get image descriptor i workbench graphic constants img etool print edit disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_print settooltiptext workbenchmessages workbench_printtooltip getpartservice addpartlistener setactiondefinitionid setimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_print_edit setdisabledimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_print_edit_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench properties action set tool tip text workbench messages workbench propertiestooltip window get part service add part listener action action set action definition id org eclipse ui file properties non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_properties settooltiptext workbenchmessages workbench_propertiestooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new quit action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction quitaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception label retarget action action new label retarget action get id workbench messages workbench redo action set tool tip text workbench messages workbench redotooltip window get part service add part listener action action set action definition id org eclipse ui edit redo non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool redo action set disabled image descriptor shared images get image descriptor i shared images img tool redo disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception labelretargetaction labelretargetaction getid workbenchmessages workbench_redo settooltiptext workbenchmessages workbench_redotooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_redo setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_redo_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench refresh action set tool tip text workbench messages workbench refreshtooltip window get part service add part listener action action set action definition id org eclipse ui file refresh non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_refresh settooltiptext workbenchmessages workbench_refreshtooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench rename action set tool tip text workbench messages workbench renametooltip window get part service add part listener action action set action definition id org eclipse ui edit rename non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_rename settooltiptext workbenchmessages workbench_renametooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new reset perspective action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction resetperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench revert action set tool tip text workbench messages workbench reverttooltip window get part service add part listener action action set action definition id org eclipse ui file revert non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_revert settooltiptext workbenchmessages workbench_reverttooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save all action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveallaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save as action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveasaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save perspective action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench selectall action set tool tip text workbench messages workbench selectalltooltip window get part service add part listener action action set action definition id org eclipse ui edit select all non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_selectall settooltiptext workbenchmessages workbench_selectalltooltip getpartservice addpartlistener setactiondefinitionid selectall public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new toggle editors visibility action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction toggleeditorsvisibilityaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new workbench editors action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction workbencheditorsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new workbook editors action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction workbookeditorsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new show part pane menu action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction showpartpanemenuaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new show view menu action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction showviewmenuaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception label retarget action action new label retarget action get id workbench messages workbench undo action set tool tip text workbench messages workbench undotooltip window get part service add part listener action action set action definition id org eclipse ui edit undo non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool undo action set disabled image descriptor shared images get image descriptor i shared images img tool undo disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception labelretargetaction labelretargetaction getid workbenchmessages workbench_undo settooltiptext workbenchmessages workbench_undotooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_undo setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_undo_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench up action set tool tip text workbench messages workbench uptooltip window get part service add part listener action action set action definition id org eclipse ui navigate up non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_up settooltiptext workbenchmessages workbench_uptooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new help contents action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction helpcontentsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new help search action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction helpsearchaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new dynamic help action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction dynamichelpaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new open perspective dialog action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction openperspectivedialogaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new new editor action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction neweditoraction setid getid establishes bi direction connections between the forward and backward actions of a cycle pair p example usage pre action factory i workbench action next editor action action factory next editor create window action factory i workbench action previous editor action action factory previous editor create window action factory link cycle action pair next editor action previous editor action pre p param next the action that moves forward param previous the action that moves backward public static void link cycle action pair i workbench action next i workbench action previous if next instanceof cycle part action throw new illegal argument exception if previous instanceof cycle part action throw new illegal argument exception cycle part action n cycle part action next cycle part action p cycle part action previous n set forward action definition id next get action definition id n set backward action definition id previous get action definition id p set forward action definition id next get action definition id p set backward action definition id previous get action definition id actionfactory iworkbenchaction nexteditoraction actionfactory next_editor actionfactory iworkbenchaction previouseditoraction actionfactory previous_editor actionfactory linkcycleactionpair nexteditoraction previouseditoraction linkcycleactionpair iworkbenchaction iworkbenchaction cyclepartaction illegalargumentexception cyclepartaction illegalargumentexception cyclepartaction cyclepartaction cyclepartaction cyclepartaction setforwardactiondefinitionid getactiondefinitionid setbackwardactiondefinitionid getactiondefinitionid setforwardactiondefinitionid getactiondefinitionid setbackwardactiondefinitionid getactiondefinitionid creates a new workbench action factory with the given id param action id the id of actions created by this action factory protected action factory string action id this action id action id actionid actionfactory actionid actionid actionid creates a new standard action for the given workbench window the action has an id as specified by the particular factory p actions automatically register listeners against the workbench window so that they can keep their enablement state up to date ordinarily the window s references to these listeners will be dropped automatically when the window closes however if the client needs to get rid of an action while the window is still open the client must call link i workbench action dispose dispose to give the action an opportunity to deregister its listeners and to perform any other cleanup p param window the workbench window return the workbench action iworkbenchaction returns the id of this action factory return the id of actions created by this action factory public string get id return action id getid actionid public interface i workbench action extends i action disposes of this action once disposed this action cannot be used this operation has no effect if the action has already been disposed iworkbenchaction iaction public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new about action window action set id get id i product product platform get product string product name null if product null product name product get name if product name null product name non nls 1 action set text nls bind workbench messages aboutaction text product name action set tool tip text nls bind workbench messages aboutaction tooltip product name return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction aboutaction setid getid iproduct getproduct productname productname getname productname productname settext workbenchmessages aboutaction_text productname settooltiptext workbenchmessages aboutaction_tooltip productname public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new activate editor action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction activateeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench back action set tool tip text workbench messages workbench backtooltip window get part service add part listener action action set action definition id org eclipse ui navigate back non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_back settooltiptext workbenchmessages workbench_backtooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new navigation history action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction navigationhistoryaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close editor action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close all action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeallaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close all perspectives action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeallperspectivesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close all saved action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeallsavedaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close perspective action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new intro action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction introaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench copy action set tool tip text workbench messages workbench copytooltip window get part service add part listener action action set action definition id org eclipse ui edit copy non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool copy action set disabled image descriptor shared images get image descriptor i shared images img tool copy disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_copy settooltiptext workbenchmessages workbench_copytooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_copy setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_copy_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench cut action set tool tip text workbench messages workbench cuttooltip window get part service add part listener action action set action definition id org eclipse ui edit cut non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool cut action set disabled image descriptor shared images get image descriptor i shared images img tool cut disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_cut settooltiptext workbenchmessages workbench_cuttooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_cut setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_cut_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench delete action set tool tip text workbench messages workbench deletetooltip window get part service add part listener action action set action definition id org eclipse ui edit delete non nls 1 action enable accelerator false window get workbench get help system set help action i workbench help context ids delete retarget action i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool delete action set disabled image descriptor shared images get image descriptor i shared images img tool delete disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_delete settooltiptext workbenchmessages workbench_deletetooltip getpartservice addpartlistener setactiondefinitionid enableaccelerator getworkbench gethelpsystem sethelp iworkbenchhelpcontextids delete_retarget_action isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_delete setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_delete_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new edit action sets action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction editactionsetsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new export resources action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction exportresourcesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench findreplace action set tool tip text workbench messages workbench findreplacetooltip window get part service add part listener action action set action definition id org eclipse ui edit find replace non nls 1 find s images are commented out due to a conflict with search see bug 16412 action set image descriptor workbench images get image descriptor i workbench graphic constants img etool search src action set disabled image descriptor workbench images get image descriptor i workbench graphic constants img etool search src disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_findreplace settooltiptext workbenchmessages workbench_findreplacetooltip getpartservice addpartlistener setactiondefinitionid findreplace setimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_search_src setdisabledimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_search_src_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench forward action set tool tip text workbench messages workbench forwardtooltip window get part service add part listener action action set action definition id org eclipse ui navigate forward non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_forward settooltiptext workbenchmessages workbench_forwardtooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new navigation history action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction navigationhistoryaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench gointo action set tool tip text workbench messages workbench gointotooltip window get part service add part listener action action set action definition id org eclipse ui navigate go into non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_gointo settooltiptext workbenchmessages workbench_gointotooltip getpartservice addpartlistener setactiondefinitionid gointo public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new import resources action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction importresourcesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new lock tool bar action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction locktoolbaraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new maximize part action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction maximizepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new minimize part action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction minimizepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench move action set tool tip text workbench messages workbench movetooltip window get part service add part listener action action set action definition id org eclipse ui edit move non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_move settooltiptext workbenchmessages workbench_movetooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new new wizard action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction newwizardaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new new wizard drop down action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction newwizarddropdownaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench next action set tool tip text workbench messages workbench nexttooltip window get part service add part listener action action set action definition id org eclipse ui navigate next non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_next settooltiptext workbenchmessages workbench_nexttooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle editor action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle part action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cyclepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle perspective action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new open in new window action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction openinnewwindowaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench paste action set tool tip text workbench messages workbench pastetooltip window get part service add part listener action action set action definition id org eclipse ui edit paste non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool paste action set disabled image descriptor shared images get image descriptor i shared images img tool paste disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_paste settooltiptext workbenchmessages workbench_pastetooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_paste setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_paste_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new open preferences action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction openpreferencesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench previous action set tool tip text workbench messages workbench previoustooltip window get part service add part listener action action set action definition id org eclipse ui navigate previous non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_previous settooltiptext workbenchmessages workbench_previoustooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle editor action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle part action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cyclepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle perspective action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench print action set tool tip text workbench messages workbench printtooltip window get part service add part listener action action set action definition id org eclipse ui file print non nls 1 action set image descriptor workbench images get image descriptor i workbench graphic constants img etool print edit action set disabled image descriptor workbench images get image descriptor i workbench graphic constants img etool print edit disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_print settooltiptext workbenchmessages workbench_printtooltip getpartservice addpartlistener setactiondefinitionid setimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_print_edit setdisabledimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_print_edit_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench properties action set tool tip text workbench messages workbench propertiestooltip window get part service add part listener action action set action definition id org eclipse ui file properties non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_properties settooltiptext workbenchmessages workbench_propertiestooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new quit action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction quitaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception label retarget action action new label retarget action get id workbench messages workbench redo action set tool tip text workbench messages workbench redotooltip window get part service add part listener action action set action definition id org eclipse ui edit redo non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool redo action set disabled image descriptor shared images get image descriptor i shared images img tool redo disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception labelretargetaction labelretargetaction getid workbenchmessages workbench_redo settooltiptext workbenchmessages workbench_redotooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_redo setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_redo_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench refresh action set tool tip text workbench messages workbench refreshtooltip window get part service add part listener action action set action definition id org eclipse ui file refresh non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_refresh settooltiptext workbenchmessages workbench_refreshtooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench rename action set tool tip text workbench messages workbench renametooltip window get part service add part listener action action set action definition id org eclipse ui edit rename non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_rename settooltiptext workbenchmessages workbench_renametooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new reset perspective action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction resetperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench revert action set tool tip text workbench messages workbench reverttooltip window get part service add part listener action action set action definition id org eclipse ui file revert non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_revert settooltiptext workbenchmessages workbench_reverttooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save all action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveallaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save as action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveasaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save perspective action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench selectall action set tool tip text workbench messages workbench selectalltooltip window get part service add part listener action action set action definition id org eclipse ui edit select all non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_selectall settooltiptext workbenchmessages workbench_selectalltooltip getpartservice addpartlistener setactiondefinitionid selectall public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new toggle editors visibility action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction toggleeditorsvisibilityaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new workbench editors action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction workbencheditorsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new workbook editors action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction workbookeditorsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new show part pane menu action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction showpartpanemenuaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new show view menu action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction showviewmenuaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception label retarget action action new label retarget action get id workbench messages workbench undo action set tool tip text workbench messages workbench undotooltip window get part service add part listener action action set action definition id org eclipse ui edit undo non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool undo action set disabled image descriptor shared images get image descriptor i shared images img tool undo disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception labelretargetaction labelretargetaction getid workbenchmessages workbench_undo settooltiptext workbenchmessages workbench_undotooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_undo setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_undo_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench up action set tool tip text workbench messages workbench uptooltip window get part service add part listener action action set action definition id org eclipse ui navigate up non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_up settooltiptext workbenchmessages workbench_uptooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new help contents action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction helpcontentsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new help search action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction helpsearchaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new dynamic help action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction dynamichelpaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new open perspective dialog action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction openperspectivedialogaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new new editor action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction neweditoraction setid getid establishes bi direction connections between the forward and backward actions of a cycle pair p example usage pre action factory i workbench action next editor action action factory next editor create window action factory i workbench action previous editor action action factory previous editor create window action factory link cycle action pair next editor action previous editor action pre p param next the action that moves forward param previous the action that moves backward public static void link cycle action pair i workbench action next i workbench action previous if next instanceof cycle part action throw new illegal argument exception if previous instanceof cycle part action throw new illegal argument exception cycle part action n cycle part action next cycle part action p cycle part action previous n set forward action definition id next get action definition id n set backward action definition id previous get action definition id p set forward action definition id next get action definition id p set backward action definition id previous get action definition id actionfactory iworkbenchaction nexteditoraction actionfactory next_editor actionfactory iworkbenchaction previouseditoraction actionfactory previous_editor actionfactory linkcycleactionpair nexteditoraction previouseditoraction linkcycleactionpair iworkbenchaction iworkbenchaction cyclepartaction illegalargumentexception cyclepartaction illegalargumentexception cyclepartaction cyclepartaction cyclepartaction cyclepartaction setforwardactiondefinitionid getactiondefinitionid setbackwardactiondefinitionid getactiondefinitionid setforwardactiondefinitionid getactiondefinitionid setbackwardactiondefinitionid getactiondefinitionid creates a new workbench action factory with the given id param action id the id of actions created by this action factory protected action factory string action id this action id action id actionid actionfactory actionid actionid actionid creates a new standard action for the given workbench window the action has an id as specified by the particular factory p actions automatically register listeners against the workbench window so that they can keep their enablement state up to date ordinarily the window s references to these listeners will be dropped automatically when the window closes however if the client needs to get rid of an action while the window is still open the client must call link i workbench action dispose dispose to give the action an opportunity to deregister its listeners and to perform any other cleanup p param window the workbench window return the workbench action iworkbenchaction returns the id of this action factory return the id of actions created by this action factory public string get id return action id getid actionid public interface i workbench action extends i action disposes of this action once disposed this action cannot be used this operation has no effect if the action has already been disposed iworkbenchaction iaction public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new about action window action set id get id i product product platform get product string product name null if product null product name product get name if product name null product name non nls 1 action set text nls bind workbench messages aboutaction text product name action set tool tip text nls bind workbench messages aboutaction tooltip product name return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction aboutaction setid getid iproduct getproduct productname productname getname productname productname settext workbenchmessages aboutaction_text productname settooltiptext workbenchmessages aboutaction_tooltip productname public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new activate editor action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction activateeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench back action set tool tip text workbench messages workbench backtooltip window get part service add part listener action action set action definition id org eclipse ui navigate back non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_back settooltiptext workbenchmessages workbench_backtooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new navigation history action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction navigationhistoryaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close editor action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close all action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeallaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close all perspectives action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeallperspectivesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close all saved action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeallsavedaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close perspective action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new intro action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction introaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench copy action set tool tip text workbench messages workbench copytooltip window get part service add part listener action action set action definition id org eclipse ui edit copy non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool copy action set disabled image descriptor shared images get image descriptor i shared images img tool copy disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_copy settooltiptext workbenchmessages workbench_copytooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_copy setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_copy_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench cut action set tool tip text workbench messages workbench cuttooltip window get part service add part listener action action set action definition id org eclipse ui edit cut non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool cut action set disabled image descriptor shared images get image descriptor i shared images img tool cut disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_cut settooltiptext workbenchmessages workbench_cuttooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_cut setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_cut_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench delete action set tool tip text workbench messages workbench deletetooltip window get part service add part listener action action set action definition id org eclipse ui edit delete non nls 1 action enable accelerator false window get workbench get help system set help action i workbench help context ids delete retarget action i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool delete action set disabled image descriptor shared images get image descriptor i shared images img tool delete disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_delete settooltiptext workbenchmessages workbench_deletetooltip getpartservice addpartlistener setactiondefinitionid enableaccelerator getworkbench gethelpsystem sethelp iworkbenchhelpcontextids delete_retarget_action isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_delete setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_delete_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new edit action sets action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction editactionsetsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new export resources action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction exportresourcesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench findreplace action set tool tip text workbench messages workbench findreplacetooltip window get part service add part listener action action set action definition id org eclipse ui edit find replace non nls 1 find s images are commented out due to a conflict with search see bug 16412 action set image descriptor workbench images get image descriptor i workbench graphic constants img etool search src action set disabled image descriptor workbench images get image descriptor i workbench graphic constants img etool search src disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_findreplace settooltiptext workbenchmessages workbench_findreplacetooltip getpartservice addpartlistener setactiondefinitionid findreplace setimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_search_src setdisabledimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_search_src_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench forward action set tool tip text workbench messages workbench forwardtooltip window get part service add part listener action action set action definition id org eclipse ui navigate forward non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_forward settooltiptext workbenchmessages workbench_forwardtooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new navigation history action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction navigationhistoryaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench gointo action set tool tip text workbench messages workbench gointotooltip window get part service add part listener action action set action definition id org eclipse ui navigate go into non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_gointo settooltiptext workbenchmessages workbench_gointotooltip getpartservice addpartlistener setactiondefinitionid gointo public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new import resources action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction importresourcesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new lock tool bar action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction locktoolbaraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new maximize part action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction maximizepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new minimize part action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction minimizepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench move action set tool tip text workbench messages workbench movetooltip window get part service add part listener action action set action definition id org eclipse ui edit move non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_move settooltiptext workbenchmessages workbench_movetooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new new wizard action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction newwizardaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new new wizard drop down action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction newwizarddropdownaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench next action set tool tip text workbench messages workbench nexttooltip window get part service add part listener action action set action definition id org eclipse ui navigate next non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_next settooltiptext workbenchmessages workbench_nexttooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle editor action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle part action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cyclepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle perspective action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new open in new window action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction openinnewwindowaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench paste action set tool tip text workbench messages workbench pastetooltip window get part service add part listener action action set action definition id org eclipse ui edit paste non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool paste action set disabled image descriptor shared images get image descriptor i shared images img tool paste disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_paste settooltiptext workbenchmessages workbench_pastetooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_paste setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_paste_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new open preferences action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction openpreferencesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench previous action set tool tip text workbench messages workbench previoustooltip window get part service add part listener action action set action definition id org eclipse ui navigate previous non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_previous settooltiptext workbenchmessages workbench_previoustooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle editor action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle part action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cyclepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle perspective action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench print action set tool tip text workbench messages workbench printtooltip window get part service add part listener action action set action definition id org eclipse ui file print non nls 1 action set image descriptor workbench images get image descriptor i workbench graphic constants img etool print edit action set disabled image descriptor workbench images get image descriptor i workbench graphic constants img etool print edit disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_print settooltiptext workbenchmessages workbench_printtooltip getpartservice addpartlistener setactiondefinitionid setimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_print_edit setdisabledimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_print_edit_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench properties action set tool tip text workbench messages workbench propertiestooltip window get part service add part listener action action set action definition id org eclipse ui file properties non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_properties settooltiptext workbenchmessages workbench_propertiestooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new quit action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction quitaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception label retarget action action new label retarget action get id workbench messages workbench redo action set tool tip text workbench messages workbench redotooltip window get part service add part listener action action set action definition id org eclipse ui edit redo non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool redo action set disabled image descriptor shared images get image descriptor i shared images img tool redo disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception labelretargetaction labelretargetaction getid workbenchmessages workbench_redo settooltiptext workbenchmessages workbench_redotooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_redo setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_redo_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench refresh action set tool tip text workbench messages workbench refreshtooltip window get part service add part listener action action set action definition id org eclipse ui file refresh non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_refresh settooltiptext workbenchmessages workbench_refreshtooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench rename action set tool tip text workbench messages workbench renametooltip window get part service add part listener action action set action definition id org eclipse ui edit rename non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_rename settooltiptext workbenchmessages workbench_renametooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new reset perspective action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction resetperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench revert action set tool tip text workbench messages workbench reverttooltip window get part service add part listener action action set action definition id org eclipse ui file revert non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_revert settooltiptext workbenchmessages workbench_reverttooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save all action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveallaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save as action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveasaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save perspective action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench selectall action set tool tip text workbench messages workbench selectalltooltip window get part service add part listener action action set action definition id org eclipse ui edit select all non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_selectall settooltiptext workbenchmessages workbench_selectalltooltip getpartservice addpartlistener setactiondefinitionid selectall public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new toggle editors visibility action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction toggleeditorsvisibilityaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new workbench editors action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction workbencheditorsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new workbook editors action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction workbookeditorsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new show part pane menu action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction showpartpanemenuaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new show view menu action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction showviewmenuaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception label retarget action action new label retarget action get id workbench messages workbench undo action set tool tip text workbench messages workbench undotooltip window get part service add part listener action action set action definition id org eclipse ui edit undo non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool undo action set disabled image descriptor shared images get image descriptor i shared images img tool undo disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception labelretargetaction labelretargetaction getid workbenchmessages workbench_undo settooltiptext workbenchmessages workbench_undotooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_undo setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_undo_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench up action set tool tip text workbench messages workbench uptooltip window get part service add part listener action action set action definition id org eclipse ui navigate up non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_up settooltiptext workbenchmessages workbench_uptooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new help contents action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction helpcontentsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new help search action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction helpsearchaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new dynamic help action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction dynamichelpaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new open perspective dialog action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction openperspectivedialogaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new new editor action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction neweditoraction setid getid establishes bi direction connections between the forward and backward actions of a cycle pair p example usage pre action factory i workbench action next editor action action factory next editor create window action factory i workbench action previous editor action action factory previous editor create window action factory link cycle action pair next editor action previous editor action pre p param next the action that moves forward param previous the action that moves backward public static void link cycle action pair i workbench action next i workbench action previous if next instanceof cycle part action throw new illegal argument exception if previous instanceof cycle part action throw new illegal argument exception cycle part action n cycle part action next cycle part action p cycle part action previous n set forward action definition id next get action definition id n set backward action definition id previous get action definition id p set forward action definition id next get action definition id p set backward action definition id previous get action definition id actionfactory iworkbenchaction nexteditoraction actionfactory next_editor actionfactory iworkbenchaction previouseditoraction actionfactory previous_editor actionfactory linkcycleactionpair nexteditoraction previouseditoraction linkcycleactionpair iworkbenchaction iworkbenchaction cyclepartaction illegalargumentexception cyclepartaction illegalargumentexception cyclepartaction cyclepartaction cyclepartaction cyclepartaction setforwardactiondefinitionid getactiondefinitionid setbackwardactiondefinitionid getactiondefinitionid setforwardactiondefinitionid getactiondefinitionid setbackwardactiondefinitionid getactiondefinitionid creates a new workbench action factory with the given id param action id the id of actions created by this action factory protected action factory string action id this action id action id actionid actionfactory actionid actionid actionid creates a new standard action for the given workbench window the action has an id as specified by the particular factory p actions automatically register listeners against the workbench window so that they can keep their enablement state up to date ordinarily the window s references to these listeners will be dropped automatically when the window closes however if the client needs to get rid of an action while the window is still open the client must call link i workbench action dispose dispose to give the action an opportunity to deregister its listeners and to perform any other cleanup p param window the workbench window return the workbench action iworkbenchaction returns the id of this action factory return the id of actions created by this action factory public string get id return action id getid actionid public interface i workbench action extends i action disposes of this action once disposed this action cannot be used this operation has no effect if the action has already been disposed iworkbenchaction iaction public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new about action window action set id get id i product product platform get product string product name null if product null product name product get name if product name null product name non nls 1 action set text nls bind workbench messages aboutaction text product name action set tool tip text nls bind workbench messages aboutaction tooltip product name return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction aboutaction setid getid iproduct getproduct productname productname getname productname productname settext workbenchmessages aboutaction_text productname settooltiptext workbenchmessages aboutaction_tooltip productname public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new activate editor action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction activateeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench back action set tool tip text workbench messages workbench backtooltip window get part service add part listener action action set action definition id org eclipse ui navigate back non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_back settooltiptext workbenchmessages workbench_backtooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new navigation history action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction navigationhistoryaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close editor action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close all action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeallaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close all perspectives action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeallperspectivesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close all saved action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeallsavedaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close perspective action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new intro action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction introaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench copy action set tool tip text workbench messages workbench copytooltip window get part service add part listener action action set action definition id org eclipse ui edit copy non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool copy action set disabled image descriptor shared images get image descriptor i shared images img tool copy disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_copy settooltiptext workbenchmessages workbench_copytooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_copy setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_copy_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench cut action set tool tip text workbench messages workbench cuttooltip window get part service add part listener action action set action definition id org eclipse ui edit cut non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool cut action set disabled image descriptor shared images get image descriptor i shared images img tool cut disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_cut settooltiptext workbenchmessages workbench_cuttooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_cut setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_cut_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench delete action set tool tip text workbench messages workbench deletetooltip window get part service add part listener action action set action definition id org eclipse ui edit delete non nls 1 action enable accelerator false window get workbench get help system set help action i workbench help context ids delete retarget action i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool delete action set disabled image descriptor shared images get image descriptor i shared images img tool delete disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_delete settooltiptext workbenchmessages workbench_deletetooltip getpartservice addpartlistener setactiondefinitionid enableaccelerator getworkbench gethelpsystem sethelp iworkbenchhelpcontextids delete_retarget_action isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_delete setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_delete_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new edit action sets action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction editactionsetsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new export resources action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction exportresourcesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench findreplace action set tool tip text workbench messages workbench findreplacetooltip window get part service add part listener action action set action definition id org eclipse ui edit find replace non nls 1 find s images are commented out due to a conflict with search see bug 16412 action set image descriptor workbench images get image descriptor i workbench graphic constants img etool search src action set disabled image descriptor workbench images get image descriptor i workbench graphic constants img etool search src disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_findreplace settooltiptext workbenchmessages workbench_findreplacetooltip getpartservice addpartlistener setactiondefinitionid findreplace setimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_search_src setdisabledimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_search_src_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench forward action set tool tip text workbench messages workbench forwardtooltip window get part service add part listener action action set action definition id org eclipse ui navigate forward non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_forward settooltiptext workbenchmessages workbench_forwardtooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new navigation history action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction navigationhistoryaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench gointo action set tool tip text workbench messages workbench gointotooltip window get part service add part listener action action set action definition id org eclipse ui navigate go into non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_gointo settooltiptext workbenchmessages workbench_gointotooltip getpartservice addpartlistener setactiondefinitionid gointo public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new import resources action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction importresourcesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new lock tool bar action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction locktoolbaraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new maximize part action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction maximizepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new minimize part action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction minimizepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench move action set tool tip text workbench messages workbench movetooltip window get part service add part listener action action set action definition id org eclipse ui edit move non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_move settooltiptext workbenchmessages workbench_movetooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new new wizard action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction newwizardaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new new wizard drop down action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction newwizarddropdownaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench next action set tool tip text workbench messages workbench nexttooltip window get part service add part listener action action set action definition id org eclipse ui navigate next non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_next settooltiptext workbenchmessages workbench_nexttooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle editor action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle part action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cyclepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle perspective action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new open in new window action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction openinnewwindowaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench paste action set tool tip text workbench messages workbench pastetooltip window get part service add part listener action action set action definition id org eclipse ui edit paste non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool paste action set disabled image descriptor shared images get image descriptor i shared images img tool paste disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_paste settooltiptext workbenchmessages workbench_pastetooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_paste setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_paste_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new open preferences action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction openpreferencesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench previous action set tool tip text workbench messages workbench previoustooltip window get part service add part listener action action set action definition id org eclipse ui navigate previous non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_previous settooltiptext workbenchmessages workbench_previoustooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle editor action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle part action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cyclepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle perspective action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench print action set tool tip text workbench messages workbench printtooltip window get part service add part listener action action set action definition id org eclipse ui file print non nls 1 action set image descriptor workbench images get image descriptor i workbench graphic constants img etool print edit action set disabled image descriptor workbench images get image descriptor i workbench graphic constants img etool print edit disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_print settooltiptext workbenchmessages workbench_printtooltip getpartservice addpartlistener setactiondefinitionid setimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_print_edit setdisabledimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_print_edit_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench properties action set tool tip text workbench messages workbench propertiestooltip window get part service add part listener action action set action definition id org eclipse ui file properties non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_properties settooltiptext workbenchmessages workbench_propertiestooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new quit action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction quitaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception label retarget action action new label retarget action get id workbench messages workbench redo action set tool tip text workbench messages workbench redotooltip window get part service add part listener action action set action definition id org eclipse ui edit redo non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool redo action set disabled image descriptor shared images get image descriptor i shared images img tool redo disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception labelretargetaction labelretargetaction getid workbenchmessages workbench_redo settooltiptext workbenchmessages workbench_redotooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_redo setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_redo_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench refresh action set tool tip text workbench messages workbench refreshtooltip window get part service add part listener action action set action definition id org eclipse ui file refresh non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_refresh settooltiptext workbenchmessages workbench_refreshtooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench rename action set tool tip text workbench messages workbench renametooltip window get part service add part listener action action set action definition id org eclipse ui edit rename non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_rename settooltiptext workbenchmessages workbench_renametooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new reset perspective action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction resetperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench revert action set tool tip text workbench messages workbench reverttooltip window get part service add part listener action action set action definition id org eclipse ui file revert non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_revert settooltiptext workbenchmessages workbench_reverttooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save all action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveallaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save as action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveasaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save perspective action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench selectall action set tool tip text workbench messages workbench selectalltooltip window get part service add part listener action action set action definition id org eclipse ui edit select all non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_selectall settooltiptext workbenchmessages workbench_selectalltooltip getpartservice addpartlistener setactiondefinitionid selectall public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new toggle editors visibility action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction toggleeditorsvisibilityaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new workbench editors action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction workbencheditorsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new workbook editors action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction workbookeditorsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new show part pane menu action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction showpartpanemenuaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new show view menu action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction showviewmenuaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception label retarget action action new label retarget action get id workbench messages workbench undo action set tool tip text workbench messages workbench undotooltip window get part service add part listener action action set action definition id org eclipse ui edit undo non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool undo action set disabled image descriptor shared images get image descriptor i shared images img tool undo disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception labelretargetaction labelretargetaction getid workbenchmessages workbench_undo settooltiptext workbenchmessages workbench_undotooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_undo setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_undo_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench up action set tool tip text workbench messages workbench uptooltip window get part service add part listener action action set action definition id org eclipse ui navigate up non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_up settooltiptext workbenchmessages workbench_uptooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new help contents action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction helpcontentsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new help search action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction helpsearchaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new dynamic help action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction dynamichelpaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new open perspective dialog action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction openperspectivedialogaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new new editor action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction neweditoraction setid getid establishes bi direction connections between the forward and backward actions of a cycle pair p example usage pre action factory i workbench action next editor action action factory next editor create window action factory i workbench action previous editor action action factory previous editor create window action factory link cycle action pair next editor action previous editor action pre p param next the action that moves forward param previous the action that moves backward public static void link cycle action pair i workbench action next i workbench action previous if next instanceof cycle part action throw new illegal argument exception if previous instanceof cycle part action throw new illegal argument exception cycle part action n cycle part action next cycle part action p cycle part action previous n set forward action definition id next get action definition id n set backward action definition id previous get action definition id p set forward action definition id next get action definition id p set backward action definition id previous get action definition id actionfactory iworkbenchaction nexteditoraction actionfactory next_editor actionfactory iworkbenchaction previouseditoraction actionfactory previous_editor actionfactory linkcycleactionpair nexteditoraction previouseditoraction linkcycleactionpair iworkbenchaction iworkbenchaction cyclepartaction illegalargumentexception cyclepartaction illegalargumentexception cyclepartaction cyclepartaction cyclepartaction cyclepartaction setforwardactiondefinitionid getactiondefinitionid setbackwardactiondefinitionid getactiondefinitionid setforwardactiondefinitionid getactiondefinitionid setbackwardactiondefinitionid getactiondefinitionid creates a new workbench action factory with the given id param action id the id of actions created by this action factory protected action factory string action id this action id action id actionid actionfactory actionid actionid actionid creates a new standard action for the given workbench window the action has an id as specified by the particular factory p actions automatically register listeners against the workbench window so that they can keep their enablement state up to date ordinarily the window s references to these listeners will be dropped automatically when the window closes however if the client needs to get rid of an action while the window is still open the client must call link i workbench action dispose dispose to give the action an opportunity to deregister its listeners and to perform any other cleanup p param window the workbench window return the workbench action iworkbenchaction returns the id of this action factory return the id of actions created by this action factory public string get id return action id getid actionid public interface i workbench action extends i action disposes of this action once disposed this action cannot be used this operation has no effect if the action has already been disposed iworkbenchaction iaction public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new about action window action set id get id i product product platform get product string product name null if product null product name product get name if product name null product name non nls 1 action set text nls bind workbench messages aboutaction text product name action set tool tip text nls bind workbench messages aboutaction tooltip product name return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction aboutaction setid getid iproduct getproduct productname productname getname productname productname settext workbenchmessages aboutaction_text productname settooltiptext workbenchmessages aboutaction_tooltip productname public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new activate editor action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction activateeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench back action set tool tip text workbench messages workbench backtooltip window get part service add part listener action action set action definition id org eclipse ui navigate back non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_back settooltiptext workbenchmessages workbench_backtooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new navigation history action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction navigationhistoryaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close editor action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close all action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeallaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close all perspectives action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeallperspectivesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close all saved action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeallsavedaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new close perspective action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction closeperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new intro action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction introaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench copy action set tool tip text workbench messages workbench copytooltip window get part service add part listener action action set action definition id org eclipse ui edit copy non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool copy action set disabled image descriptor shared images get image descriptor i shared images img tool copy disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_copy settooltiptext workbenchmessages workbench_copytooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_copy setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_copy_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench cut action set tool tip text workbench messages workbench cuttooltip window get part service add part listener action action set action definition id org eclipse ui edit cut non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool cut action set disabled image descriptor shared images get image descriptor i shared images img tool cut disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_cut settooltiptext workbenchmessages workbench_cuttooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_cut setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_cut_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench delete action set tool tip text workbench messages workbench deletetooltip window get part service add part listener action action set action definition id org eclipse ui edit delete non nls 1 action enable accelerator false window get workbench get help system set help action i workbench help context ids delete retarget action i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool delete action set disabled image descriptor shared images get image descriptor i shared images img tool delete disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_delete settooltiptext workbenchmessages workbench_deletetooltip getpartservice addpartlistener setactiondefinitionid enableaccelerator getworkbench gethelpsystem sethelp iworkbenchhelpcontextids delete_retarget_action isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_delete setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_delete_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new edit action sets action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction editactionsetsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new export resources action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction exportresourcesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench findreplace action set tool tip text workbench messages workbench findreplacetooltip window get part service add part listener action action set action definition id org eclipse ui edit find replace non nls 1 find s images are commented out due to a conflict with search see bug 16412 action set image descriptor workbench images get image descriptor i workbench graphic constants img etool search src action set disabled image descriptor workbench images get image descriptor i workbench graphic constants img etool search src disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_findreplace settooltiptext workbenchmessages workbench_findreplacetooltip getpartservice addpartlistener setactiondefinitionid findreplace setimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_search_src setdisabledimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_search_src_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench forward action set tool tip text workbench messages workbench forwardtooltip window get part service add part listener action action set action definition id org eclipse ui navigate forward non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_forward settooltiptext workbenchmessages workbench_forwardtooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new navigation history action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction navigationhistoryaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench gointo action set tool tip text workbench messages workbench gointotooltip window get part service add part listener action action set action definition id org eclipse ui navigate go into non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_gointo settooltiptext workbenchmessages workbench_gointotooltip getpartservice addpartlistener setactiondefinitionid gointo public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new import resources action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction importresourcesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new lock tool bar action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction locktoolbaraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new maximize part action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction maximizepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new minimize part action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction minimizepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench move action set tool tip text workbench messages workbench movetooltip window get part service add part listener action action set action definition id org eclipse ui edit move non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_move settooltiptext workbenchmessages workbench_movetooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new new wizard action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction newwizardaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new new wizard drop down action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction newwizarddropdownaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench next action set tool tip text workbench messages workbench nexttooltip window get part service add part listener action action set action definition id org eclipse ui navigate next non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_next settooltiptext workbenchmessages workbench_nexttooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle editor action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle part action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cyclepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle perspective action window true action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new open in new window action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction openinnewwindowaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench paste action set tool tip text workbench messages workbench pastetooltip window get part service add part listener action action set action definition id org eclipse ui edit paste non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool paste action set disabled image descriptor shared images get image descriptor i shared images img tool paste disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_paste settooltiptext workbenchmessages workbench_pastetooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_paste setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_paste_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new open preferences action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction openpreferencesaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench previous action set tool tip text workbench messages workbench previoustooltip window get part service add part listener action action set action definition id org eclipse ui navigate previous non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_previous settooltiptext workbenchmessages workbench_previoustooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle editor action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleeditoraction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle part action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cyclepartaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new cycle perspective action window false action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction cycleperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench print action set tool tip text workbench messages workbench printtooltip window get part service add part listener action action set action definition id org eclipse ui file print non nls 1 action set image descriptor workbench images get image descriptor i workbench graphic constants img etool print edit action set disabled image descriptor workbench images get image descriptor i workbench graphic constants img etool print edit disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_print settooltiptext workbenchmessages workbench_printtooltip getpartservice addpartlistener setactiondefinitionid setimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_print_edit setdisabledimagedescriptor workbenchimages getimagedescriptor iworkbenchgraphicconstants img_etool_print_edit_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench properties action set tool tip text workbench messages workbench propertiestooltip window get part service add part listener action action set action definition id org eclipse ui file properties non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_properties settooltiptext workbenchmessages workbench_propertiestooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new quit action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction quitaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception label retarget action action new label retarget action get id workbench messages workbench redo action set tool tip text workbench messages workbench redotooltip window get part service add part listener action action set action definition id org eclipse ui edit redo non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool redo action set disabled image descriptor shared images get image descriptor i shared images img tool redo disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception labelretargetaction labelretargetaction getid workbenchmessages workbench_redo settooltiptext workbenchmessages workbench_redotooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_redo setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_redo_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench refresh action set tool tip text workbench messages workbench refreshtooltip window get part service add part listener action action set action definition id org eclipse ui file refresh non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_refresh settooltiptext workbenchmessages workbench_refreshtooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench rename action set tool tip text workbench messages workbench renametooltip window get part service add part listener action action set action definition id org eclipse ui edit rename non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_rename settooltiptext workbenchmessages workbench_renametooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new reset perspective action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction resetperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench revert action set tool tip text workbench messages workbench reverttooltip window get part service add part listener action action set action definition id org eclipse ui file revert non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_revert settooltiptext workbenchmessages workbench_reverttooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save all action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveallaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save as action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveasaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new save perspective action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction saveperspectiveaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new retarget action get id workbench messages workbench selectall action set tool tip text workbench messages workbench selectalltooltip window get part service add part listener action action set action definition id org eclipse ui edit select all non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction retargetaction getid workbenchmessages workbench_selectall settooltiptext workbenchmessages workbench_selectalltooltip getpartservice addpartlistener setactiondefinitionid selectall public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new toggle editors visibility action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction toggleeditorsvisibilityaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new workbench editors action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction workbencheditorsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new workbook editors action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction workbookeditorsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new show part pane menu action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction showpartpanemenuaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new show view menu action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction showviewmenuaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception label retarget action action new label retarget action get id workbench messages workbench undo action set tool tip text workbench messages workbench undotooltip window get part service add part listener action action set action definition id org eclipse ui edit undo non nls 1 i shared images shared images window get workbench get shared images action set image descriptor shared images get image descriptor i shared images img tool undo action set disabled image descriptor shared images get image descriptor i shared images img tool undo disabled return action iworkbenchaction iworkbenchwindow illegalargumentexception labelretargetaction labelretargetaction getid workbenchmessages workbench_undo settooltiptext workbenchmessages workbench_undotooltip getpartservice addpartlistener setactiondefinitionid isharedimages sharedimages getworkbench getsharedimages setimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_undo setdisabledimagedescriptor sharedimages getimagedescriptor isharedimages img_tool_undo_disabled public i workbench action create i workbench window window if window null throw new illegal argument exception retarget action action new label retarget action get id workbench messages workbench up action set tool tip text workbench messages workbench uptooltip window get part service add part listener action action set action definition id org eclipse ui navigate up non nls 1 return action iworkbenchaction iworkbenchwindow illegalargumentexception retargetaction labelretargetaction getid workbenchmessages workbench_up settooltiptext workbenchmessages workbench_uptooltip getpartservice addpartlistener setactiondefinitionid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new help contents action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction helpcontentsaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new help search action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction helpsearchaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new dynamic help action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction dynamichelpaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new open perspective dialog action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction openperspectivedialogaction setid getid public i workbench action create i workbench window window if window null throw new illegal argument exception i workbench action action new new editor action window action set id get id return action iworkbenchaction iworkbenchwindow illegalargumentexception iworkbenchaction neweditoraction setid getid establishes bi direction connections between the forward and backward actions of a cycle pair p example usage pre action factory i workbench action next editor action action factory next editor create window action factory i workbench action previous editor action action factory previous editor create window action factory link cycle action pair next editor action previous editor action pre p param next the action that moves forward param previous the action that moves backward public static void link cycle action pair i workbench action next i workbench action previous if next instanceof cycle part action throw new illegal argument exception if previous instanceof cycle part action throw new illegal argument exception cycle part action n cycle part action next cycle part action p cycle part action previous n set forward action definition id next get action definition id n set backward action definition id previous get action definition id p set forward action definition id next get action definition id p set backward action definition id previous get action definition id actionfactory iworkbenchaction nexteditoraction actionfactory next_editor actionfactory iworkbenchaction previouseditoraction actionfactory previous_editor actionfactory linkcycleactionpair nexteditoraction previouseditoraction linkcycleactionpair iworkbenchaction iworkbenchaction cyclepartaction illegalargumentexception cyclepartaction illegalargumentexception cyclepartaction cyclepartaction cyclepartaction cyclepartaction setforwardactiondefinitionid getactiondefinitionid setbackwardactiondefinitionid getactiondefinitionid setforwardactiondefinitionid getactiondefinitionid setbackwardactiondefinitionid getactiondefinitionid creates a new workbench action factory with the given id param action id the id of actions created by this action factory protected action factory string action id this action id action id actionid actionfactory actionid actionid actionid creates a new standard action for the given workbench window the action has an id as specified by the particular factory p actions automatically register listeners against the workbench window so that they can keep their enablement state up to date ordinarily the window s references to these listeners will be dropped automatically when the window closes however if the client needs to get rid of an action while the window is still open the client must call link i workbench action dispose dispose to give the action an opportunity to deregister its listeners and to perform any other cleanup p param window the workbench window return the workbench action iworkbenchaction returns the id of this action factory return the id of actions created by this action factory public string get id return action id getid actionid see browser factory create browser public i web browser create browser string id string location string parameters return new default browser id browserfactory createbrowser iwebbrowser createbrowser defaultbrowser text action constructor comment protected text action browser viewer browser byte type super type non nls 1 this browser browser this type type textaction textaction browserviewer copies the selected text to the clipboard the text will be put in the clipboard in plain text format p exception swt exception ul li error widget disposed if the receiver has been disposed li li error thread invalid access if not called from the thread that created the receiver li ul public void copy point selection browser combo get selection int length selection y selection x if length 0 text transfer plain text transfer text transfer get instance try browser clipboard set contents new string browser combo get text substring selection x selection y new transfer plain text transfer catch swt error error copy to clipboard failed this happens when another application is accessing the clipboard while we copy ignore the error fixes 1gdqavn swtexception error_widget_disposed error_thread_invalid_access getselection texttransfer plaintexttransfer texttransfer getinstance setcontents gettext plaintexttransfer swterror moves the selected text to the clipboard the text will be put in the clipboard in plain text format and rtf format p exception swt exception ul li error widget disposed if the receiver has been disposed li li error thread invalid access if not called from the thread that created the receiver li ul public void cut point selection browser combo get selection if selection y selection x copy delete swtexception error_widget_disposed error_thread_invalid_access getselection deletes the character to the right of the caret delete the selected text if any public void delete point selection browser combo get selection string text browser combo get text if selection x selection y text text substring 0 selection x text substring selection y browser combo set text text browser combo set selection new point selection x selection x getselection gettext settext setselection replaces the selection with the clipboard text or insert the text at the current caret offset if there is no selection if the widget has the swt single style and the clipboard text contains more than one line only the first line without line delimiters is inserted in the widget p exception swt exception ul li error widget disposed if the receiver has been disposed li li error thread invalid access if not called from the thread that created the receiver li ul public void paste text transfer transfer text transfer get instance point selection browser combo get selection string text browser combo get text string new text string browser clipboard get contents transfer if new text null new text length 0 text text substring 0 selection x new text text substring selection y browser combo set text text set the selection to the end of the paste int x selection x new text length browser combo set selection new point x x swtexception error_widget_disposed error_thread_invalid_access texttransfer texttransfer getinstance getselection gettext newtext getcontents newtext newtext newtext settext newtext setselection implementation of method defined on code i action code public void run if browser null browser combo null return if type cut cut else if type copy copy else if type paste paste iaction public void property changed object source int prop id if prop id i workbench part constants prop title set default part name propertychanged propid propid iworkbenchpartconstants prop_title setdefaultpartname creates a new workbench editor protected editor part super add property listener compatibility title listener editorpart addpropertylistener compatibilitytitlelistener see i editor part public abstract void do save i progress monitor monitor ieditorpart dosave iprogressmonitor see i editor part public abstract void do save as ieditorpart dosaveas method declared on i editor part public i editor input get editor input return editor input ieditorpart ieditorinput geteditorinput editorinput method declared on i editor part public i editor site get editor site return i editor site get site ieditorpart ieditorsite geteditorsite ieditorsite getsite public string get title tool tip if editor input null return super get title tool tip else return editor input get tool tip text gettitletooltip editorinput gettitletooltip editorinput gettooltiptext pre public abstract void init i editor site site i editor input input throws part init exception ieditorsite ieditorinput partinitexception see i editor part public abstract boolean is dirty ieditorpart isdirty see i editor part public abstract boolean is save as allowed ieditorpart issaveasallowed p public boolean is save on close needed return is dirty issaveoncloseneeded isdirty sets the input to this editor param input the editor input protected void set input i editor input input editor input input setinput ieditorinput editorinput protected void set content description string description if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set content description description setcontentdescription compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setcontentdescription protected void set part name string part name if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set part name part name setpartname partname compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setpartname partname public void set initialization data i configuration element cfig string property name object data super set initialization data cfig property name data set default part name setinitializationdata iconfigurationelement propertyname setinitializationdata propertyname setdefaultpartname private void set default part name if compatibility title listener null return internal set part name get title setdefaultpartname compatibilitytitlelistener internalsetpartname gettitle set the default title for the receiver void set default title set title get part name setdefaulttitle settitle getpartname checks that the given site is valid for this type of part the site for an editor must be an code i editor site code param site the site to check since 3 1 protected final void check site i workbench part site site super check site site assert is true site instanceof i editor site the site for an editor must be an i editor site non nls 1 ieditorsite checksite iworkbenchpartsite checksite istrue ieditorsite ieditorsite public void property changed object source int prop id if prop id i workbench part constants prop title set default part name propertychanged propid propid iworkbenchpartconstants prop_title setdefaultpartname creates a new workbench editor protected editor part super add property listener compatibility title listener editorpart addpropertylistener compatibilitytitlelistener see i editor part public abstract void do save i progress monitor monitor ieditorpart dosave iprogressmonitor see i editor part public abstract void do save as ieditorpart dosaveas method declared on i editor part public i editor input get editor input return editor input ieditorpart ieditorinput geteditorinput editorinput method declared on i editor part public i editor site get editor site return i editor site get site ieditorpart ieditorsite geteditorsite ieditorsite getsite public string get title tool tip if editor input null return super get title tool tip else return editor input get tool tip text gettitletooltip editorinput gettitletooltip editorinput gettooltiptext pre public abstract void init i editor site site i editor input input throws part init exception ieditorsite ieditorinput partinitexception see i editor part public abstract boolean is dirty ieditorpart isdirty see i editor part public abstract boolean is save as allowed ieditorpart issaveasallowed p public boolean is save on close needed return is dirty issaveoncloseneeded isdirty sets the input to this editor param input the editor input protected void set input i editor input input editor input input setinput ieditorinput editorinput protected void set content description string description if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set content description description setcontentdescription compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setcontentdescription protected void set part name string part name if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set part name part name setpartname partname compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setpartname partname public void set initialization data i configuration element cfig string property name object data super set initialization data cfig property name data set default part name setinitializationdata iconfigurationelement propertyname setinitializationdata propertyname setdefaultpartname private void set default part name if compatibility title listener null return internal set part name get title setdefaultpartname compatibilitytitlelistener internalsetpartname gettitle set the default title for the receiver void set default title set title get part name setdefaulttitle settitle getpartname checks that the given site is valid for this type of part the site for an editor must be an code i editor site code param site the site to check since 3 1 protected final void check site i workbench part site site super check site site assert is true site instanceof i editor site the site for an editor must be an i editor site non nls 1 ieditorsite checksite iworkbenchpartsite checksite istrue ieditorsite ieditorsite public void property changed object source int prop id if prop id i workbench part constants prop title set default part name propertychanged propid propid iworkbenchpartconstants prop_title setdefaultpartname creates a new workbench editor protected editor part super add property listener compatibility title listener editorpart addpropertylistener compatibilitytitlelistener see i editor part public abstract void do save i progress monitor monitor ieditorpart dosave iprogressmonitor see i editor part public abstract void do save as ieditorpart dosaveas method declared on i editor part public i editor input get editor input return editor input ieditorpart ieditorinput geteditorinput editorinput method declared on i editor part public i editor site get editor site return i editor site get site ieditorpart ieditorsite geteditorsite ieditorsite getsite public string get title tool tip if editor input null return super get title tool tip else return editor input get tool tip text gettitletooltip editorinput gettitletooltip editorinput gettooltiptext pre public abstract void init i editor site site i editor input input throws part init exception ieditorsite ieditorinput partinitexception see i editor part public abstract boolean is dirty ieditorpart isdirty see i editor part public abstract boolean is save as allowed ieditorpart issaveasallowed p public boolean is save on close needed return is dirty issaveoncloseneeded isdirty sets the input to this editor param input the editor input protected void set input i editor input input editor input input setinput ieditorinput editorinput protected void set content description string description if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set content description description setcontentdescription compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setcontentdescription protected void set part name string part name if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set part name part name setpartname partname compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setpartname partname public void set initialization data i configuration element cfig string property name object data super set initialization data cfig property name data set default part name setinitializationdata iconfigurationelement propertyname setinitializationdata propertyname setdefaultpartname private void set default part name if compatibility title listener null return internal set part name get title setdefaultpartname compatibilitytitlelistener internalsetpartname gettitle set the default title for the receiver void set default title set title get part name setdefaulttitle settitle getpartname checks that the given site is valid for this type of part the site for an editor must be an code i editor site code param site the site to check since 3 1 protected final void check site i workbench part site site super check site site assert is true site instanceof i editor site the site for an editor must be an i editor site non nls 1 ieditorsite checksite iworkbenchpartsite checksite istrue ieditorsite ieditorsite public void property changed object source int prop id if prop id i workbench part constants prop title set default part name propertychanged propid propid iworkbenchpartconstants prop_title setdefaultpartname creates a new workbench editor protected editor part super add property listener compatibility title listener editorpart addpropertylistener compatibilitytitlelistener see i editor part public abstract void do save i progress monitor monitor ieditorpart dosave iprogressmonitor see i editor part public abstract void do save as ieditorpart dosaveas method declared on i editor part public i editor input get editor input return editor input ieditorpart ieditorinput geteditorinput editorinput method declared on i editor part public i editor site get editor site return i editor site get site ieditorpart ieditorsite geteditorsite ieditorsite getsite public string get title tool tip if editor input null return super get title tool tip else return editor input get tool tip text gettitletooltip editorinput gettitletooltip editorinput gettooltiptext pre public abstract void init i editor site site i editor input input throws part init exception ieditorsite ieditorinput partinitexception see i editor part public abstract boolean is dirty ieditorpart isdirty see i editor part public abstract boolean is save as allowed ieditorpart issaveasallowed p public boolean is save on close needed return is dirty issaveoncloseneeded isdirty sets the input to this editor param input the editor input protected void set input i editor input input editor input input setinput ieditorinput editorinput protected void set content description string description if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set content description description setcontentdescription compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setcontentdescription protected void set part name string part name if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set part name part name setpartname partname compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setpartname partname public void set initialization data i configuration element cfig string property name object data super set initialization data cfig property name data set default part name setinitializationdata iconfigurationelement propertyname setinitializationdata propertyname setdefaultpartname private void set default part name if compatibility title listener null return internal set part name get title setdefaultpartname compatibilitytitlelistener internalsetpartname gettitle set the default title for the receiver void set default title set title get part name setdefaulttitle settitle getpartname checks that the given site is valid for this type of part the site for an editor must be an code i editor site code param site the site to check since 3 1 protected final void check site i workbench part site site super check site site assert is true site instanceof i editor site the site for an editor must be an i editor site non nls 1 ieditorsite checksite iworkbenchpartsite checksite istrue ieditorsite ieditorsite public void property changed object source int prop id if prop id i workbench part constants prop title set default part name propertychanged propid propid iworkbenchpartconstants prop_title setdefaultpartname creates a new workbench editor protected editor part super add property listener compatibility title listener editorpart addpropertylistener compatibilitytitlelistener see i editor part public abstract void do save i progress monitor monitor ieditorpart dosave iprogressmonitor see i editor part public abstract void do save as ieditorpart dosaveas method declared on i editor part public i editor input get editor input return editor input ieditorpart ieditorinput geteditorinput editorinput method declared on i editor part public i editor site get editor site return i editor site get site ieditorpart ieditorsite geteditorsite ieditorsite getsite public string get title tool tip if editor input null return super get title tool tip else return editor input get tool tip text gettitletooltip editorinput gettitletooltip editorinput gettooltiptext pre public abstract void init i editor site site i editor input input throws part init exception ieditorsite ieditorinput partinitexception see i editor part public abstract boolean is dirty ieditorpart isdirty see i editor part public abstract boolean is save as allowed ieditorpart issaveasallowed p public boolean is save on close needed return is dirty issaveoncloseneeded isdirty sets the input to this editor param input the editor input protected void set input i editor input input editor input input setinput ieditorinput editorinput protected void set content description string description if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set content description description setcontentdescription compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setcontentdescription protected void set part name string part name if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set part name part name setpartname partname compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setpartname partname public void set initialization data i configuration element cfig string property name object data super set initialization data cfig property name data set default part name setinitializationdata iconfigurationelement propertyname setinitializationdata propertyname setdefaultpartname private void set default part name if compatibility title listener null return internal set part name get title setdefaultpartname compatibilitytitlelistener internalsetpartname gettitle set the default title for the receiver void set default title set title get part name setdefaulttitle settitle getpartname checks that the given site is valid for this type of part the site for an editor must be an code i editor site code param site the site to check since 3 1 protected final void check site i workbench part site site super check site site assert is true site instanceof i editor site the site for an editor must be an i editor site non nls 1 ieditorsite checksite iworkbenchpartsite checksite istrue ieditorsite ieditorsite public void property changed object source int prop id if prop id i workbench part constants prop title set default part name propertychanged propid propid iworkbenchpartconstants prop_title setdefaultpartname creates a new workbench editor protected editor part super add property listener compatibility title listener editorpart addpropertylistener compatibilitytitlelistener see i editor part public abstract void do save i progress monitor monitor ieditorpart dosave iprogressmonitor see i editor part public abstract void do save as ieditorpart dosaveas method declared on i editor part public i editor input get editor input return editor input ieditorpart ieditorinput geteditorinput editorinput method declared on i editor part public i editor site get editor site return i editor site get site ieditorpart ieditorsite geteditorsite ieditorsite getsite public string get title tool tip if editor input null return super get title tool tip else return editor input get tool tip text gettitletooltip editorinput gettitletooltip editorinput gettooltiptext pre public abstract void init i editor site site i editor input input throws part init exception ieditorsite ieditorinput partinitexception see i editor part public abstract boolean is dirty ieditorpart isdirty see i editor part public abstract boolean is save as allowed ieditorpart issaveasallowed p public boolean is save on close needed return is dirty issaveoncloseneeded isdirty sets the input to this editor param input the editor input protected void set input i editor input input editor input input setinput ieditorinput editorinput protected void set content description string description if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set content description description setcontentdescription compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setcontentdescription protected void set part name string part name if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set part name part name setpartname partname compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setpartname partname public void set initialization data i configuration element cfig string property name object data super set initialization data cfig property name data set default part name setinitializationdata iconfigurationelement propertyname setinitializationdata propertyname setdefaultpartname private void set default part name if compatibility title listener null return internal set part name get title setdefaultpartname compatibilitytitlelistener internalsetpartname gettitle set the default title for the receiver void set default title set title get part name setdefaulttitle settitle getpartname checks that the given site is valid for this type of part the site for an editor must be an code i editor site code param site the site to check since 3 1 protected final void check site i workbench part site site super check site site assert is true site instanceof i editor site the site for an editor must be an i editor site non nls 1 ieditorsite checksite iworkbenchpartsite checksite istrue ieditorsite ieditorsite public void property changed object source int prop id if prop id i workbench part constants prop title set default part name propertychanged propid propid iworkbenchpartconstants prop_title setdefaultpartname creates a new workbench editor protected editor part super add property listener compatibility title listener editorpart addpropertylistener compatibilitytitlelistener see i editor part public abstract void do save i progress monitor monitor ieditorpart dosave iprogressmonitor see i editor part public abstract void do save as ieditorpart dosaveas method declared on i editor part public i editor input get editor input return editor input ieditorpart ieditorinput geteditorinput editorinput method declared on i editor part public i editor site get editor site return i editor site get site ieditorpart ieditorsite geteditorsite ieditorsite getsite public string get title tool tip if editor input null return super get title tool tip else return editor input get tool tip text gettitletooltip editorinput gettitletooltip editorinput gettooltiptext pre public abstract void init i editor site site i editor input input throws part init exception ieditorsite ieditorinput partinitexception see i editor part public abstract boolean is dirty ieditorpart isdirty see i editor part public abstract boolean is save as allowed ieditorpart issaveasallowed p public boolean is save on close needed return is dirty issaveoncloseneeded isdirty sets the input to this editor param input the editor input protected void set input i editor input input editor input input setinput ieditorinput editorinput protected void set content description string description if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set content description description setcontentdescription compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setcontentdescription protected void set part name string part name if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set part name part name setpartname partname compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setpartname partname public void set initialization data i configuration element cfig string property name object data super set initialization data cfig property name data set default part name setinitializationdata iconfigurationelement propertyname setinitializationdata propertyname setdefaultpartname private void set default part name if compatibility title listener null return internal set part name get title setdefaultpartname compatibilitytitlelistener internalsetpartname gettitle set the default title for the receiver void set default title set title get part name setdefaulttitle settitle getpartname checks that the given site is valid for this type of part the site for an editor must be an code i editor site code param site the site to check since 3 1 protected final void check site i workbench part site site super check site site assert is true site instanceof i editor site the site for an editor must be an i editor site non nls 1 ieditorsite checksite iworkbenchpartsite checksite istrue ieditorsite ieditorsite public void property changed object source int prop id if prop id i workbench part constants prop title set default part name propertychanged propid propid iworkbenchpartconstants prop_title setdefaultpartname creates a new workbench editor protected editor part super add property listener compatibility title listener editorpart addpropertylistener compatibilitytitlelistener see i editor part public abstract void do save i progress monitor monitor ieditorpart dosave iprogressmonitor see i editor part public abstract void do save as ieditorpart dosaveas method declared on i editor part public i editor input get editor input return editor input ieditorpart ieditorinput geteditorinput editorinput method declared on i editor part public i editor site get editor site return i editor site get site ieditorpart ieditorsite geteditorsite ieditorsite getsite public string get title tool tip if editor input null return super get title tool tip else return editor input get tool tip text gettitletooltip editorinput gettitletooltip editorinput gettooltiptext pre public abstract void init i editor site site i editor input input throws part init exception ieditorsite ieditorinput partinitexception see i editor part public abstract boolean is dirty ieditorpart isdirty see i editor part public abstract boolean is save as allowed ieditorpart issaveasallowed p public boolean is save on close needed return is dirty issaveoncloseneeded isdirty sets the input to this editor param input the editor input protected void set input i editor input input editor input input setinput ieditorinput editorinput protected void set content description string description if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set content description description setcontentdescription compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setcontentdescription protected void set part name string part name if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set part name part name setpartname partname compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setpartname partname public void set initialization data i configuration element cfig string property name object data super set initialization data cfig property name data set default part name setinitializationdata iconfigurationelement propertyname setinitializationdata propertyname setdefaultpartname private void set default part name if compatibility title listener null return internal set part name get title setdefaultpartname compatibilitytitlelistener internalsetpartname gettitle set the default title for the receiver void set default title set title get part name setdefaulttitle settitle getpartname checks that the given site is valid for this type of part the site for an editor must be an code i editor site code param site the site to check since 3 1 protected final void check site i workbench part site site super check site site assert is true site instanceof i editor site the site for an editor must be an i editor site non nls 1 ieditorsite checksite iworkbenchpartsite checksite istrue ieditorsite ieditorsite public void property changed object source int prop id if prop id i workbench part constants prop title set default part name propertychanged propid propid iworkbenchpartconstants prop_title setdefaultpartname creates a new workbench editor protected editor part super add property listener compatibility title listener editorpart addpropertylistener compatibilitytitlelistener see i editor part public abstract void do save i progress monitor monitor ieditorpart dosave iprogressmonitor see i editor part public abstract void do save as ieditorpart dosaveas method declared on i editor part public i editor input get editor input return editor input ieditorpart ieditorinput geteditorinput editorinput method declared on i editor part public i editor site get editor site return i editor site get site ieditorpart ieditorsite geteditorsite ieditorsite getsite public string get title tool tip if editor input null return super get title tool tip else return editor input get tool tip text gettitletooltip editorinput gettitletooltip editorinput gettooltiptext pre public abstract void init i editor site site i editor input input throws part init exception ieditorsite ieditorinput partinitexception see i editor part public abstract boolean is dirty ieditorpart isdirty see i editor part public abstract boolean is save as allowed ieditorpart issaveasallowed p public boolean is save on close needed return is dirty issaveoncloseneeded isdirty sets the input to this editor param input the editor input protected void set input i editor input input editor input input setinput ieditorinput editorinput protected void set content description string description if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set content description description setcontentdescription compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setcontentdescription protected void set part name string part name if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set part name part name setpartname partname compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setpartname partname public void set initialization data i configuration element cfig string property name object data super set initialization data cfig property name data set default part name setinitializationdata iconfigurationelement propertyname setinitializationdata propertyname setdefaultpartname private void set default part name if compatibility title listener null return internal set part name get title setdefaultpartname compatibilitytitlelistener internalsetpartname gettitle set the default title for the receiver void set default title set title get part name setdefaulttitle settitle getpartname checks that the given site is valid for this type of part the site for an editor must be an code i editor site code param site the site to check since 3 1 protected final void check site i workbench part site site super check site site assert is true site instanceof i editor site the site for an editor must be an i editor site non nls 1 ieditorsite checksite iworkbenchpartsite checksite istrue ieditorsite ieditorsite public void property changed object source int prop id if prop id i workbench part constants prop title set default part name propertychanged propid propid iworkbenchpartconstants prop_title setdefaultpartname creates a new workbench editor protected editor part super add property listener compatibility title listener editorpart addpropertylistener compatibilitytitlelistener see i editor part public abstract void do save i progress monitor monitor ieditorpart dosave iprogressmonitor see i editor part public abstract void do save as ieditorpart dosaveas method declared on i editor part public i editor input get editor input return editor input ieditorpart ieditorinput geteditorinput editorinput method declared on i editor part public i editor site get editor site return i editor site get site ieditorpart ieditorsite geteditorsite ieditorsite getsite public string get title tool tip if editor input null return super get title tool tip else return editor input get tool tip text gettitletooltip editorinput gettitletooltip editorinput gettooltiptext pre public abstract void init i editor site site i editor input input throws part init exception ieditorsite ieditorinput partinitexception see i editor part public abstract boolean is dirty ieditorpart isdirty see i editor part public abstract boolean is save as allowed ieditorpart issaveasallowed p public boolean is save on close needed return is dirty issaveoncloseneeded isdirty sets the input to this editor param input the editor input protected void set input i editor input input editor input input setinput ieditorinput editorinput protected void set content description string description if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set content description description setcontentdescription compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setcontentdescription protected void set part name string part name if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set part name part name setpartname partname compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setpartname partname public void set initialization data i configuration element cfig string property name object data super set initialization data cfig property name data set default part name setinitializationdata iconfigurationelement propertyname setinitializationdata propertyname setdefaultpartname private void set default part name if compatibility title listener null return internal set part name get title setdefaultpartname compatibilitytitlelistener internalsetpartname gettitle set the default title for the receiver void set default title set title get part name setdefaulttitle settitle getpartname checks that the given site is valid for this type of part the site for an editor must be an code i editor site code param site the site to check since 3 1 protected final void check site i workbench part site site super check site site assert is true site instanceof i editor site the site for an editor must be an i editor site non nls 1 ieditorsite checksite iworkbenchpartsite checksite istrue ieditorsite ieditorsite public void property changed object source int prop id if prop id i workbench part constants prop title set default part name propertychanged propid propid iworkbenchpartconstants prop_title setdefaultpartname creates a new workbench editor protected editor part super add property listener compatibility title listener editorpart addpropertylistener compatibilitytitlelistener see i editor part public abstract void do save i progress monitor monitor ieditorpart dosave iprogressmonitor see i editor part public abstract void do save as ieditorpart dosaveas method declared on i editor part public i editor input get editor input return editor input ieditorpart ieditorinput geteditorinput editorinput method declared on i editor part public i editor site get editor site return i editor site get site ieditorpart ieditorsite geteditorsite ieditorsite getsite public string get title tool tip if editor input null return super get title tool tip else return editor input get tool tip text gettitletooltip editorinput gettitletooltip editorinput gettooltiptext pre public abstract void init i editor site site i editor input input throws part init exception ieditorsite ieditorinput partinitexception see i editor part public abstract boolean is dirty ieditorpart isdirty see i editor part public abstract boolean is save as allowed ieditorpart issaveasallowed p public boolean is save on close needed return is dirty issaveoncloseneeded isdirty sets the input to this editor param input the editor input protected void set input i editor input input editor input input setinput ieditorinput editorinput protected void set content description string description if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set content description description setcontentdescription compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setcontentdescription protected void set part name string part name if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set part name part name setpartname partname compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setpartname partname public void set initialization data i configuration element cfig string property name object data super set initialization data cfig property name data set default part name setinitializationdata iconfigurationelement propertyname setinitializationdata propertyname setdefaultpartname private void set default part name if compatibility title listener null return internal set part name get title setdefaultpartname compatibilitytitlelistener internalsetpartname gettitle set the default title for the receiver void set default title set title get part name setdefaulttitle settitle getpartname checks that the given site is valid for this type of part the site for an editor must be an code i editor site code param site the site to check since 3 1 protected final void check site i workbench part site site super check site site assert is true site instanceof i editor site the site for an editor must be an i editor site non nls 1 ieditorsite checksite iworkbenchpartsite checksite istrue ieditorsite ieditorsite public void property changed object source int prop id if prop id i workbench part constants prop title set default part name propertychanged propid propid iworkbenchpartconstants prop_title setdefaultpartname creates a new workbench editor protected editor part super add property listener compatibility title listener editorpart addpropertylistener compatibilitytitlelistener see i editor part public abstract void do save i progress monitor monitor ieditorpart dosave iprogressmonitor see i editor part public abstract void do save as ieditorpart dosaveas method declared on i editor part public i editor input get editor input return editor input ieditorpart ieditorinput geteditorinput editorinput method declared on i editor part public i editor site get editor site return i editor site get site ieditorpart ieditorsite geteditorsite ieditorsite getsite public string get title tool tip if editor input null return super get title tool tip else return editor input get tool tip text gettitletooltip editorinput gettitletooltip editorinput gettooltiptext pre public abstract void init i editor site site i editor input input throws part init exception ieditorsite ieditorinput partinitexception see i editor part public abstract boolean is dirty ieditorpart isdirty see i editor part public abstract boolean is save as allowed ieditorpart issaveasallowed p public boolean is save on close needed return is dirty issaveoncloseneeded isdirty sets the input to this editor param input the editor input protected void set input i editor input input editor input input setinput ieditorinput editorinput protected void set content description string description if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set content description description setcontentdescription compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setcontentdescription protected void set part name string part name if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set part name part name setpartname partname compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setpartname partname public void set initialization data i configuration element cfig string property name object data super set initialization data cfig property name data set default part name setinitializationdata iconfigurationelement propertyname setinitializationdata propertyname setdefaultpartname private void set default part name if compatibility title listener null return internal set part name get title setdefaultpartname compatibilitytitlelistener internalsetpartname gettitle set the default title for the receiver void set default title set title get part name setdefaulttitle settitle getpartname checks that the given site is valid for this type of part the site for an editor must be an code i editor site code param site the site to check since 3 1 protected final void check site i workbench part site site super check site site assert is true site instanceof i editor site the site for an editor must be an i editor site non nls 1 ieditorsite checksite iworkbenchpartsite checksite istrue ieditorsite ieditorsite public void property changed object source int prop id if prop id i workbench part constants prop title set default part name propertychanged propid propid iworkbenchpartconstants prop_title setdefaultpartname creates a new workbench editor protected editor part super add property listener compatibility title listener editorpart addpropertylistener compatibilitytitlelistener see i editor part public abstract void do save i progress monitor monitor ieditorpart dosave iprogressmonitor see i editor part public abstract void do save as ieditorpart dosaveas method declared on i editor part public i editor input get editor input return editor input ieditorpart ieditorinput geteditorinput editorinput method declared on i editor part public i editor site get editor site return i editor site get site ieditorpart ieditorsite geteditorsite ieditorsite getsite public string get title tool tip if editor input null return super get title tool tip else return editor input get tool tip text gettitletooltip editorinput gettitletooltip editorinput gettooltiptext pre public abstract void init i editor site site i editor input input throws part init exception ieditorsite ieditorinput partinitexception see i editor part public abstract boolean is dirty ieditorpart isdirty see i editor part public abstract boolean is save as allowed ieditorpart issaveasallowed p public boolean is save on close needed return is dirty issaveoncloseneeded isdirty sets the input to this editor param input the editor input protected void set input i editor input input editor input input setinput ieditorinput editorinput protected void set content description string description if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set content description description setcontentdescription compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setcontentdescription protected void set part name string part name if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set part name part name setpartname partname compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setpartname partname public void set initialization data i configuration element cfig string property name object data super set initialization data cfig property name data set default part name setinitializationdata iconfigurationelement propertyname setinitializationdata propertyname setdefaultpartname private void set default part name if compatibility title listener null return internal set part name get title setdefaultpartname compatibilitytitlelistener internalsetpartname gettitle set the default title for the receiver void set default title set title get part name setdefaulttitle settitle getpartname checks that the given site is valid for this type of part the site for an editor must be an code i editor site code param site the site to check since 3 1 protected final void check site i workbench part site site super check site site assert is true site instanceof i editor site the site for an editor must be an i editor site non nls 1 ieditorsite checksite iworkbenchpartsite checksite istrue ieditorsite ieditorsite the constructor that accepts the unique browser identifier param id the unique browser identifier public abstract web browser string id this id id abstractwebbrowser see org eclipse ui browser i web browser get id public string get id return id iwebbrowser getid getid see org eclipse ui browser i web browser close public boolean close return false iwebbrowser the constructor that accepts the unique browser identifier param id the unique browser identifier public abstract web browser string id this id id abstractwebbrowser see org eclipse ui browser i web browser get id public string get id return id iwebbrowser getid getid see org eclipse ui browser i web browser close public boolean close return false iwebbrowser public internal browser instance string id int style string name string tooltip super web browser util encode style id style this style style this name name this tooltip tooltip internalbrowserinstance webbrowserutil encodestyle public void set name string name this name name setname public void set tooltip string tooltip this tooltip tooltip settooltip protected void hook part final i workbench page page i workbench part part2 this part part2 listener new i part listener public void part activated i workbench part part3 ignore public void part brought to top i workbench part part3 ignore public void part closed i workbench part part3 if part equals internal browser instance this part internal browser instance this part null page remove part listener listener default browser support get instance remove browser internal browser instance this public void part deactivated i workbench part part3 ignore public void part opened i workbench part part3 ignore page add part listener listener i workbench window window part get site get workbench window window key new integer window hash code hookpart iworkbenchpage iworkbenchpart ipartlistener partactivated iworkbenchpart partbroughttotop iworkbenchpart partclosed iworkbenchpart internalbrowserinstance internalbrowserinstance removepartlistener defaultbrowsersupport getinstance removebrowser internalbrowserinstance partdeactivated iworkbenchpart partopened iworkbenchpart addpartlistener iworkbenchwindow getsite getworkbenchwindow windowkey hashcode this part part2 listener new i part listener public void part activated i workbench part part3 ignore ipartlistener partactivated iworkbenchpart public void part brought to top i workbench part part3 ignore partbroughttotop iworkbenchpart public void part closed i workbench part part3 if part equals internal browser instance this part internal browser instance this part null page remove part listener listener default browser support get instance remove browser internal browser instance this partclosed iworkbenchpart internalbrowserinstance internalbrowserinstance removepartlistener defaultbrowsersupport getinstance removebrowser internalbrowserinstance public void part deactivated i workbench part part3 ignore partdeactivated iworkbenchpart public void part opened i workbench part part3 ignore partopened iworkbenchpart public integer get window key return window key getwindowkey windowkey creation public browser descriptor working copy do nothing browserdescriptorworkingcopy working copy public browser descriptor working copy browser descriptor browser this browser browser set internal browser browserdescriptorworkingcopy browserdescriptor setinternal public void set name string name if name null throw new illegal argument exception this name name setname illegalargumentexception see org eclipse ui internal browser i browser descriptor working copy set location java lang string public void set location string location this location location ibrowserdescriptorworkingcopy setlocation setlocation see org eclipse ui internal browser i browser descriptor working copy set parameters java lang string public void set parameters string params this parameters params ibrowserdescriptorworkingcopy setparameters setparameters public boolean is working copy return true isworkingcopy public i browser descriptor working copy get working copy return this ibrowserdescriptorworkingcopy getworkingcopy public i browser descriptor save if browser null browser set internal this browser manager get instance save browsers else browser new browser descriptor browser set internal this browser manager get instance add browser browser return browser ibrowserdescriptor setinternal browsermanager getinstance savebrowsers browserdescriptor setinternal browsermanager getinstance addbrowser protected static void initialize dialog units control test control compute and store a font metric gc gc new gc test control gc set font j face resources get dialog font font metrics gc get font metrics gc dispose initializedialogunits testcontrol testcontrol setfont jfaceresources getdialogfont fontmetrics getfontmetrics returns a width hint for a button control protected static int get button width hint button button int width hint dialog convert horizontaldl us to pixels font metrics i dialog constants button width return math max width hint button compute size swt default swt default true x getbuttonwidthhint widthhint converthorizontaldlustopixels fontmetrics idialogconstants button_width widthhint computesize create a new button with the standard size param comp a component to add the button to param label the button label return a button public static button create button composite comp string label button b new button comp swt push b set text label if font metrics null initialize dialog units comp grid data data new grid data grid data horizontal align fill grid data vertical align beginning data width hint get button width hint b b set layout data data return b createbutton settext fontmetrics initializedialogunits griddata griddata griddata horizontal_align_fill griddata vertical_align_beginning widthhint getbuttonwidthhint setlayoutdata create a new standard label param comp a component to add the label to param text the label text return a label public static label create label composite comp string text label label new label comp swt none label set text text label set layout data new grid data grid data horizontal align beginning grid data vertical align beginning return label createlabel settext setlayoutdata griddata griddata horizontal_align_beginning griddata vertical_align_beginning public class internal browser view instance extends internal browser instance public internal browser view instance string id int style string name string tooltip super web browser util encode style id style style name tooltip internalbrowserviewinstance internalbrowserinstance internalbrowserviewinstance webbrowserutil encodestyle public void openurl url url throws part init exception i workbench window workbench window web browserui plugin get instance get workbench get active workbench window final i workbench page page workbench window get active page web browser view view web browser view part if view null try view web browser view page show view web browser view web browser view id get id i workbench page view create hook part page view catch exception e trace trace trace severe error opening web browser e non nls 1 if view null page bring to top view view seturl url to external form partinitexception iworkbenchwindow workbenchwindow webbrowseruiplugin getinstance getworkbench getactiveworkbenchwindow iworkbenchpage workbenchwindow getactivepage webbrowserview webbrowserview webbrowserview showview webbrowserview web_browser_view_id getid iworkbenchpage view_create hookpart bringtotop toexternalform public boolean close return web browser view part close webbrowserview public safari browser string id string location string parameters super id location parameters this location location this parameters parameters safaribrowser creates the final command to launch param path param url return string protected string prepare command string path string url if url null url to lower case starts with file non nls 1 url url substring 5 array list token list new array list divide along quotation marks string tokenizer q tokenizer new string tokenizer path trim true non nls 1 boolean within quotation false string quoted string non nls 1 while q tokenizer has more tokens string cur token q tokenizer next token if cur token equals non nls 1 if within quotation quotes prevent launching on unix 35673 token list add quoted string else quoted string non nls 1 within quotation within quotation continue else if within quotation quoted string cur token continue else divide unquoted strings along white space string tokenizer parser new string tokenizer cur token trim while parser has more tokens token list add parser next token substitute 1 by url boolean substituted false for int i 0 i token list size i string token string token list get i string new token do substitutions token url if new token null token list set i new token substituted true add the url if not substituted already if substituted token list add url string command new string token list size token list to array command return command preparecommand tolowercase startswith arraylist tokenlist arraylist stringtokenizer qtokenizer stringtokenizer withinquotation quotedstring qtokenizer hasmoretokens curtoken qtokenizer nexttoken curtoken withinquotation tokenlist quotedstring quotedstring withinquotation withinquotation withinquotation quotedstring curtoken stringtokenizer stringtokenizer curtoken hasmoretokens tokenlist nexttoken tokenlist tokenlist newtoken dosubstitutions newtoken tokenlist newtoken tokenlist tokenlist tokenlist toarray private static final i menu creator val drop down menu new i menu creator public void dispose do nothing imenucreator val_drop_down_menu imenucreator public menu get menu control parent do nothing return null getmenu public menu get menu menu parent do nothing return null getmenu creates a new action with no text and no image p configure the action later using the set methods p protected action do nothing creates a new action with the given text and no image calls the zero arg constructor then code set text code param text the string used as the text for the action or code null code if there is no text see set text protected action string text this set text text settext settext settext creates a new action with the given text and image calls the zero arg constructor then code set text code and code set image descriptor code param text the action s text or code null code if there is no text param image the action s image or code null code if there is no image see set text see set image descriptor protected action string text image descriptor image this text set image descriptor image settext setimagedescriptor settext setimagedescriptor imagedescriptor setimagedescriptor creates a new action with the given text and style param text the action s text or code null code if there is no text param style one of code as push button code code as check box code code as drop down menu code code as radio button code and code as unspecified code protected action string text int style this text switch style case as push button value val push btn break case as check box value val toggle btn off break case as drop down menu value val drop down menu break case as radio button value val radio btn off break as_push_button as_check_box as_drop_down_menu as_radio_button as_unspecified as_push_button val_push_btn as_check_box val_toggle_btn_off as_drop_down_menu val_drop_down_menu as_radio_button val_radio_btn_off method declared on i action public void add property change listener i property change listener listener listeners add listener iaction addpropertychangelistener ipropertychangelistener parses the given accelerator text and converts it to an accelerator key code support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml param accelerator text the accelerator text localized to the current locale return the swt key code or 0 if there is no accelerator private static int convert localized accelerator string accelerator text int accelerator 0 string tokenizer stok new string tokenizer accelerator text non nls 1 int key code 1 boolean has more tokens stok has more tokens while has more tokens string token stok next token has more tokens stok has more tokens every token except the last must be one of the modifiers ctrl shift alt or command if has more tokens int modifier find localized modifier token if modifier 0 accelerator modifier else leave if there are none return 0 else key code find localized key code token if key code 1 accelerator key code return accelerator setaccelerator acceleratortext convertlocalizedaccelerator acceleratortext stringtokenizer stringtokenizer acceleratortext keycode hasmoretokens hasmoretokens hasmoretokens nexttoken hasmoretokens hasmoretokens hasmoretokens findlocalizedmodifier keycode findlocalizedkeycode keycode keycode parses the given accelerator text and converts it to an accelerator key code param accelerator text the accelerator text return the swt key code or 0 if there is no accelerator public static int convert accelerator string accelerator text int accelerator 0 string tokenizer stok new string tokenizer accelerator text non nls 1 int key code 1 boolean has more tokens stok has more tokens while has more tokens string token stok next token has more tokens stok has more tokens every token except the last must be one of the modifiers ctrl shift alt or command if has more tokens int modifier find modifier token if modifier 0 accelerator modifier else leave if there are none return 0 else key code find key code token if key code 1 accelerator key code return accelerator acceleratortext convertaccelerator acceleratortext stringtokenizer stringtokenizer acceleratortext keycode hasmoretokens hasmoretokens hasmoretokens nexttoken hasmoretokens hasmoretokens hasmoretokens findmodifier keycode findkeycode keycode keycode converts an accelerator key code to a string representation param key code the key code to be translated return a string representation of the key code public static string convert accelerator int key code string modifier get modifier string key code string full key if modifier equals non nls 1 full key find key string key code else full key modifier find key string key code non nls 1 return full key keycode convertaccelerator keycode getmodifierstring keycode fullkey fullkey findkeystring keycode fullkey findkeystring keycode fullkey private static string get modifier string int key code string mod string non nls 1 if key code swt ctrl 0 mod string find modifier string key code swt ctrl if key code swt alt 0 if mod string equals non nls 1 mod string find modifier string key code swt alt else mod string mod string find modifier string key code swt alt non nls 1 if key code swt shift 0 if mod string equals non nls 1 mod string find modifier string key code swt shift else mod string mod string find modifier string key code swt shift non nls 1 if key code swt command 0 if mod string equals non nls 1 mod string find modifier string key code swt command else mod string mod string find modifier string key code swt command non nls 1 return mod string getmodifierstring keycode modstring keycode modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode modstring extracts the accelerator text from the given text returns code null code if there is no accelerator text and the empty string if there is no text after the accelerator delimeter tab or param text the text for the action return the accelerator text or code null code private static string extract accelerator text string text int index text last index of t if index 1 index text last index of if index 0 return text substring index 1 return null extractacceleratortext lastindexof lastindexof maps a standard keyboard key name to an swt key code key names are converted to upper case before comparison if the key name is a single letter for example s its character code is returned p the following key names are known case is ignored ul li code backspace code li li code tab code li li code return code li li code enter code li li code esc code li li code escape code li li code delete code li li code space code li li code arrow up code code arrow down code code arrow left code and code arrow right code li li code page up code and code page down code li li code home code li li code end code li li code insert code li li code f1 code code f2 code through code f12 code li ul p param token the key name return the swt key code code 1 code if no match was found see swt public static int find key code string token if key codes null init key codes token token to upper case integer i integer key codes get token if i null return i int value if token length 1 return token char at 0 return 1 arrow_up arrow_down arrow_left arrow_right page_up page_down findkeycode keycodes initkeycodes touppercase keycodes intvalue charat find the supplied code for a localized key as find key code but localized to the current locale support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml param token the localized key name return the swt key code code 1 code if no match was found see find key code private static int find localized key code string token if localized key codes null init localized key codes token token to upper case integer i integer localized key codes get token if i null return i int value if token length 1 return token char at 0 return 1 findkeycode setaccelerator findkeycode findlocalizedkeycode localizedkeycodes initlocalizedkeycodes touppercase localizedkeycodes intvalue charat maps an swt key code to a standard keyboard key name the key code is stripped of modifiers swt ctrl swt alt swt shift and swt command if the key code is not an swt code for example if it a key code for the key s a string containing a character representation of the key code is returned param key code the key code to be translated return the string representation of the key code see swt since 2 0 public static string find key string int key code if key strings null init key strings int i key code swt ctrl swt alt swt shift swt command integer integer new integer i string result string key strings get integer if result null return result result new string new char char i return result keycode findkeystring keycode keystrings initkeystrings keycode keystrings maps standard keyboard modifier key names to the corresponding swt modifier bit the following modifier key names are recognized case is ignored code ctrl code code shift code code alt code and code command code the given modifier key name is converted to upper case before comparison param token the modifier key name return the swt modifier bit or code 0 code if no match was found see swt public static int find modifier string token token token to upper case if token equals ctrl non nls 1 return swt ctrl if token equals shift non nls 1 return swt shift if token equals alt non nls 1 return swt alt if token equals command non nls 1 return swt command return 0 findmodifier touppercase maps the localized modifier names to a code in the same manner as find modifier support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml see find modifier private static int find localized modifier string token if localized ctrl null init localized modifiers token token to upper case if token equals localized ctrl non nls 1 return swt ctrl if token equals localized shift non nls 1 return swt shift if token equals localized alt non nls 1 return swt alt if token equals localized command non nls 1 return swt command return 0 findmodifier setaccelerator findmodifier findlocalizedmodifier localized_ctrl initlocalizedmodifiers touppercase localized_ctrl localized_shift localized_alt localized_command initialize the list of localized modifiers private static void init localized modifiers localized ctrl j face resources get string ctrl to upper case non nls 1 localized shift j face resources get string shift to upper case non nls 1 localized alt j face resources get string alt to upper case non nls 1 localized command j face resources get string command to upper case non nls 1 initlocalizedmodifiers localized_ctrl jfaceresources getstring touppercase localized_shift jfaceresources getstring touppercase localized_alt jfaceresources getstring touppercase localized_command jfaceresources getstring touppercase returns a string representation of an swt modifier bit swt ctrl swt alt swt shift and swt command returns code null code if the key code is not an swt modifier bit param key code the swt modifier bit to be translated return the string representation of the swt modifier bit or code null code if the key code was not an swt modifier bit see swt since 2 0 public static string find modifier string int key code if key code swt ctrl return j face resources get string ctrl non nls 1 if key code swt alt return j face resources get string alt non nls 1 if key code swt shift return j face resources get string shift non nls 1 if key code swt command return j face resources get string command non nls 1 return null keycode findmodifierstring keycode keycode jfaceresources getstring keycode jfaceresources getstring keycode jfaceresources getstring keycode jfaceresources getstring notifies any property change listeners that a property has changed only listeners registered at the time this method is called are notified this method avoids creating an event object if there are no listeners registered but calls code fire property change property change event code if there are param property name the name of the property that has changed param old value the old value of the property or code null code if none param new value the new value of the property or code null code if none see i property change listener property change protected void fire property change string property name object old value object new value if listeners is empty fire property change new property change event this property name old value new value firepropertychange propertychangeevent propertyname oldvalue newvalue ipropertychangelistener propertychange firepropertychange propertyname oldvalue newvalue isempty firepropertychange propertychangeevent propertyname oldvalue newvalue notifies any property change listeners that a property has changed only listeners registered at the time this method is called are notified param event the property change event see i property change listener property change protected void fire property change property change event event object list this listeners get listeners for int i 0 i list length i i property change listener list i property change event ipropertychangelistener propertychange firepropertychange propertychangeevent getlisteners ipropertychangelistener propertychange method declared on i action public int get accelerator return accelerator iaction getaccelerator public string get action definition id return action definition id getactiondefinitionid actiondefinitionid public string get description if description null return description return get tool tip text getdescription gettooltiptext method declared on i action public image descriptor get disabled image descriptor return disabled image iaction imagedescriptor getdisabledimagedescriptor disabledimage method declared on i action public help listener get help listener return help listener iaction helplistener gethelplistener helplistener method declared on i action public image descriptor get hover image descriptor return hover image iaction imagedescriptor gethoverimagedescriptor hoverimage method declared on i action public string get id return id iaction getid method declared on i action public image descriptor get image descriptor return image iaction imagedescriptor getimagedescriptor public i menu creator get menu creator the default drop down menu value is only used to mark this action requested style so do not return it for backward compatibility reasons if value val drop down menu return null if value instanceof i menu creator return i menu creator value return null imenucreator getmenucreator val_drop_down_menu imenucreator imenucreator public int get style infer the style from the value field if value val push btn value null return as push button if value val toggle btn on value val toggle btn off return as check box if value val radio btn on value val radio btn off return as radio button if value instanceof i menu creator return as drop down menu we should never get to this line return as push button getstyle val_push_btn as_push_button val_toggle_btn_on val_toggle_btn_off as_check_box val_radio_btn_on val_radio_btn_off as_radio_button imenucreator as_drop_down_menu as_push_button method declared on i action public string get text return text iaction gettext method declared on i action public string get tool tip text return tool tip text iaction gettooltiptext tooltiptext initializes the internal key code table private static void init key codes key codes new hash map 40 key codes put backspace new integer 8 non nls 1 key codes put tab new integer 9 non nls 1 key codes put return new integer 13 non nls 1 key codes put enter new integer 13 non nls 1 key codes put escape new integer 27 non nls 1 key codes put esc new integer 27 non nls 1 key codes put delete new integer 127 non nls 1 key codes put space new integer non nls 1 key codes put arrow up new integer swt arrow up non nls 1 key codes put arrow down new integer swt arrow down non nls 1 key codes put arrow left new integer swt arrow left non nls 1 key codes put arrow right new integer swt arrow right non nls 1 key codes put page up new integer swt page up non nls 1 key codes put page down new integer swt page down non nls 1 key codes put home new integer swt home non nls 1 key codes put end new integer swt end non nls 1 key codes put insert new integer swt insert non nls 1 key codes put f1 new integer swt f1 non nls 1 key codes put f2 new integer swt f2 non nls 1 key codes put f3 new integer swt f3 non nls 1 key codes put f4 new integer swt f4 non nls 1 key codes put f5 new integer swt f5 non nls 1 key codes put f6 new integer swt f6 non nls 1 key codes put f7 new integer swt f7 non nls 1 key codes put f8 new integer swt f8 non nls 1 key codes put f9 new integer swt f9 non nls 1 key codes put f10 new integer swt f10 non nls 1 key codes put f11 new integer swt f11 non nls 1 key codes put f12 new integer swt f12 non nls 1 initkeycodes keycodes hashmap keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes arrow_up arrow_up keycodes arrow_down arrow_down keycodes arrow_left arrow_left keycodes arrow_right arrow_right keycodes page_up page_up keycodes page_down page_down keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes initializes the localized internal key code table private static void init localized key codes localized key codes new hash map 40 localized key codes put j face resources get string backspace to upper case new integer 8 non nls 1 localized key codes put j face resources get string tab to upper case new integer 9 non nls 1 localized key codes put j face resources get string return to upper case new integer 13 non nls 1 localized key codes put j face resources get string enter to upper case new integer 13 non nls 1 localized key codes put j face resources get string escape to upper case new integer 27 non nls 1 localized key codes put j face resources get string esc to upper case new integer 27 non nls 1 localized key codes put j face resources get string delete to upper case new integer 127 non nls 1 localized key codes put j face resources get string space to upper case new integer non nls 1 localized key codes put j face resources get string arrow up to upper case new integer swt arrow up non nls 1 localized key codes put j face resources get string arrow down to upper case new integer swt arrow down non nls 1 localized key codes put j face resources get string arrow left to upper case new integer swt arrow left non nls 1 localized key codes put j face resources get string arrow right to upper case new integer swt arrow right non nls 1 localized key codes put j face resources get string page up to upper case new integer swt page up non nls 1 localized key codes put j face resources get string page down to upper case new integer swt page down non nls 1 localized key codes put j face resources get string home to upper case new integer swt home non nls 1 localized key codes put j face resources get string end to upper case new integer swt end non nls 1 localized key codes put j face resources get string insert to upper case new integer swt insert non nls 1 localized key codes put j face resources get string f1 to upper case new integer swt f1 non nls 1 localized key codes put j face resources get string f2 to upper case new integer swt f2 non nls 1 localized key codes put j face resources get string f3 to upper case new integer swt f3 non nls 1 localized key codes put j face resources get string f4 to upper case new integer swt f4 non nls 1 localized key codes put j face resources get string f5 to upper case new integer swt f5 non nls 1 localized key codes put j face resources get string f6 to upper case new integer swt f6 non nls 1 localized key codes put j face resources get string f7 to upper case new integer swt f7 non nls 1 localized key codes put j face resources get string f8 to upper case new integer swt f8 non nls 1 localized key codes put j face resources get string f9 to upper case new integer swt f9 non nls 1 localized key codes put j face resources get string f10 to upper case new integer swt f10 non nls 1 localized key codes put j face resources get string f11 to upper case new integer swt f11 non nls 1 localized key codes put j face resources get string f12 to upper case new integer swt f12 non nls 1 initlocalizedkeycodes localizedkeycodes hashmap localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring arrow_up touppercase arrow_up localizedkeycodes jfaceresources getstring arrow_down touppercase arrow_down localizedkeycodes jfaceresources getstring arrow_left touppercase arrow_left localizedkeycodes jfaceresources getstring arrow_right touppercase arrow_right localizedkeycodes jfaceresources getstring page_up touppercase page_up localizedkeycodes jfaceresources getstring page_down touppercase page_down localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase initializes the internal key string table private static void init key strings key strings new hash map 40 key strings put new integer 8 j face resources get string backspace non nls 1 key strings put new integer 9 j face resources get string tab non nls 1 key strings put new integer 13 j face resources get string return non nls 1 key strings put new integer 13 j face resources get string enter non nls 1 key strings put new integer 27 j face resources get string escape non nls 1 key strings put new integer 27 j face resources get string esc non nls 1 key strings put new integer 127 j face resources get string delete non nls 1 key strings put new integer j face resources get string space non nls 1 key strings put new integer swt arrow up j face resources get string arrow up non nls 1 key strings put new integer swt arrow down j face resources get string arrow down non nls 1 key strings put new integer swt arrow left j face resources get string arrow left non nls 1 key strings put new integer swt arrow right j face resources get string arrow right non nls 1 key strings put new integer swt page up j face resources get string page up non nls 1 key strings put new integer swt page down j face resources get string page down non nls 1 key strings put new integer swt home j face resources get string home non nls 1 key strings put new integer swt end j face resources get string end non nls 1 key strings put new integer swt insert j face resources get string insert non nls 1 key strings put new integer swt f1 j face resources get string f1 non nls 1 key strings put new integer swt f2 j face resources get string f2 non nls 1 key strings put new integer swt f3 j face resources get string f3 non nls 1 key strings put new integer swt f4 j face resources get string f4 non nls 1 key strings put new integer swt f5 j face resources get string f5 non nls 1 key strings put new integer swt f6 j face resources get string f6 non nls 1 key strings put new integer swt f7 j face resources get string f7 non nls 1 key strings put new integer swt f8 j face resources get string f8 non nls 1 key strings put new integer swt f9 j face resources get string f9 non nls 1 key strings put new integer swt f10 j face resources get string f10 non nls 1 key strings put new integer swt f11 j face resources get string f11 non nls 1 key strings put new integer swt f12 j face resources get string f12 non nls 1 initkeystrings keystrings hashmap keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings arrow_up jfaceresources getstring arrow_up keystrings arrow_down jfaceresources getstring arrow_down keystrings arrow_left jfaceresources getstring arrow_left keystrings arrow_right jfaceresources getstring arrow_right keystrings page_up jfaceresources getstring page_up keystrings page_down jfaceresources getstring page_down keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring method declared on i action public boolean is checked return value val toggle btn on value val radio btn on iaction ischecked val_toggle_btn_on val_radio_btn_on method declared on i action public boolean is enabled return enabled iaction isenabled method declared on i action public boolean is handled return true iaction ishandled convenience method for removing any optional accelerator text from the given string the accelerator text appears at the end of the text and is separated from the main part by a single tab character code t code param text the text return the text sans accelerator public static string remove accelerator text string text int index text last index of t if index 1 index text last index of if index 0 return text substring 0 index return text removeacceleratortext lastindexof lastindexof convenience method for removing any mnemonics from the given string for example code remove mnemonics open code will return code open code param text the text return the text sans mnemonics since 3 0 public static string remove mnemonics string text int index text index of if index 1 return text int len text length string buffer sb new string buffer len int last index 0 while index 1 ignore at the end if index len 1 break handle the case if text char at index 1 index dbcs languages use x format if index 0 text char at index 1 text length index 3 text char at index 2 sb append text substring last index index 1 index 3 else sb append text substring last index index skip the index last index index index text index of index if last index len sb append text substring last index len return sb to string removemnemonics removemnemonics indexof stringbuffer stringbuffer lastindex charat charat charat lastindex lastindex lastindex indexof lastindex lastindex tostring method declared on i action public void remove property change listener i property change listener listener listeners remove listener iaction removepropertychangelistener ipropertychangelistener the default implementation of this code i action code method does nothing subclasses should override this method if they do not need information from the triggering event or override code run with event event code if they do public void run do nothing iaction runwithevent the default implementation of this code i action code method ignores the event argument and simply calls code run code subclasses should override this method if they need information from the triggering event or override code run code if not param event the swt event which triggered this action being run since 2 0 public void run with event event event run iaction runwithevent method declared on i action public void set action definition id string id action definition id id iaction setactiondefinitionid actiondefinitionid public void set checked boolean checked object new value null for backward compatibility if the style is not set yet then convert it to a toggle button if value null value val toggle btn on value val toggle btn off new value checked val toggle btn on val toggle btn off else if value val radio btn on value val radio btn off new value checked val radio btn on val radio btn off else some other style already so do nothing return if new value value value new value if checked fire property change checked boolean false boolean true else fire property change checked boolean true boolean false setchecked newvalue val_toggle_btn_on val_toggle_btn_off newvalue val_toggle_btn_on val_toggle_btn_off val_radio_btn_on val_radio_btn_off newvalue val_radio_btn_on val_radio_btn_off newvalue newvalue firepropertychange firepropertychange public void set description string text if description null text null description null text null description null text null text equals description string old description description description text fire property change description old description description setdescription olddescription firepropertychange olddescription public void set disabled image descriptor image descriptor new image if disabled image new image image descriptor old image disabled image disabled image new image fire property change image old image new image setdisabledimagedescriptor imagedescriptor newimage disabledimage newimage imagedescriptor oldimage disabledimage disabledimage newimage firepropertychange oldimage newimage public void set enabled boolean enabled if enabled this enabled boolean old val this enabled boolean true boolean false boolean new val enabled boolean true boolean false this enabled enabled fire property change enabled old val new val setenabled oldval newval firepropertychange oldval newval method declared on i action public void set help listener help listener listener help listener listener iaction sethelplistener helplistener helplistener public void set hover image descriptor image descriptor new image if hover image new image image descriptor old image hover image hover image new image fire property change image old image new image sethoverimagedescriptor imagedescriptor newimage hoverimage newimage imagedescriptor oldimage hoverimage hoverimage newimage firepropertychange oldimage newimage method declared on i action public void set id string id this id id iaction setid public void set image descriptor image descriptor new image if image new image image descriptor old image image image new image fire property change image old image new image setimagedescriptor imagedescriptor newimage newimage imagedescriptor oldimage newimage firepropertychange oldimage newimage sets the menu creator for this action p note that if this method is called it overrides the check status p param creator the menu creator or code null code if none public void set menu creator i menu creator creator for backward compatibility if the style is not set yet then convert it to a drop down menu if value null value creator return if value instanceof i menu creator value creator null val drop down menu creator setmenucreator imenucreator imenucreator val_drop_down_menu sets the text for this action p fires a property change event for the code text code property if the text actually changes as a consequence p p the accelerator is identified by the last index of a tab character if there are no tab characters then it is identified by the last index of a character if neither then there is no accelerator text note that if you want to insert a character into the text but no accelerator you can simply insert a or a tab at the end of the text p param text the text or code null code if none public void set text string text string old text this text int old accel this accelerator this text text if text null string accelerator text extract accelerator text text if accelerator text null int new accelerator convert localized accelerator accelerator text be sure to not wipe out the accelerator if nothing found if new accelerator 0 set accelerator new accelerator if this accelerator old accel old text null this text null old text equals this text fire property change text old text this text settext oldtext oldaccel acceleratortext extractacceleratortext acceleratortext newaccelerator convertlocalizedaccelerator acceleratortext newaccelerator setaccelerator newaccelerator oldaccel oldtext oldtext firepropertychange oldtext sets the tool tip text for this action p fires a property change event for the code tool tip text code property if the tool tip text actually changes as a consequence p param tool tip text the tool tip text or code null code if none public void set tool tip text string tool tip text string old tool tip text this tool tip text if old tool tip text null tool tip text null old tool tip text equals tool tip text this tool tip text tool tip text fire property change tool tip text old tool tip text tool tip text tool_tip_text tooltiptext settooltiptext tooltiptext oldtooltiptext tooltiptext oldtooltiptext tooltiptext oldtooltiptext tooltiptext tooltiptext tooltiptext firepropertychange tool_tip_text oldtooltiptext tooltiptext see i action set accelerator int public void set accelerator int keycode this accelerator keycode iaction setaccelerator setaccelerator reports the outcome of the running of this action via the link i action result property param success code true code if the action succeeded and code false code if the action failed or was not completed see i action result since 3 0 public final void notify result boolean success avoid boolean value of boolean to allow compilation against jcl foundation bug 80059 fire property change result null success boolean true boolean false iaction iaction notifyresult valueof firepropertychange private static final i menu creator val drop down menu new i menu creator public void dispose do nothing imenucreator val_drop_down_menu imenucreator public menu get menu control parent do nothing return null getmenu public menu get menu menu parent do nothing return null getmenu creates a new action with no text and no image p configure the action later using the set methods p protected action do nothing creates a new action with the given text and no image calls the zero arg constructor then code set text code param text the string used as the text for the action or code null code if there is no text see set text protected action string text this set text text settext settext settext creates a new action with the given text and image calls the zero arg constructor then code set text code and code set image descriptor code param text the action s text or code null code if there is no text param image the action s image or code null code if there is no image see set text see set image descriptor protected action string text image descriptor image this text set image descriptor image settext setimagedescriptor settext setimagedescriptor imagedescriptor setimagedescriptor creates a new action with the given text and style param text the action s text or code null code if there is no text param style one of code as push button code code as check box code code as drop down menu code code as radio button code and code as unspecified code protected action string text int style this text switch style case as push button value val push btn break case as check box value val toggle btn off break case as drop down menu value val drop down menu break case as radio button value val radio btn off break as_push_button as_check_box as_drop_down_menu as_radio_button as_unspecified as_push_button val_push_btn as_check_box val_toggle_btn_off as_drop_down_menu val_drop_down_menu as_radio_button val_radio_btn_off method declared on i action public void add property change listener i property change listener listener listeners add listener iaction addpropertychangelistener ipropertychangelistener parses the given accelerator text and converts it to an accelerator key code support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml param accelerator text the accelerator text localized to the current locale return the swt key code or 0 if there is no accelerator private static int convert localized accelerator string accelerator text int accelerator 0 string tokenizer stok new string tokenizer accelerator text non nls 1 int key code 1 boolean has more tokens stok has more tokens while has more tokens string token stok next token has more tokens stok has more tokens every token except the last must be one of the modifiers ctrl shift alt or command if has more tokens int modifier find localized modifier token if modifier 0 accelerator modifier else leave if there are none return 0 else key code find localized key code token if key code 1 accelerator key code return accelerator setaccelerator acceleratortext convertlocalizedaccelerator acceleratortext stringtokenizer stringtokenizer acceleratortext keycode hasmoretokens hasmoretokens hasmoretokens nexttoken hasmoretokens hasmoretokens hasmoretokens findlocalizedmodifier keycode findlocalizedkeycode keycode keycode parses the given accelerator text and converts it to an accelerator key code param accelerator text the accelerator text return the swt key code or 0 if there is no accelerator public static int convert accelerator string accelerator text int accelerator 0 string tokenizer stok new string tokenizer accelerator text non nls 1 int key code 1 boolean has more tokens stok has more tokens while has more tokens string token stok next token has more tokens stok has more tokens every token except the last must be one of the modifiers ctrl shift alt or command if has more tokens int modifier find modifier token if modifier 0 accelerator modifier else leave if there are none return 0 else key code find key code token if key code 1 accelerator key code return accelerator acceleratortext convertaccelerator acceleratortext stringtokenizer stringtokenizer acceleratortext keycode hasmoretokens hasmoretokens hasmoretokens nexttoken hasmoretokens hasmoretokens hasmoretokens findmodifier keycode findkeycode keycode keycode converts an accelerator key code to a string representation param key code the key code to be translated return a string representation of the key code public static string convert accelerator int key code string modifier get modifier string key code string full key if modifier equals non nls 1 full key find key string key code else full key modifier find key string key code non nls 1 return full key keycode convertaccelerator keycode getmodifierstring keycode fullkey fullkey findkeystring keycode fullkey findkeystring keycode fullkey private static string get modifier string int key code string mod string non nls 1 if key code swt ctrl 0 mod string find modifier string key code swt ctrl if key code swt alt 0 if mod string equals non nls 1 mod string find modifier string key code swt alt else mod string mod string find modifier string key code swt alt non nls 1 if key code swt shift 0 if mod string equals non nls 1 mod string find modifier string key code swt shift else mod string mod string find modifier string key code swt shift non nls 1 if key code swt command 0 if mod string equals non nls 1 mod string find modifier string key code swt command else mod string mod string find modifier string key code swt command non nls 1 return mod string getmodifierstring keycode modstring keycode modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode modstring extracts the accelerator text from the given text returns code null code if there is no accelerator text and the empty string if there is no text after the accelerator delimeter tab or param text the text for the action return the accelerator text or code null code private static string extract accelerator text string text int index text last index of t if index 1 index text last index of if index 0 return text substring index 1 return null extractacceleratortext lastindexof lastindexof maps a standard keyboard key name to an swt key code key names are converted to upper case before comparison if the key name is a single letter for example s its character code is returned p the following key names are known case is ignored ul li code backspace code li li code tab code li li code return code li li code enter code li li code esc code li li code escape code li li code delete code li li code space code li li code arrow up code code arrow down code code arrow left code and code arrow right code li li code page up code and code page down code li li code home code li li code end code li li code insert code li li code f1 code code f2 code through code f12 code li ul p param token the key name return the swt key code code 1 code if no match was found see swt public static int find key code string token if key codes null init key codes token token to upper case integer i integer key codes get token if i null return i int value if token length 1 return token char at 0 return 1 arrow_up arrow_down arrow_left arrow_right page_up page_down findkeycode keycodes initkeycodes touppercase keycodes intvalue charat find the supplied code for a localized key as find key code but localized to the current locale support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml param token the localized key name return the swt key code code 1 code if no match was found see find key code private static int find localized key code string token if localized key codes null init localized key codes token token to upper case integer i integer localized key codes get token if i null return i int value if token length 1 return token char at 0 return 1 findkeycode setaccelerator findkeycode findlocalizedkeycode localizedkeycodes initlocalizedkeycodes touppercase localizedkeycodes intvalue charat maps an swt key code to a standard keyboard key name the key code is stripped of modifiers swt ctrl swt alt swt shift and swt command if the key code is not an swt code for example if it a key code for the key s a string containing a character representation of the key code is returned param key code the key code to be translated return the string representation of the key code see swt since 2 0 public static string find key string int key code if key strings null init key strings int i key code swt ctrl swt alt swt shift swt command integer integer new integer i string result string key strings get integer if result null return result result new string new char char i return result keycode findkeystring keycode keystrings initkeystrings keycode keystrings maps standard keyboard modifier key names to the corresponding swt modifier bit the following modifier key names are recognized case is ignored code ctrl code code shift code code alt code and code command code the given modifier key name is converted to upper case before comparison param token the modifier key name return the swt modifier bit or code 0 code if no match was found see swt public static int find modifier string token token token to upper case if token equals ctrl non nls 1 return swt ctrl if token equals shift non nls 1 return swt shift if token equals alt non nls 1 return swt alt if token equals command non nls 1 return swt command return 0 findmodifier touppercase maps the localized modifier names to a code in the same manner as find modifier support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml see find modifier private static int find localized modifier string token if localized ctrl null init localized modifiers token token to upper case if token equals localized ctrl non nls 1 return swt ctrl if token equals localized shift non nls 1 return swt shift if token equals localized alt non nls 1 return swt alt if token equals localized command non nls 1 return swt command return 0 findmodifier setaccelerator findmodifier findlocalizedmodifier localized_ctrl initlocalizedmodifiers touppercase localized_ctrl localized_shift localized_alt localized_command initialize the list of localized modifiers private static void init localized modifiers localized ctrl j face resources get string ctrl to upper case non nls 1 localized shift j face resources get string shift to upper case non nls 1 localized alt j face resources get string alt to upper case non nls 1 localized command j face resources get string command to upper case non nls 1 initlocalizedmodifiers localized_ctrl jfaceresources getstring touppercase localized_shift jfaceresources getstring touppercase localized_alt jfaceresources getstring touppercase localized_command jfaceresources getstring touppercase returns a string representation of an swt modifier bit swt ctrl swt alt swt shift and swt command returns code null code if the key code is not an swt modifier bit param key code the swt modifier bit to be translated return the string representation of the swt modifier bit or code null code if the key code was not an swt modifier bit see swt since 2 0 public static string find modifier string int key code if key code swt ctrl return j face resources get string ctrl non nls 1 if key code swt alt return j face resources get string alt non nls 1 if key code swt shift return j face resources get string shift non nls 1 if key code swt command return j face resources get string command non nls 1 return null keycode findmodifierstring keycode keycode jfaceresources getstring keycode jfaceresources getstring keycode jfaceresources getstring keycode jfaceresources getstring notifies any property change listeners that a property has changed only listeners registered at the time this method is called are notified this method avoids creating an event object if there are no listeners registered but calls code fire property change property change event code if there are param property name the name of the property that has changed param old value the old value of the property or code null code if none param new value the new value of the property or code null code if none see i property change listener property change protected void fire property change string property name object old value object new value if listeners is empty fire property change new property change event this property name old value new value firepropertychange propertychangeevent propertyname oldvalue newvalue ipropertychangelistener propertychange firepropertychange propertyname oldvalue newvalue isempty firepropertychange propertychangeevent propertyname oldvalue newvalue notifies any property change listeners that a property has changed only listeners registered at the time this method is called are notified param event the property change event see i property change listener property change protected void fire property change property change event event object list this listeners get listeners for int i 0 i list length i i property change listener list i property change event ipropertychangelistener propertychange firepropertychange propertychangeevent getlisteners ipropertychangelistener propertychange method declared on i action public int get accelerator return accelerator iaction getaccelerator public string get action definition id return action definition id getactiondefinitionid actiondefinitionid public string get description if description null return description return get tool tip text getdescription gettooltiptext method declared on i action public image descriptor get disabled image descriptor return disabled image iaction imagedescriptor getdisabledimagedescriptor disabledimage method declared on i action public help listener get help listener return help listener iaction helplistener gethelplistener helplistener method declared on i action public image descriptor get hover image descriptor return hover image iaction imagedescriptor gethoverimagedescriptor hoverimage method declared on i action public string get id return id iaction getid method declared on i action public image descriptor get image descriptor return image iaction imagedescriptor getimagedescriptor public i menu creator get menu creator the default drop down menu value is only used to mark this action requested style so do not return it for backward compatibility reasons if value val drop down menu return null if value instanceof i menu creator return i menu creator value return null imenucreator getmenucreator val_drop_down_menu imenucreator imenucreator public int get style infer the style from the value field if value val push btn value null return as push button if value val toggle btn on value val toggle btn off return as check box if value val radio btn on value val radio btn off return as radio button if value instanceof i menu creator return as drop down menu we should never get to this line return as push button getstyle val_push_btn as_push_button val_toggle_btn_on val_toggle_btn_off as_check_box val_radio_btn_on val_radio_btn_off as_radio_button imenucreator as_drop_down_menu as_push_button method declared on i action public string get text return text iaction gettext method declared on i action public string get tool tip text return tool tip text iaction gettooltiptext tooltiptext initializes the internal key code table private static void init key codes key codes new hash map 40 key codes put backspace new integer 8 non nls 1 key codes put tab new integer 9 non nls 1 key codes put return new integer 13 non nls 1 key codes put enter new integer 13 non nls 1 key codes put escape new integer 27 non nls 1 key codes put esc new integer 27 non nls 1 key codes put delete new integer 127 non nls 1 key codes put space new integer non nls 1 key codes put arrow up new integer swt arrow up non nls 1 key codes put arrow down new integer swt arrow down non nls 1 key codes put arrow left new integer swt arrow left non nls 1 key codes put arrow right new integer swt arrow right non nls 1 key codes put page up new integer swt page up non nls 1 key codes put page down new integer swt page down non nls 1 key codes put home new integer swt home non nls 1 key codes put end new integer swt end non nls 1 key codes put insert new integer swt insert non nls 1 key codes put f1 new integer swt f1 non nls 1 key codes put f2 new integer swt f2 non nls 1 key codes put f3 new integer swt f3 non nls 1 key codes put f4 new integer swt f4 non nls 1 key codes put f5 new integer swt f5 non nls 1 key codes put f6 new integer swt f6 non nls 1 key codes put f7 new integer swt f7 non nls 1 key codes put f8 new integer swt f8 non nls 1 key codes put f9 new integer swt f9 non nls 1 key codes put f10 new integer swt f10 non nls 1 key codes put f11 new integer swt f11 non nls 1 key codes put f12 new integer swt f12 non nls 1 initkeycodes keycodes hashmap keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes arrow_up arrow_up keycodes arrow_down arrow_down keycodes arrow_left arrow_left keycodes arrow_right arrow_right keycodes page_up page_up keycodes page_down page_down keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes initializes the localized internal key code table private static void init localized key codes localized key codes new hash map 40 localized key codes put j face resources get string backspace to upper case new integer 8 non nls 1 localized key codes put j face resources get string tab to upper case new integer 9 non nls 1 localized key codes put j face resources get string return to upper case new integer 13 non nls 1 localized key codes put j face resources get string enter to upper case new integer 13 non nls 1 localized key codes put j face resources get string escape to upper case new integer 27 non nls 1 localized key codes put j face resources get string esc to upper case new integer 27 non nls 1 localized key codes put j face resources get string delete to upper case new integer 127 non nls 1 localized key codes put j face resources get string space to upper case new integer non nls 1 localized key codes put j face resources get string arrow up to upper case new integer swt arrow up non nls 1 localized key codes put j face resources get string arrow down to upper case new integer swt arrow down non nls 1 localized key codes put j face resources get string arrow left to upper case new integer swt arrow left non nls 1 localized key codes put j face resources get string arrow right to upper case new integer swt arrow right non nls 1 localized key codes put j face resources get string page up to upper case new integer swt page up non nls 1 localized key codes put j face resources get string page down to upper case new integer swt page down non nls 1 localized key codes put j face resources get string home to upper case new integer swt home non nls 1 localized key codes put j face resources get string end to upper case new integer swt end non nls 1 localized key codes put j face resources get string insert to upper case new integer swt insert non nls 1 localized key codes put j face resources get string f1 to upper case new integer swt f1 non nls 1 localized key codes put j face resources get string f2 to upper case new integer swt f2 non nls 1 localized key codes put j face resources get string f3 to upper case new integer swt f3 non nls 1 localized key codes put j face resources get string f4 to upper case new integer swt f4 non nls 1 localized key codes put j face resources get string f5 to upper case new integer swt f5 non nls 1 localized key codes put j face resources get string f6 to upper case new integer swt f6 non nls 1 localized key codes put j face resources get string f7 to upper case new integer swt f7 non nls 1 localized key codes put j face resources get string f8 to upper case new integer swt f8 non nls 1 localized key codes put j face resources get string f9 to upper case new integer swt f9 non nls 1 localized key codes put j face resources get string f10 to upper case new integer swt f10 non nls 1 localized key codes put j face resources get string f11 to upper case new integer swt f11 non nls 1 localized key codes put j face resources get string f12 to upper case new integer swt f12 non nls 1 initlocalizedkeycodes localizedkeycodes hashmap localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring arrow_up touppercase arrow_up localizedkeycodes jfaceresources getstring arrow_down touppercase arrow_down localizedkeycodes jfaceresources getstring arrow_left touppercase arrow_left localizedkeycodes jfaceresources getstring arrow_right touppercase arrow_right localizedkeycodes jfaceresources getstring page_up touppercase page_up localizedkeycodes jfaceresources getstring page_down touppercase page_down localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase initializes the internal key string table private static void init key strings key strings new hash map 40 key strings put new integer 8 j face resources get string backspace non nls 1 key strings put new integer 9 j face resources get string tab non nls 1 key strings put new integer 13 j face resources get string return non nls 1 key strings put new integer 13 j face resources get string enter non nls 1 key strings put new integer 27 j face resources get string escape non nls 1 key strings put new integer 27 j face resources get string esc non nls 1 key strings put new integer 127 j face resources get string delete non nls 1 key strings put new integer j face resources get string space non nls 1 key strings put new integer swt arrow up j face resources get string arrow up non nls 1 key strings put new integer swt arrow down j face resources get string arrow down non nls 1 key strings put new integer swt arrow left j face resources get string arrow left non nls 1 key strings put new integer swt arrow right j face resources get string arrow right non nls 1 key strings put new integer swt page up j face resources get string page up non nls 1 key strings put new integer swt page down j face resources get string page down non nls 1 key strings put new integer swt home j face resources get string home non nls 1 key strings put new integer swt end j face resources get string end non nls 1 key strings put new integer swt insert j face resources get string insert non nls 1 key strings put new integer swt f1 j face resources get string f1 non nls 1 key strings put new integer swt f2 j face resources get string f2 non nls 1 key strings put new integer swt f3 j face resources get string f3 non nls 1 key strings put new integer swt f4 j face resources get string f4 non nls 1 key strings put new integer swt f5 j face resources get string f5 non nls 1 key strings put new integer swt f6 j face resources get string f6 non nls 1 key strings put new integer swt f7 j face resources get string f7 non nls 1 key strings put new integer swt f8 j face resources get string f8 non nls 1 key strings put new integer swt f9 j face resources get string f9 non nls 1 key strings put new integer swt f10 j face resources get string f10 non nls 1 key strings put new integer swt f11 j face resources get string f11 non nls 1 key strings put new integer swt f12 j face resources get string f12 non nls 1 initkeystrings keystrings hashmap keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings arrow_up jfaceresources getstring arrow_up keystrings arrow_down jfaceresources getstring arrow_down keystrings arrow_left jfaceresources getstring arrow_left keystrings arrow_right jfaceresources getstring arrow_right keystrings page_up jfaceresources getstring page_up keystrings page_down jfaceresources getstring page_down keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring method declared on i action public boolean is checked return value val toggle btn on value val radio btn on iaction ischecked val_toggle_btn_on val_radio_btn_on method declared on i action public boolean is enabled return enabled iaction isenabled method declared on i action public boolean is handled return true iaction ishandled convenience method for removing any optional accelerator text from the given string the accelerator text appears at the end of the text and is separated from the main part by a single tab character code t code param text the text return the text sans accelerator public static string remove accelerator text string text int index text last index of t if index 1 index text last index of if index 0 return text substring 0 index return text removeacceleratortext lastindexof lastindexof convenience method for removing any mnemonics from the given string for example code remove mnemonics open code will return code open code param text the text return the text sans mnemonics since 3 0 public static string remove mnemonics string text int index text index of if index 1 return text int len text length string buffer sb new string buffer len int last index 0 while index 1 ignore at the end if index len 1 break handle the case if text char at index 1 index dbcs languages use x format if index 0 text char at index 1 text length index 3 text char at index 2 sb append text substring last index index 1 index 3 else sb append text substring last index index skip the index last index index index text index of index if last index len sb append text substring last index len return sb to string removemnemonics removemnemonics indexof stringbuffer stringbuffer lastindex charat charat charat lastindex lastindex lastindex indexof lastindex lastindex tostring method declared on i action public void remove property change listener i property change listener listener listeners remove listener iaction removepropertychangelistener ipropertychangelistener the default implementation of this code i action code method does nothing subclasses should override this method if they do not need information from the triggering event or override code run with event event code if they do public void run do nothing iaction runwithevent the default implementation of this code i action code method ignores the event argument and simply calls code run code subclasses should override this method if they need information from the triggering event or override code run code if not param event the swt event which triggered this action being run since 2 0 public void run with event event event run iaction runwithevent method declared on i action public void set action definition id string id action definition id id iaction setactiondefinitionid actiondefinitionid public void set checked boolean checked object new value null for backward compatibility if the style is not set yet then convert it to a toggle button if value null value val toggle btn on value val toggle btn off new value checked val toggle btn on val toggle btn off else if value val radio btn on value val radio btn off new value checked val radio btn on val radio btn off else some other style already so do nothing return if new value value value new value if checked fire property change checked boolean false boolean true else fire property change checked boolean true boolean false setchecked newvalue val_toggle_btn_on val_toggle_btn_off newvalue val_toggle_btn_on val_toggle_btn_off val_radio_btn_on val_radio_btn_off newvalue val_radio_btn_on val_radio_btn_off newvalue newvalue firepropertychange firepropertychange public void set description string text if description null text null description null text null description null text null text equals description string old description description description text fire property change description old description description setdescription olddescription firepropertychange olddescription public void set disabled image descriptor image descriptor new image if disabled image new image image descriptor old image disabled image disabled image new image fire property change image old image new image setdisabledimagedescriptor imagedescriptor newimage disabledimage newimage imagedescriptor oldimage disabledimage disabledimage newimage firepropertychange oldimage newimage public void set enabled boolean enabled if enabled this enabled boolean old val this enabled boolean true boolean false boolean new val enabled boolean true boolean false this enabled enabled fire property change enabled old val new val setenabled oldval newval firepropertychange oldval newval method declared on i action public void set help listener help listener listener help listener listener iaction sethelplistener helplistener helplistener public void set hover image descriptor image descriptor new image if hover image new image image descriptor old image hover image hover image new image fire property change image old image new image sethoverimagedescriptor imagedescriptor newimage hoverimage newimage imagedescriptor oldimage hoverimage hoverimage newimage firepropertychange oldimage newimage method declared on i action public void set id string id this id id iaction setid public void set image descriptor image descriptor new image if image new image image descriptor old image image image new image fire property change image old image new image setimagedescriptor imagedescriptor newimage newimage imagedescriptor oldimage newimage firepropertychange oldimage newimage sets the menu creator for this action p note that if this method is called it overrides the check status p param creator the menu creator or code null code if none public void set menu creator i menu creator creator for backward compatibility if the style is not set yet then convert it to a drop down menu if value null value creator return if value instanceof i menu creator value creator null val drop down menu creator setmenucreator imenucreator imenucreator val_drop_down_menu sets the text for this action p fires a property change event for the code text code property if the text actually changes as a consequence p p the accelerator is identified by the last index of a tab character if there are no tab characters then it is identified by the last index of a character if neither then there is no accelerator text note that if you want to insert a character into the text but no accelerator you can simply insert a or a tab at the end of the text p param text the text or code null code if none public void set text string text string old text this text int old accel this accelerator this text text if text null string accelerator text extract accelerator text text if accelerator text null int new accelerator convert localized accelerator accelerator text be sure to not wipe out the accelerator if nothing found if new accelerator 0 set accelerator new accelerator if this accelerator old accel old text null this text null old text equals this text fire property change text old text this text settext oldtext oldaccel acceleratortext extractacceleratortext acceleratortext newaccelerator convertlocalizedaccelerator acceleratortext newaccelerator setaccelerator newaccelerator oldaccel oldtext oldtext firepropertychange oldtext sets the tool tip text for this action p fires a property change event for the code tool tip text code property if the tool tip text actually changes as a consequence p param tool tip text the tool tip text or code null code if none public void set tool tip text string tool tip text string old tool tip text this tool tip text if old tool tip text null tool tip text null old tool tip text equals tool tip text this tool tip text tool tip text fire property change tool tip text old tool tip text tool tip text tool_tip_text tooltiptext settooltiptext tooltiptext oldtooltiptext tooltiptext oldtooltiptext tooltiptext oldtooltiptext tooltiptext tooltiptext tooltiptext firepropertychange tool_tip_text oldtooltiptext tooltiptext see i action set accelerator int public void set accelerator int keycode this accelerator keycode iaction setaccelerator setaccelerator reports the outcome of the running of this action via the link i action result property param success code true code if the action succeeded and code false code if the action failed or was not completed see i action result since 3 0 public final void notify result boolean success avoid boolean value of boolean to allow compilation against jcl foundation bug 80059 fire property change result null success boolean true boolean false iaction iaction notifyresult valueof firepropertychange private static final i menu creator val drop down menu new i menu creator public void dispose do nothing imenucreator val_drop_down_menu imenucreator public menu get menu control parent do nothing return null getmenu public menu get menu menu parent do nothing return null getmenu creates a new action with no text and no image p configure the action later using the set methods p protected action do nothing creates a new action with the given text and no image calls the zero arg constructor then code set text code param text the string used as the text for the action or code null code if there is no text see set text protected action string text this set text text settext settext settext creates a new action with the given text and image calls the zero arg constructor then code set text code and code set image descriptor code param text the action s text or code null code if there is no text param image the action s image or code null code if there is no image see set text see set image descriptor protected action string text image descriptor image this text set image descriptor image settext setimagedescriptor settext setimagedescriptor imagedescriptor setimagedescriptor creates a new action with the given text and style param text the action s text or code null code if there is no text param style one of code as push button code code as check box code code as drop down menu code code as radio button code and code as unspecified code protected action string text int style this text switch style case as push button value val push btn break case as check box value val toggle btn off break case as drop down menu value val drop down menu break case as radio button value val radio btn off break as_push_button as_check_box as_drop_down_menu as_radio_button as_unspecified as_push_button val_push_btn as_check_box val_toggle_btn_off as_drop_down_menu val_drop_down_menu as_radio_button val_radio_btn_off method declared on i action public void add property change listener i property change listener listener listeners add listener iaction addpropertychangelistener ipropertychangelistener parses the given accelerator text and converts it to an accelerator key code support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml param accelerator text the accelerator text localized to the current locale return the swt key code or 0 if there is no accelerator private static int convert localized accelerator string accelerator text int accelerator 0 string tokenizer stok new string tokenizer accelerator text non nls 1 int key code 1 boolean has more tokens stok has more tokens while has more tokens string token stok next token has more tokens stok has more tokens every token except the last must be one of the modifiers ctrl shift alt or command if has more tokens int modifier find localized modifier token if modifier 0 accelerator modifier else leave if there are none return 0 else key code find localized key code token if key code 1 accelerator key code return accelerator setaccelerator acceleratortext convertlocalizedaccelerator acceleratortext stringtokenizer stringtokenizer acceleratortext keycode hasmoretokens hasmoretokens hasmoretokens nexttoken hasmoretokens hasmoretokens hasmoretokens findlocalizedmodifier keycode findlocalizedkeycode keycode keycode parses the given accelerator text and converts it to an accelerator key code param accelerator text the accelerator text return the swt key code or 0 if there is no accelerator public static int convert accelerator string accelerator text int accelerator 0 string tokenizer stok new string tokenizer accelerator text non nls 1 int key code 1 boolean has more tokens stok has more tokens while has more tokens string token stok next token has more tokens stok has more tokens every token except the last must be one of the modifiers ctrl shift alt or command if has more tokens int modifier find modifier token if modifier 0 accelerator modifier else leave if there are none return 0 else key code find key code token if key code 1 accelerator key code return accelerator acceleratortext convertaccelerator acceleratortext stringtokenizer stringtokenizer acceleratortext keycode hasmoretokens hasmoretokens hasmoretokens nexttoken hasmoretokens hasmoretokens hasmoretokens findmodifier keycode findkeycode keycode keycode converts an accelerator key code to a string representation param key code the key code to be translated return a string representation of the key code public static string convert accelerator int key code string modifier get modifier string key code string full key if modifier equals non nls 1 full key find key string key code else full key modifier find key string key code non nls 1 return full key keycode convertaccelerator keycode getmodifierstring keycode fullkey fullkey findkeystring keycode fullkey findkeystring keycode fullkey private static string get modifier string int key code string mod string non nls 1 if key code swt ctrl 0 mod string find modifier string key code swt ctrl if key code swt alt 0 if mod string equals non nls 1 mod string find modifier string key code swt alt else mod string mod string find modifier string key code swt alt non nls 1 if key code swt shift 0 if mod string equals non nls 1 mod string find modifier string key code swt shift else mod string mod string find modifier string key code swt shift non nls 1 if key code swt command 0 if mod string equals non nls 1 mod string find modifier string key code swt command else mod string mod string find modifier string key code swt command non nls 1 return mod string getmodifierstring keycode modstring keycode modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode modstring extracts the accelerator text from the given text returns code null code if there is no accelerator text and the empty string if there is no text after the accelerator delimeter tab or param text the text for the action return the accelerator text or code null code private static string extract accelerator text string text int index text last index of t if index 1 index text last index of if index 0 return text substring index 1 return null extractacceleratortext lastindexof lastindexof maps a standard keyboard key name to an swt key code key names are converted to upper case before comparison if the key name is a single letter for example s its character code is returned p the following key names are known case is ignored ul li code backspace code li li code tab code li li code return code li li code enter code li li code esc code li li code escape code li li code delete code li li code space code li li code arrow up code code arrow down code code arrow left code and code arrow right code li li code page up code and code page down code li li code home code li li code end code li li code insert code li li code f1 code code f2 code through code f12 code li ul p param token the key name return the swt key code code 1 code if no match was found see swt public static int find key code string token if key codes null init key codes token token to upper case integer i integer key codes get token if i null return i int value if token length 1 return token char at 0 return 1 arrow_up arrow_down arrow_left arrow_right page_up page_down findkeycode keycodes initkeycodes touppercase keycodes intvalue charat find the supplied code for a localized key as find key code but localized to the current locale support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml param token the localized key name return the swt key code code 1 code if no match was found see find key code private static int find localized key code string token if localized key codes null init localized key codes token token to upper case integer i integer localized key codes get token if i null return i int value if token length 1 return token char at 0 return 1 findkeycode setaccelerator findkeycode findlocalizedkeycode localizedkeycodes initlocalizedkeycodes touppercase localizedkeycodes intvalue charat maps an swt key code to a standard keyboard key name the key code is stripped of modifiers swt ctrl swt alt swt shift and swt command if the key code is not an swt code for example if it a key code for the key s a string containing a character representation of the key code is returned param key code the key code to be translated return the string representation of the key code see swt since 2 0 public static string find key string int key code if key strings null init key strings int i key code swt ctrl swt alt swt shift swt command integer integer new integer i string result string key strings get integer if result null return result result new string new char char i return result keycode findkeystring keycode keystrings initkeystrings keycode keystrings maps standard keyboard modifier key names to the corresponding swt modifier bit the following modifier key names are recognized case is ignored code ctrl code code shift code code alt code and code command code the given modifier key name is converted to upper case before comparison param token the modifier key name return the swt modifier bit or code 0 code if no match was found see swt public static int find modifier string token token token to upper case if token equals ctrl non nls 1 return swt ctrl if token equals shift non nls 1 return swt shift if token equals alt non nls 1 return swt alt if token equals command non nls 1 return swt command return 0 findmodifier touppercase maps the localized modifier names to a code in the same manner as find modifier support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml see find modifier private static int find localized modifier string token if localized ctrl null init localized modifiers token token to upper case if token equals localized ctrl non nls 1 return swt ctrl if token equals localized shift non nls 1 return swt shift if token equals localized alt non nls 1 return swt alt if token equals localized command non nls 1 return swt command return 0 findmodifier setaccelerator findmodifier findlocalizedmodifier localized_ctrl initlocalizedmodifiers touppercase localized_ctrl localized_shift localized_alt localized_command initialize the list of localized modifiers private static void init localized modifiers localized ctrl j face resources get string ctrl to upper case non nls 1 localized shift j face resources get string shift to upper case non nls 1 localized alt j face resources get string alt to upper case non nls 1 localized command j face resources get string command to upper case non nls 1 initlocalizedmodifiers localized_ctrl jfaceresources getstring touppercase localized_shift jfaceresources getstring touppercase localized_alt jfaceresources getstring touppercase localized_command jfaceresources getstring touppercase returns a string representation of an swt modifier bit swt ctrl swt alt swt shift and swt command returns code null code if the key code is not an swt modifier bit param key code the swt modifier bit to be translated return the string representation of the swt modifier bit or code null code if the key code was not an swt modifier bit see swt since 2 0 public static string find modifier string int key code if key code swt ctrl return j face resources get string ctrl non nls 1 if key code swt alt return j face resources get string alt non nls 1 if key code swt shift return j face resources get string shift non nls 1 if key code swt command return j face resources get string command non nls 1 return null keycode findmodifierstring keycode keycode jfaceresources getstring keycode jfaceresources getstring keycode jfaceresources getstring keycode jfaceresources getstring notifies any property change listeners that a property has changed only listeners registered at the time this method is called are notified this method avoids creating an event object if there are no listeners registered but calls code fire property change property change event code if there are param property name the name of the property that has changed param old value the old value of the property or code null code if none param new value the new value of the property or code null code if none see i property change listener property change protected void fire property change string property name object old value object new value if listeners is empty fire property change new property change event this property name old value new value firepropertychange propertychangeevent propertyname oldvalue newvalue ipropertychangelistener propertychange firepropertychange propertyname oldvalue newvalue isempty firepropertychange propertychangeevent propertyname oldvalue newvalue notifies any property change listeners that a property has changed only listeners registered at the time this method is called are notified param event the property change event see i property change listener property change protected void fire property change property change event event object list this listeners get listeners for int i 0 i list length i i property change listener list i property change event ipropertychangelistener propertychange firepropertychange propertychangeevent getlisteners ipropertychangelistener propertychange method declared on i action public int get accelerator return accelerator iaction getaccelerator public string get action definition id return action definition id getactiondefinitionid actiondefinitionid public string get description if description null return description return get tool tip text getdescription gettooltiptext method declared on i action public image descriptor get disabled image descriptor return disabled image iaction imagedescriptor getdisabledimagedescriptor disabledimage method declared on i action public help listener get help listener return help listener iaction helplistener gethelplistener helplistener method declared on i action public image descriptor get hover image descriptor return hover image iaction imagedescriptor gethoverimagedescriptor hoverimage method declared on i action public string get id return id iaction getid method declared on i action public image descriptor get image descriptor return image iaction imagedescriptor getimagedescriptor public i menu creator get menu creator the default drop down menu value is only used to mark this action requested style so do not return it for backward compatibility reasons if value val drop down menu return null if value instanceof i menu creator return i menu creator value return null imenucreator getmenucreator val_drop_down_menu imenucreator imenucreator public int get style infer the style from the value field if value val push btn value null return as push button if value val toggle btn on value val toggle btn off return as check box if value val radio btn on value val radio btn off return as radio button if value instanceof i menu creator return as drop down menu we should never get to this line return as push button getstyle val_push_btn as_push_button val_toggle_btn_on val_toggle_btn_off as_check_box val_radio_btn_on val_radio_btn_off as_radio_button imenucreator as_drop_down_menu as_push_button method declared on i action public string get text return text iaction gettext method declared on i action public string get tool tip text return tool tip text iaction gettooltiptext tooltiptext initializes the internal key code table private static void init key codes key codes new hash map 40 key codes put backspace new integer 8 non nls 1 key codes put tab new integer 9 non nls 1 key codes put return new integer 13 non nls 1 key codes put enter new integer 13 non nls 1 key codes put escape new integer 27 non nls 1 key codes put esc new integer 27 non nls 1 key codes put delete new integer 127 non nls 1 key codes put space new integer non nls 1 key codes put arrow up new integer swt arrow up non nls 1 key codes put arrow down new integer swt arrow down non nls 1 key codes put arrow left new integer swt arrow left non nls 1 key codes put arrow right new integer swt arrow right non nls 1 key codes put page up new integer swt page up non nls 1 key codes put page down new integer swt page down non nls 1 key codes put home new integer swt home non nls 1 key codes put end new integer swt end non nls 1 key codes put insert new integer swt insert non nls 1 key codes put f1 new integer swt f1 non nls 1 key codes put f2 new integer swt f2 non nls 1 key codes put f3 new integer swt f3 non nls 1 key codes put f4 new integer swt f4 non nls 1 key codes put f5 new integer swt f5 non nls 1 key codes put f6 new integer swt f6 non nls 1 key codes put f7 new integer swt f7 non nls 1 key codes put f8 new integer swt f8 non nls 1 key codes put f9 new integer swt f9 non nls 1 key codes put f10 new integer swt f10 non nls 1 key codes put f11 new integer swt f11 non nls 1 key codes put f12 new integer swt f12 non nls 1 initkeycodes keycodes hashmap keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes arrow_up arrow_up keycodes arrow_down arrow_down keycodes arrow_left arrow_left keycodes arrow_right arrow_right keycodes page_up page_up keycodes page_down page_down keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes initializes the localized internal key code table private static void init localized key codes localized key codes new hash map 40 localized key codes put j face resources get string backspace to upper case new integer 8 non nls 1 localized key codes put j face resources get string tab to upper case new integer 9 non nls 1 localized key codes put j face resources get string return to upper case new integer 13 non nls 1 localized key codes put j face resources get string enter to upper case new integer 13 non nls 1 localized key codes put j face resources get string escape to upper case new integer 27 non nls 1 localized key codes put j face resources get string esc to upper case new integer 27 non nls 1 localized key codes put j face resources get string delete to upper case new integer 127 non nls 1 localized key codes put j face resources get string space to upper case new integer non nls 1 localized key codes put j face resources get string arrow up to upper case new integer swt arrow up non nls 1 localized key codes put j face resources get string arrow down to upper case new integer swt arrow down non nls 1 localized key codes put j face resources get string arrow left to upper case new integer swt arrow left non nls 1 localized key codes put j face resources get string arrow right to upper case new integer swt arrow right non nls 1 localized key codes put j face resources get string page up to upper case new integer swt page up non nls 1 localized key codes put j face resources get string page down to upper case new integer swt page down non nls 1 localized key codes put j face resources get string home to upper case new integer swt home non nls 1 localized key codes put j face resources get string end to upper case new integer swt end non nls 1 localized key codes put j face resources get string insert to upper case new integer swt insert non nls 1 localized key codes put j face resources get string f1 to upper case new integer swt f1 non nls 1 localized key codes put j face resources get string f2 to upper case new integer swt f2 non nls 1 localized key codes put j face resources get string f3 to upper case new integer swt f3 non nls 1 localized key codes put j face resources get string f4 to upper case new integer swt f4 non nls 1 localized key codes put j face resources get string f5 to upper case new integer swt f5 non nls 1 localized key codes put j face resources get string f6 to upper case new integer swt f6 non nls 1 localized key codes put j face resources get string f7 to upper case new integer swt f7 non nls 1 localized key codes put j face resources get string f8 to upper case new integer swt f8 non nls 1 localized key codes put j face resources get string f9 to upper case new integer swt f9 non nls 1 localized key codes put j face resources get string f10 to upper case new integer swt f10 non nls 1 localized key codes put j face resources get string f11 to upper case new integer swt f11 non nls 1 localized key codes put j face resources get string f12 to upper case new integer swt f12 non nls 1 initlocalizedkeycodes localizedkeycodes hashmap localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring arrow_up touppercase arrow_up localizedkeycodes jfaceresources getstring arrow_down touppercase arrow_down localizedkeycodes jfaceresources getstring arrow_left touppercase arrow_left localizedkeycodes jfaceresources getstring arrow_right touppercase arrow_right localizedkeycodes jfaceresources getstring page_up touppercase page_up localizedkeycodes jfaceresources getstring page_down touppercase page_down localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase initializes the internal key string table private static void init key strings key strings new hash map 40 key strings put new integer 8 j face resources get string backspace non nls 1 key strings put new integer 9 j face resources get string tab non nls 1 key strings put new integer 13 j face resources get string return non nls 1 key strings put new integer 13 j face resources get string enter non nls 1 key strings put new integer 27 j face resources get string escape non nls 1 key strings put new integer 27 j face resources get string esc non nls 1 key strings put new integer 127 j face resources get string delete non nls 1 key strings put new integer j face resources get string space non nls 1 key strings put new integer swt arrow up j face resources get string arrow up non nls 1 key strings put new integer swt arrow down j face resources get string arrow down non nls 1 key strings put new integer swt arrow left j face resources get string arrow left non nls 1 key strings put new integer swt arrow right j face resources get string arrow right non nls 1 key strings put new integer swt page up j face resources get string page up non nls 1 key strings put new integer swt page down j face resources get string page down non nls 1 key strings put new integer swt home j face resources get string home non nls 1 key strings put new integer swt end j face resources get string end non nls 1 key strings put new integer swt insert j face resources get string insert non nls 1 key strings put new integer swt f1 j face resources get string f1 non nls 1 key strings put new integer swt f2 j face resources get string f2 non nls 1 key strings put new integer swt f3 j face resources get string f3 non nls 1 key strings put new integer swt f4 j face resources get string f4 non nls 1 key strings put new integer swt f5 j face resources get string f5 non nls 1 key strings put new integer swt f6 j face resources get string f6 non nls 1 key strings put new integer swt f7 j face resources get string f7 non nls 1 key strings put new integer swt f8 j face resources get string f8 non nls 1 key strings put new integer swt f9 j face resources get string f9 non nls 1 key strings put new integer swt f10 j face resources get string f10 non nls 1 key strings put new integer swt f11 j face resources get string f11 non nls 1 key strings put new integer swt f12 j face resources get string f12 non nls 1 initkeystrings keystrings hashmap keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings arrow_up jfaceresources getstring arrow_up keystrings arrow_down jfaceresources getstring arrow_down keystrings arrow_left jfaceresources getstring arrow_left keystrings arrow_right jfaceresources getstring arrow_right keystrings page_up jfaceresources getstring page_up keystrings page_down jfaceresources getstring page_down keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring method declared on i action public boolean is checked return value val toggle btn on value val radio btn on iaction ischecked val_toggle_btn_on val_radio_btn_on method declared on i action public boolean is enabled return enabled iaction isenabled method declared on i action public boolean is handled return true iaction ishandled convenience method for removing any optional accelerator text from the given string the accelerator text appears at the end of the text and is separated from the main part by a single tab character code t code param text the text return the text sans accelerator public static string remove accelerator text string text int index text last index of t if index 1 index text last index of if index 0 return text substring 0 index return text removeacceleratortext lastindexof lastindexof convenience method for removing any mnemonics from the given string for example code remove mnemonics open code will return code open code param text the text return the text sans mnemonics since 3 0 public static string remove mnemonics string text int index text index of if index 1 return text int len text length string buffer sb new string buffer len int last index 0 while index 1 ignore at the end if index len 1 break handle the case if text char at index 1 index dbcs languages use x format if index 0 text char at index 1 text length index 3 text char at index 2 sb append text substring last index index 1 index 3 else sb append text substring last index index skip the index last index index index text index of index if last index len sb append text substring last index len return sb to string removemnemonics removemnemonics indexof stringbuffer stringbuffer lastindex charat charat charat lastindex lastindex lastindex indexof lastindex lastindex tostring method declared on i action public void remove property change listener i property change listener listener listeners remove listener iaction removepropertychangelistener ipropertychangelistener the default implementation of this code i action code method does nothing subclasses should override this method if they do not need information from the triggering event or override code run with event event code if they do public void run do nothing iaction runwithevent the default implementation of this code i action code method ignores the event argument and simply calls code run code subclasses should override this method if they need information from the triggering event or override code run code if not param event the swt event which triggered this action being run since 2 0 public void run with event event event run iaction runwithevent method declared on i action public void set action definition id string id action definition id id iaction setactiondefinitionid actiondefinitionid public void set checked boolean checked object new value null for backward compatibility if the style is not set yet then convert it to a toggle button if value null value val toggle btn on value val toggle btn off new value checked val toggle btn on val toggle btn off else if value val radio btn on value val radio btn off new value checked val radio btn on val radio btn off else some other style already so do nothing return if new value value value new value if checked fire property change checked boolean false boolean true else fire property change checked boolean true boolean false setchecked newvalue val_toggle_btn_on val_toggle_btn_off newvalue val_toggle_btn_on val_toggle_btn_off val_radio_btn_on val_radio_btn_off newvalue val_radio_btn_on val_radio_btn_off newvalue newvalue firepropertychange firepropertychange public void set description string text if description null text null description null text null description null text null text equals description string old description description description text fire property change description old description description setdescription olddescription firepropertychange olddescription public void set disabled image descriptor image descriptor new image if disabled image new image image descriptor old image disabled image disabled image new image fire property change image old image new image setdisabledimagedescriptor imagedescriptor newimage disabledimage newimage imagedescriptor oldimage disabledimage disabledimage newimage firepropertychange oldimage newimage public void set enabled boolean enabled if enabled this enabled boolean old val this enabled boolean true boolean false boolean new val enabled boolean true boolean false this enabled enabled fire property change enabled old val new val setenabled oldval newval firepropertychange oldval newval method declared on i action public void set help listener help listener listener help listener listener iaction sethelplistener helplistener helplistener public void set hover image descriptor image descriptor new image if hover image new image image descriptor old image hover image hover image new image fire property change image old image new image sethoverimagedescriptor imagedescriptor newimage hoverimage newimage imagedescriptor oldimage hoverimage hoverimage newimage firepropertychange oldimage newimage method declared on i action public void set id string id this id id iaction setid public void set image descriptor image descriptor new image if image new image image descriptor old image image image new image fire property change image old image new image setimagedescriptor imagedescriptor newimage newimage imagedescriptor oldimage newimage firepropertychange oldimage newimage sets the menu creator for this action p note that if this method is called it overrides the check status p param creator the menu creator or code null code if none public void set menu creator i menu creator creator for backward compatibility if the style is not set yet then convert it to a drop down menu if value null value creator return if value instanceof i menu creator value creator null val drop down menu creator setmenucreator imenucreator imenucreator val_drop_down_menu sets the text for this action p fires a property change event for the code text code property if the text actually changes as a consequence p p the accelerator is identified by the last index of a tab character if there are no tab characters then it is identified by the last index of a character if neither then there is no accelerator text note that if you want to insert a character into the text but no accelerator you can simply insert a or a tab at the end of the text p param text the text or code null code if none public void set text string text string old text this text int old accel this accelerator this text text if text null string accelerator text extract accelerator text text if accelerator text null int new accelerator convert localized accelerator accelerator text be sure to not wipe out the accelerator if nothing found if new accelerator 0 set accelerator new accelerator if this accelerator old accel old text null this text null old text equals this text fire property change text old text this text settext oldtext oldaccel acceleratortext extractacceleratortext acceleratortext newaccelerator convertlocalizedaccelerator acceleratortext newaccelerator setaccelerator newaccelerator oldaccel oldtext oldtext firepropertychange oldtext sets the tool tip text for this action p fires a property change event for the code tool tip text code property if the tool tip text actually changes as a consequence p param tool tip text the tool tip text or code null code if none public void set tool tip text string tool tip text string old tool tip text this tool tip text if old tool tip text null tool tip text null old tool tip text equals tool tip text this tool tip text tool tip text fire property change tool tip text old tool tip text tool tip text tool_tip_text tooltiptext settooltiptext tooltiptext oldtooltiptext tooltiptext oldtooltiptext tooltiptext oldtooltiptext tooltiptext tooltiptext tooltiptext firepropertychange tool_tip_text oldtooltiptext tooltiptext see i action set accelerator int public void set accelerator int keycode this accelerator keycode iaction setaccelerator setaccelerator reports the outcome of the running of this action via the link i action result property param success code true code if the action succeeded and code false code if the action failed or was not completed see i action result since 3 0 public final void notify result boolean success avoid boolean value of boolean to allow compilation against jcl foundation bug 80059 fire property change result null success boolean true boolean false iaction iaction notifyresult valueof firepropertychange private static final i menu creator val drop down menu new i menu creator public void dispose do nothing imenucreator val_drop_down_menu imenucreator public menu get menu control parent do nothing return null getmenu public menu get menu menu parent do nothing return null getmenu creates a new action with no text and no image p configure the action later using the set methods p protected action do nothing creates a new action with the given text and no image calls the zero arg constructor then code set text code param text the string used as the text for the action or code null code if there is no text see set text protected action string text this set text text settext settext settext creates a new action with the given text and image calls the zero arg constructor then code set text code and code set image descriptor code param text the action s text or code null code if there is no text param image the action s image or code null code if there is no image see set text see set image descriptor protected action string text image descriptor image this text set image descriptor image settext setimagedescriptor settext setimagedescriptor imagedescriptor setimagedescriptor creates a new action with the given text and style param text the action s text or code null code if there is no text param style one of code as push button code code as check box code code as drop down menu code code as radio button code and code as unspecified code protected action string text int style this text switch style case as push button value val push btn break case as check box value val toggle btn off break case as drop down menu value val drop down menu break case as radio button value val radio btn off break as_push_button as_check_box as_drop_down_menu as_radio_button as_unspecified as_push_button val_push_btn as_check_box val_toggle_btn_off as_drop_down_menu val_drop_down_menu as_radio_button val_radio_btn_off method declared on i action public void add property change listener i property change listener listener listeners add listener iaction addpropertychangelistener ipropertychangelistener parses the given accelerator text and converts it to an accelerator key code support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml param accelerator text the accelerator text localized to the current locale return the swt key code or 0 if there is no accelerator private static int convert localized accelerator string accelerator text int accelerator 0 string tokenizer stok new string tokenizer accelerator text non nls 1 int key code 1 boolean has more tokens stok has more tokens while has more tokens string token stok next token has more tokens stok has more tokens every token except the last must be one of the modifiers ctrl shift alt or command if has more tokens int modifier find localized modifier token if modifier 0 accelerator modifier else leave if there are none return 0 else key code find localized key code token if key code 1 accelerator key code return accelerator setaccelerator acceleratortext convertlocalizedaccelerator acceleratortext stringtokenizer stringtokenizer acceleratortext keycode hasmoretokens hasmoretokens hasmoretokens nexttoken hasmoretokens hasmoretokens hasmoretokens findlocalizedmodifier keycode findlocalizedkeycode keycode keycode parses the given accelerator text and converts it to an accelerator key code param accelerator text the accelerator text return the swt key code or 0 if there is no accelerator public static int convert accelerator string accelerator text int accelerator 0 string tokenizer stok new string tokenizer accelerator text non nls 1 int key code 1 boolean has more tokens stok has more tokens while has more tokens string token stok next token has more tokens stok has more tokens every token except the last must be one of the modifiers ctrl shift alt or command if has more tokens int modifier find modifier token if modifier 0 accelerator modifier else leave if there are none return 0 else key code find key code token if key code 1 accelerator key code return accelerator acceleratortext convertaccelerator acceleratortext stringtokenizer stringtokenizer acceleratortext keycode hasmoretokens hasmoretokens hasmoretokens nexttoken hasmoretokens hasmoretokens hasmoretokens findmodifier keycode findkeycode keycode keycode converts an accelerator key code to a string representation param key code the key code to be translated return a string representation of the key code public static string convert accelerator int key code string modifier get modifier string key code string full key if modifier equals non nls 1 full key find key string key code else full key modifier find key string key code non nls 1 return full key keycode convertaccelerator keycode getmodifierstring keycode fullkey fullkey findkeystring keycode fullkey findkeystring keycode fullkey private static string get modifier string int key code string mod string non nls 1 if key code swt ctrl 0 mod string find modifier string key code swt ctrl if key code swt alt 0 if mod string equals non nls 1 mod string find modifier string key code swt alt else mod string mod string find modifier string key code swt alt non nls 1 if key code swt shift 0 if mod string equals non nls 1 mod string find modifier string key code swt shift else mod string mod string find modifier string key code swt shift non nls 1 if key code swt command 0 if mod string equals non nls 1 mod string find modifier string key code swt command else mod string mod string find modifier string key code swt command non nls 1 return mod string getmodifierstring keycode modstring keycode modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode modstring extracts the accelerator text from the given text returns code null code if there is no accelerator text and the empty string if there is no text after the accelerator delimeter tab or param text the text for the action return the accelerator text or code null code private static string extract accelerator text string text int index text last index of t if index 1 index text last index of if index 0 return text substring index 1 return null extractacceleratortext lastindexof lastindexof maps a standard keyboard key name to an swt key code key names are converted to upper case before comparison if the key name is a single letter for example s its character code is returned p the following key names are known case is ignored ul li code backspace code li li code tab code li li code return code li li code enter code li li code esc code li li code escape code li li code delete code li li code space code li li code arrow up code code arrow down code code arrow left code and code arrow right code li li code page up code and code page down code li li code home code li li code end code li li code insert code li li code f1 code code f2 code through code f12 code li ul p param token the key name return the swt key code code 1 code if no match was found see swt public static int find key code string token if key codes null init key codes token token to upper case integer i integer key codes get token if i null return i int value if token length 1 return token char at 0 return 1 arrow_up arrow_down arrow_left arrow_right page_up page_down findkeycode keycodes initkeycodes touppercase keycodes intvalue charat find the supplied code for a localized key as find key code but localized to the current locale support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml param token the localized key name return the swt key code code 1 code if no match was found see find key code private static int find localized key code string token if localized key codes null init localized key codes token token to upper case integer i integer localized key codes get token if i null return i int value if token length 1 return token char at 0 return 1 findkeycode setaccelerator findkeycode findlocalizedkeycode localizedkeycodes initlocalizedkeycodes touppercase localizedkeycodes intvalue charat maps an swt key code to a standard keyboard key name the key code is stripped of modifiers swt ctrl swt alt swt shift and swt command if the key code is not an swt code for example if it a key code for the key s a string containing a character representation of the key code is returned param key code the key code to be translated return the string representation of the key code see swt since 2 0 public static string find key string int key code if key strings null init key strings int i key code swt ctrl swt alt swt shift swt command integer integer new integer i string result string key strings get integer if result null return result result new string new char char i return result keycode findkeystring keycode keystrings initkeystrings keycode keystrings maps standard keyboard modifier key names to the corresponding swt modifier bit the following modifier key names are recognized case is ignored code ctrl code code shift code code alt code and code command code the given modifier key name is converted to upper case before comparison param token the modifier key name return the swt modifier bit or code 0 code if no match was found see swt public static int find modifier string token token token to upper case if token equals ctrl non nls 1 return swt ctrl if token equals shift non nls 1 return swt shift if token equals alt non nls 1 return swt alt if token equals command non nls 1 return swt command return 0 findmodifier touppercase maps the localized modifier names to a code in the same manner as find modifier support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml see find modifier private static int find localized modifier string token if localized ctrl null init localized modifiers token token to upper case if token equals localized ctrl non nls 1 return swt ctrl if token equals localized shift non nls 1 return swt shift if token equals localized alt non nls 1 return swt alt if token equals localized command non nls 1 return swt command return 0 findmodifier setaccelerator findmodifier findlocalizedmodifier localized_ctrl initlocalizedmodifiers touppercase localized_ctrl localized_shift localized_alt localized_command initialize the list of localized modifiers private static void init localized modifiers localized ctrl j face resources get string ctrl to upper case non nls 1 localized shift j face resources get string shift to upper case non nls 1 localized alt j face resources get string alt to upper case non nls 1 localized command j face resources get string command to upper case non nls 1 initlocalizedmodifiers localized_ctrl jfaceresources getstring touppercase localized_shift jfaceresources getstring touppercase localized_alt jfaceresources getstring touppercase localized_command jfaceresources getstring touppercase returns a string representation of an swt modifier bit swt ctrl swt alt swt shift and swt command returns code null code if the key code is not an swt modifier bit param key code the swt modifier bit to be translated return the string representation of the swt modifier bit or code null code if the key code was not an swt modifier bit see swt since 2 0 public static string find modifier string int key code if key code swt ctrl return j face resources get string ctrl non nls 1 if key code swt alt return j face resources get string alt non nls 1 if key code swt shift return j face resources get string shift non nls 1 if key code swt command return j face resources get string command non nls 1 return null keycode findmodifierstring keycode keycode jfaceresources getstring keycode jfaceresources getstring keycode jfaceresources getstring keycode jfaceresources getstring notifies any property change listeners that a property has changed only listeners registered at the time this method is called are notified this method avoids creating an event object if there are no listeners registered but calls code fire property change property change event code if there are param property name the name of the property that has changed param old value the old value of the property or code null code if none param new value the new value of the property or code null code if none see i property change listener property change protected void fire property change string property name object old value object new value if listeners is empty fire property change new property change event this property name old value new value firepropertychange propertychangeevent propertyname oldvalue newvalue ipropertychangelistener propertychange firepropertychange propertyname oldvalue newvalue isempty firepropertychange propertychangeevent propertyname oldvalue newvalue notifies any property change listeners that a property has changed only listeners registered at the time this method is called are notified param event the property change event see i property change listener property change protected void fire property change property change event event object list this listeners get listeners for int i 0 i list length i i property change listener list i property change event ipropertychangelistener propertychange firepropertychange propertychangeevent getlisteners ipropertychangelistener propertychange method declared on i action public int get accelerator return accelerator iaction getaccelerator public string get action definition id return action definition id getactiondefinitionid actiondefinitionid public string get description if description null return description return get tool tip text getdescription gettooltiptext method declared on i action public image descriptor get disabled image descriptor return disabled image iaction imagedescriptor getdisabledimagedescriptor disabledimage method declared on i action public help listener get help listener return help listener iaction helplistener gethelplistener helplistener method declared on i action public image descriptor get hover image descriptor return hover image iaction imagedescriptor gethoverimagedescriptor hoverimage method declared on i action public string get id return id iaction getid method declared on i action public image descriptor get image descriptor return image iaction imagedescriptor getimagedescriptor public i menu creator get menu creator the default drop down menu value is only used to mark this action requested style so do not return it for backward compatibility reasons if value val drop down menu return null if value instanceof i menu creator return i menu creator value return null imenucreator getmenucreator val_drop_down_menu imenucreator imenucreator public int get style infer the style from the value field if value val push btn value null return as push button if value val toggle btn on value val toggle btn off return as check box if value val radio btn on value val radio btn off return as radio button if value instanceof i menu creator return as drop down menu we should never get to this line return as push button getstyle val_push_btn as_push_button val_toggle_btn_on val_toggle_btn_off as_check_box val_radio_btn_on val_radio_btn_off as_radio_button imenucreator as_drop_down_menu as_push_button method declared on i action public string get text return text iaction gettext method declared on i action public string get tool tip text return tool tip text iaction gettooltiptext tooltiptext initializes the internal key code table private static void init key codes key codes new hash map 40 key codes put backspace new integer 8 non nls 1 key codes put tab new integer 9 non nls 1 key codes put return new integer 13 non nls 1 key codes put enter new integer 13 non nls 1 key codes put escape new integer 27 non nls 1 key codes put esc new integer 27 non nls 1 key codes put delete new integer 127 non nls 1 key codes put space new integer non nls 1 key codes put arrow up new integer swt arrow up non nls 1 key codes put arrow down new integer swt arrow down non nls 1 key codes put arrow left new integer swt arrow left non nls 1 key codes put arrow right new integer swt arrow right non nls 1 key codes put page up new integer swt page up non nls 1 key codes put page down new integer swt page down non nls 1 key codes put home new integer swt home non nls 1 key codes put end new integer swt end non nls 1 key codes put insert new integer swt insert non nls 1 key codes put f1 new integer swt f1 non nls 1 key codes put f2 new integer swt f2 non nls 1 key codes put f3 new integer swt f3 non nls 1 key codes put f4 new integer swt f4 non nls 1 key codes put f5 new integer swt f5 non nls 1 key codes put f6 new integer swt f6 non nls 1 key codes put f7 new integer swt f7 non nls 1 key codes put f8 new integer swt f8 non nls 1 key codes put f9 new integer swt f9 non nls 1 key codes put f10 new integer swt f10 non nls 1 key codes put f11 new integer swt f11 non nls 1 key codes put f12 new integer swt f12 non nls 1 initkeycodes keycodes hashmap keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes arrow_up arrow_up keycodes arrow_down arrow_down keycodes arrow_left arrow_left keycodes arrow_right arrow_right keycodes page_up page_up keycodes page_down page_down keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes initializes the localized internal key code table private static void init localized key codes localized key codes new hash map 40 localized key codes put j face resources get string backspace to upper case new integer 8 non nls 1 localized key codes put j face resources get string tab to upper case new integer 9 non nls 1 localized key codes put j face resources get string return to upper case new integer 13 non nls 1 localized key codes put j face resources get string enter to upper case new integer 13 non nls 1 localized key codes put j face resources get string escape to upper case new integer 27 non nls 1 localized key codes put j face resources get string esc to upper case new integer 27 non nls 1 localized key codes put j face resources get string delete to upper case new integer 127 non nls 1 localized key codes put j face resources get string space to upper case new integer non nls 1 localized key codes put j face resources get string arrow up to upper case new integer swt arrow up non nls 1 localized key codes put j face resources get string arrow down to upper case new integer swt arrow down non nls 1 localized key codes put j face resources get string arrow left to upper case new integer swt arrow left non nls 1 localized key codes put j face resources get string arrow right to upper case new integer swt arrow right non nls 1 localized key codes put j face resources get string page up to upper case new integer swt page up non nls 1 localized key codes put j face resources get string page down to upper case new integer swt page down non nls 1 localized key codes put j face resources get string home to upper case new integer swt home non nls 1 localized key codes put j face resources get string end to upper case new integer swt end non nls 1 localized key codes put j face resources get string insert to upper case new integer swt insert non nls 1 localized key codes put j face resources get string f1 to upper case new integer swt f1 non nls 1 localized key codes put j face resources get string f2 to upper case new integer swt f2 non nls 1 localized key codes put j face resources get string f3 to upper case new integer swt f3 non nls 1 localized key codes put j face resources get string f4 to upper case new integer swt f4 non nls 1 localized key codes put j face resources get string f5 to upper case new integer swt f5 non nls 1 localized key codes put j face resources get string f6 to upper case new integer swt f6 non nls 1 localized key codes put j face resources get string f7 to upper case new integer swt f7 non nls 1 localized key codes put j face resources get string f8 to upper case new integer swt f8 non nls 1 localized key codes put j face resources get string f9 to upper case new integer swt f9 non nls 1 localized key codes put j face resources get string f10 to upper case new integer swt f10 non nls 1 localized key codes put j face resources get string f11 to upper case new integer swt f11 non nls 1 localized key codes put j face resources get string f12 to upper case new integer swt f12 non nls 1 initlocalizedkeycodes localizedkeycodes hashmap localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring arrow_up touppercase arrow_up localizedkeycodes jfaceresources getstring arrow_down touppercase arrow_down localizedkeycodes jfaceresources getstring arrow_left touppercase arrow_left localizedkeycodes jfaceresources getstring arrow_right touppercase arrow_right localizedkeycodes jfaceresources getstring page_up touppercase page_up localizedkeycodes jfaceresources getstring page_down touppercase page_down localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase initializes the internal key string table private static void init key strings key strings new hash map 40 key strings put new integer 8 j face resources get string backspace non nls 1 key strings put new integer 9 j face resources get string tab non nls 1 key strings put new integer 13 j face resources get string return non nls 1 key strings put new integer 13 j face resources get string enter non nls 1 key strings put new integer 27 j face resources get string escape non nls 1 key strings put new integer 27 j face resources get string esc non nls 1 key strings put new integer 127 j face resources get string delete non nls 1 key strings put new integer j face resources get string space non nls 1 key strings put new integer swt arrow up j face resources get string arrow up non nls 1 key strings put new integer swt arrow down j face resources get string arrow down non nls 1 key strings put new integer swt arrow left j face resources get string arrow left non nls 1 key strings put new integer swt arrow right j face resources get string arrow right non nls 1 key strings put new integer swt page up j face resources get string page up non nls 1 key strings put new integer swt page down j face resources get string page down non nls 1 key strings put new integer swt home j face resources get string home non nls 1 key strings put new integer swt end j face resources get string end non nls 1 key strings put new integer swt insert j face resources get string insert non nls 1 key strings put new integer swt f1 j face resources get string f1 non nls 1 key strings put new integer swt f2 j face resources get string f2 non nls 1 key strings put new integer swt f3 j face resources get string f3 non nls 1 key strings put new integer swt f4 j face resources get string f4 non nls 1 key strings put new integer swt f5 j face resources get string f5 non nls 1 key strings put new integer swt f6 j face resources get string f6 non nls 1 key strings put new integer swt f7 j face resources get string f7 non nls 1 key strings put new integer swt f8 j face resources get string f8 non nls 1 key strings put new integer swt f9 j face resources get string f9 non nls 1 key strings put new integer swt f10 j face resources get string f10 non nls 1 key strings put new integer swt f11 j face resources get string f11 non nls 1 key strings put new integer swt f12 j face resources get string f12 non nls 1 initkeystrings keystrings hashmap keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings arrow_up jfaceresources getstring arrow_up keystrings arrow_down jfaceresources getstring arrow_down keystrings arrow_left jfaceresources getstring arrow_left keystrings arrow_right jfaceresources getstring arrow_right keystrings page_up jfaceresources getstring page_up keystrings page_down jfaceresources getstring page_down keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring method declared on i action public boolean is checked return value val toggle btn on value val radio btn on iaction ischecked val_toggle_btn_on val_radio_btn_on method declared on i action public boolean is enabled return enabled iaction isenabled method declared on i action public boolean is handled return true iaction ishandled convenience method for removing any optional accelerator text from the given string the accelerator text appears at the end of the text and is separated from the main part by a single tab character code t code param text the text return the text sans accelerator public static string remove accelerator text string text int index text last index of t if index 1 index text last index of if index 0 return text substring 0 index return text removeacceleratortext lastindexof lastindexof convenience method for removing any mnemonics from the given string for example code remove mnemonics open code will return code open code param text the text return the text sans mnemonics since 3 0 public static string remove mnemonics string text int index text index of if index 1 return text int len text length string buffer sb new string buffer len int last index 0 while index 1 ignore at the end if index len 1 break handle the case if text char at index 1 index dbcs languages use x format if index 0 text char at index 1 text length index 3 text char at index 2 sb append text substring last index index 1 index 3 else sb append text substring last index index skip the index last index index index text index of index if last index len sb append text substring last index len return sb to string removemnemonics removemnemonics indexof stringbuffer stringbuffer lastindex charat charat charat lastindex lastindex lastindex indexof lastindex lastindex tostring method declared on i action public void remove property change listener i property change listener listener listeners remove listener iaction removepropertychangelistener ipropertychangelistener the default implementation of this code i action code method does nothing subclasses should override this method if they do not need information from the triggering event or override code run with event event code if they do public void run do nothing iaction runwithevent the default implementation of this code i action code method ignores the event argument and simply calls code run code subclasses should override this method if they need information from the triggering event or override code run code if not param event the swt event which triggered this action being run since 2 0 public void run with event event event run iaction runwithevent method declared on i action public void set action definition id string id action definition id id iaction setactiondefinitionid actiondefinitionid public void set checked boolean checked object new value null for backward compatibility if the style is not set yet then convert it to a toggle button if value null value val toggle btn on value val toggle btn off new value checked val toggle btn on val toggle btn off else if value val radio btn on value val radio btn off new value checked val radio btn on val radio btn off else some other style already so do nothing return if new value value value new value if checked fire property change checked boolean false boolean true else fire property change checked boolean true boolean false setchecked newvalue val_toggle_btn_on val_toggle_btn_off newvalue val_toggle_btn_on val_toggle_btn_off val_radio_btn_on val_radio_btn_off newvalue val_radio_btn_on val_radio_btn_off newvalue newvalue firepropertychange firepropertychange public void set description string text if description null text null description null text null description null text null text equals description string old description description description text fire property change description old description description setdescription olddescription firepropertychange olddescription public void set disabled image descriptor image descriptor new image if disabled image new image image descriptor old image disabled image disabled image new image fire property change image old image new image setdisabledimagedescriptor imagedescriptor newimage disabledimage newimage imagedescriptor oldimage disabledimage disabledimage newimage firepropertychange oldimage newimage public void set enabled boolean enabled if enabled this enabled boolean old val this enabled boolean true boolean false boolean new val enabled boolean true boolean false this enabled enabled fire property change enabled old val new val setenabled oldval newval firepropertychange oldval newval method declared on i action public void set help listener help listener listener help listener listener iaction sethelplistener helplistener helplistener public void set hover image descriptor image descriptor new image if hover image new image image descriptor old image hover image hover image new image fire property change image old image new image sethoverimagedescriptor imagedescriptor newimage hoverimage newimage imagedescriptor oldimage hoverimage hoverimage newimage firepropertychange oldimage newimage method declared on i action public void set id string id this id id iaction setid public void set image descriptor image descriptor new image if image new image image descriptor old image image image new image fire property change image old image new image setimagedescriptor imagedescriptor newimage newimage imagedescriptor oldimage newimage firepropertychange oldimage newimage sets the menu creator for this action p note that if this method is called it overrides the check status p param creator the menu creator or code null code if none public void set menu creator i menu creator creator for backward compatibility if the style is not set yet then convert it to a drop down menu if value null value creator return if value instanceof i menu creator value creator null val drop down menu creator setmenucreator imenucreator imenucreator val_drop_down_menu sets the text for this action p fires a property change event for the code text code property if the text actually changes as a consequence p p the accelerator is identified by the last index of a tab character if there are no tab characters then it is identified by the last index of a character if neither then there is no accelerator text note that if you want to insert a character into the text but no accelerator you can simply insert a or a tab at the end of the text p param text the text or code null code if none public void set text string text string old text this text int old accel this accelerator this text text if text null string accelerator text extract accelerator text text if accelerator text null int new accelerator convert localized accelerator accelerator text be sure to not wipe out the accelerator if nothing found if new accelerator 0 set accelerator new accelerator if this accelerator old accel old text null this text null old text equals this text fire property change text old text this text settext oldtext oldaccel acceleratortext extractacceleratortext acceleratortext newaccelerator convertlocalizedaccelerator acceleratortext newaccelerator setaccelerator newaccelerator oldaccel oldtext oldtext firepropertychange oldtext sets the tool tip text for this action p fires a property change event for the code tool tip text code property if the tool tip text actually changes as a consequence p param tool tip text the tool tip text or code null code if none public void set tool tip text string tool tip text string old tool tip text this tool tip text if old tool tip text null tool tip text null old tool tip text equals tool tip text this tool tip text tool tip text fire property change tool tip text old tool tip text tool tip text tool_tip_text tooltiptext settooltiptext tooltiptext oldtooltiptext tooltiptext oldtooltiptext tooltiptext oldtooltiptext tooltiptext tooltiptext tooltiptext firepropertychange tool_tip_text oldtooltiptext tooltiptext see i action set accelerator int public void set accelerator int keycode this accelerator keycode iaction setaccelerator setaccelerator reports the outcome of the running of this action via the link i action result property param success code true code if the action succeeded and code false code if the action failed or was not completed see i action result since 3 0 public final void notify result boolean success avoid boolean value of boolean to allow compilation against jcl foundation bug 80059 fire property change result null success boolean true boolean false iaction iaction notifyresult valueof firepropertychange private static final i menu creator val drop down menu new i menu creator public void dispose do nothing imenucreator val_drop_down_menu imenucreator public menu get menu control parent do nothing return null getmenu public menu get menu menu parent do nothing return null getmenu creates a new action with no text and no image p configure the action later using the set methods p protected action do nothing creates a new action with the given text and no image calls the zero arg constructor then code set text code param text the string used as the text for the action or code null code if there is no text see set text protected action string text this set text text settext settext settext creates a new action with the given text and image calls the zero arg constructor then code set text code and code set image descriptor code param text the action s text or code null code if there is no text param image the action s image or code null code if there is no image see set text see set image descriptor protected action string text image descriptor image this text set image descriptor image settext setimagedescriptor settext setimagedescriptor imagedescriptor setimagedescriptor creates a new action with the given text and style param text the action s text or code null code if there is no text param style one of code as push button code code as check box code code as drop down menu code code as radio button code and code as unspecified code protected action string text int style this text switch style case as push button value val push btn break case as check box value val toggle btn off break case as drop down menu value val drop down menu break case as radio button value val radio btn off break as_push_button as_check_box as_drop_down_menu as_radio_button as_unspecified as_push_button val_push_btn as_check_box val_toggle_btn_off as_drop_down_menu val_drop_down_menu as_radio_button val_radio_btn_off method declared on i action public void add property change listener i property change listener listener listeners add listener iaction addpropertychangelistener ipropertychangelistener parses the given accelerator text and converts it to an accelerator key code support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml param accelerator text the accelerator text localized to the current locale return the swt key code or 0 if there is no accelerator private static int convert localized accelerator string accelerator text int accelerator 0 string tokenizer stok new string tokenizer accelerator text non nls 1 int key code 1 boolean has more tokens stok has more tokens while has more tokens string token stok next token has more tokens stok has more tokens every token except the last must be one of the modifiers ctrl shift alt or command if has more tokens int modifier find localized modifier token if modifier 0 accelerator modifier else leave if there are none return 0 else key code find localized key code token if key code 1 accelerator key code return accelerator setaccelerator acceleratortext convertlocalizedaccelerator acceleratortext stringtokenizer stringtokenizer acceleratortext keycode hasmoretokens hasmoretokens hasmoretokens nexttoken hasmoretokens hasmoretokens hasmoretokens findlocalizedmodifier keycode findlocalizedkeycode keycode keycode parses the given accelerator text and converts it to an accelerator key code param accelerator text the accelerator text return the swt key code or 0 if there is no accelerator public static int convert accelerator string accelerator text int accelerator 0 string tokenizer stok new string tokenizer accelerator text non nls 1 int key code 1 boolean has more tokens stok has more tokens while has more tokens string token stok next token has more tokens stok has more tokens every token except the last must be one of the modifiers ctrl shift alt or command if has more tokens int modifier find modifier token if modifier 0 accelerator modifier else leave if there are none return 0 else key code find key code token if key code 1 accelerator key code return accelerator acceleratortext convertaccelerator acceleratortext stringtokenizer stringtokenizer acceleratortext keycode hasmoretokens hasmoretokens hasmoretokens nexttoken hasmoretokens hasmoretokens hasmoretokens findmodifier keycode findkeycode keycode keycode converts an accelerator key code to a string representation param key code the key code to be translated return a string representation of the key code public static string convert accelerator int key code string modifier get modifier string key code string full key if modifier equals non nls 1 full key find key string key code else full key modifier find key string key code non nls 1 return full key keycode convertaccelerator keycode getmodifierstring keycode fullkey fullkey findkeystring keycode fullkey findkeystring keycode fullkey private static string get modifier string int key code string mod string non nls 1 if key code swt ctrl 0 mod string find modifier string key code swt ctrl if key code swt alt 0 if mod string equals non nls 1 mod string find modifier string key code swt alt else mod string mod string find modifier string key code swt alt non nls 1 if key code swt shift 0 if mod string equals non nls 1 mod string find modifier string key code swt shift else mod string mod string find modifier string key code swt shift non nls 1 if key code swt command 0 if mod string equals non nls 1 mod string find modifier string key code swt command else mod string mod string find modifier string key code swt command non nls 1 return mod string getmodifierstring keycode modstring keycode modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode modstring extracts the accelerator text from the given text returns code null code if there is no accelerator text and the empty string if there is no text after the accelerator delimeter tab or param text the text for the action return the accelerator text or code null code private static string extract accelerator text string text int index text last index of t if index 1 index text last index of if index 0 return text substring index 1 return null extractacceleratortext lastindexof lastindexof maps a standard keyboard key name to an swt key code key names are converted to upper case before comparison if the key name is a single letter for example s its character code is returned p the following key names are known case is ignored ul li code backspace code li li code tab code li li code return code li li code enter code li li code esc code li li code escape code li li code delete code li li code space code li li code arrow up code code arrow down code code arrow left code and code arrow right code li li code page up code and code page down code li li code home code li li code end code li li code insert code li li code f1 code code f2 code through code f12 code li ul p param token the key name return the swt key code code 1 code if no match was found see swt public static int find key code string token if key codes null init key codes token token to upper case integer i integer key codes get token if i null return i int value if token length 1 return token char at 0 return 1 arrow_up arrow_down arrow_left arrow_right page_up page_down findkeycode keycodes initkeycodes touppercase keycodes intvalue charat find the supplied code for a localized key as find key code but localized to the current locale support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml param token the localized key name return the swt key code code 1 code if no match was found see find key code private static int find localized key code string token if localized key codes null init localized key codes token token to upper case integer i integer localized key codes get token if i null return i int value if token length 1 return token char at 0 return 1 findkeycode setaccelerator findkeycode findlocalizedkeycode localizedkeycodes initlocalizedkeycodes touppercase localizedkeycodes intvalue charat maps an swt key code to a standard keyboard key name the key code is stripped of modifiers swt ctrl swt alt swt shift and swt command if the key code is not an swt code for example if it a key code for the key s a string containing a character representation of the key code is returned param key code the key code to be translated return the string representation of the key code see swt since 2 0 public static string find key string int key code if key strings null init key strings int i key code swt ctrl swt alt swt shift swt command integer integer new integer i string result string key strings get integer if result null return result result new string new char char i return result keycode findkeystring keycode keystrings initkeystrings keycode keystrings maps standard keyboard modifier key names to the corresponding swt modifier bit the following modifier key names are recognized case is ignored code ctrl code code shift code code alt code and code command code the given modifier key name is converted to upper case before comparison param token the modifier key name return the swt modifier bit or code 0 code if no match was found see swt public static int find modifier string token token token to upper case if token equals ctrl non nls 1 return swt ctrl if token equals shift non nls 1 return swt shift if token equals alt non nls 1 return swt alt if token equals command non nls 1 return swt command return 0 findmodifier touppercase maps the localized modifier names to a code in the same manner as find modifier support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml see find modifier private static int find localized modifier string token if localized ctrl null init localized modifiers token token to upper case if token equals localized ctrl non nls 1 return swt ctrl if token equals localized shift non nls 1 return swt shift if token equals localized alt non nls 1 return swt alt if token equals localized command non nls 1 return swt command return 0 findmodifier setaccelerator findmodifier findlocalizedmodifier localized_ctrl initlocalizedmodifiers touppercase localized_ctrl localized_shift localized_alt localized_command initialize the list of localized modifiers private static void init localized modifiers localized ctrl j face resources get string ctrl to upper case non nls 1 localized shift j face resources get string shift to upper case non nls 1 localized alt j face resources get string alt to upper case non nls 1 localized command j face resources get string command to upper case non nls 1 initlocalizedmodifiers localized_ctrl jfaceresources getstring touppercase localized_shift jfaceresources getstring touppercase localized_alt jfaceresources getstring touppercase localized_command jfaceresources getstring touppercase returns a string representation of an swt modifier bit swt ctrl swt alt swt shift and swt command returns code null code if the key code is not an swt modifier bit param key code the swt modifier bit to be translated return the string representation of the swt modifier bit or code null code if the key code was not an swt modifier bit see swt since 2 0 public static string find modifier string int key code if key code swt ctrl return j face resources get string ctrl non nls 1 if key code swt alt return j face resources get string alt non nls 1 if key code swt shift return j face resources get string shift non nls 1 if key code swt command return j face resources get string command non nls 1 return null keycode findmodifierstring keycode keycode jfaceresources getstring keycode jfaceresources getstring keycode jfaceresources getstring keycode jfaceresources getstring notifies any property change listeners that a property has changed only listeners registered at the time this method is called are notified this method avoids creating an event object if there are no listeners registered but calls code fire property change property change event code if there are param property name the name of the property that has changed param old value the old value of the property or code null code if none param new value the new value of the property or code null code if none see i property change listener property change protected void fire property change string property name object old value object new value if listeners is empty fire property change new property change event this property name old value new value firepropertychange propertychangeevent propertyname oldvalue newvalue ipropertychangelistener propertychange firepropertychange propertyname oldvalue newvalue isempty firepropertychange propertychangeevent propertyname oldvalue newvalue notifies any property change listeners that a property has changed only listeners registered at the time this method is called are notified param event the property change event see i property change listener property change protected void fire property change property change event event object list this listeners get listeners for int i 0 i list length i i property change listener list i property change event ipropertychangelistener propertychange firepropertychange propertychangeevent getlisteners ipropertychangelistener propertychange method declared on i action public int get accelerator return accelerator iaction getaccelerator public string get action definition id return action definition id getactiondefinitionid actiondefinitionid public string get description if description null return description return get tool tip text getdescription gettooltiptext method declared on i action public image descriptor get disabled image descriptor return disabled image iaction imagedescriptor getdisabledimagedescriptor disabledimage method declared on i action public help listener get help listener return help listener iaction helplistener gethelplistener helplistener method declared on i action public image descriptor get hover image descriptor return hover image iaction imagedescriptor gethoverimagedescriptor hoverimage method declared on i action public string get id return id iaction getid method declared on i action public image descriptor get image descriptor return image iaction imagedescriptor getimagedescriptor public i menu creator get menu creator the default drop down menu value is only used to mark this action requested style so do not return it for backward compatibility reasons if value val drop down menu return null if value instanceof i menu creator return i menu creator value return null imenucreator getmenucreator val_drop_down_menu imenucreator imenucreator public int get style infer the style from the value field if value val push btn value null return as push button if value val toggle btn on value val toggle btn off return as check box if value val radio btn on value val radio btn off return as radio button if value instanceof i menu creator return as drop down menu we should never get to this line return as push button getstyle val_push_btn as_push_button val_toggle_btn_on val_toggle_btn_off as_check_box val_radio_btn_on val_radio_btn_off as_radio_button imenucreator as_drop_down_menu as_push_button method declared on i action public string get text return text iaction gettext method declared on i action public string get tool tip text return tool tip text iaction gettooltiptext tooltiptext initializes the internal key code table private static void init key codes key codes new hash map 40 key codes put backspace new integer 8 non nls 1 key codes put tab new integer 9 non nls 1 key codes put return new integer 13 non nls 1 key codes put enter new integer 13 non nls 1 key codes put escape new integer 27 non nls 1 key codes put esc new integer 27 non nls 1 key codes put delete new integer 127 non nls 1 key codes put space new integer non nls 1 key codes put arrow up new integer swt arrow up non nls 1 key codes put arrow down new integer swt arrow down non nls 1 key codes put arrow left new integer swt arrow left non nls 1 key codes put arrow right new integer swt arrow right non nls 1 key codes put page up new integer swt page up non nls 1 key codes put page down new integer swt page down non nls 1 key codes put home new integer swt home non nls 1 key codes put end new integer swt end non nls 1 key codes put insert new integer swt insert non nls 1 key codes put f1 new integer swt f1 non nls 1 key codes put f2 new integer swt f2 non nls 1 key codes put f3 new integer swt f3 non nls 1 key codes put f4 new integer swt f4 non nls 1 key codes put f5 new integer swt f5 non nls 1 key codes put f6 new integer swt f6 non nls 1 key codes put f7 new integer swt f7 non nls 1 key codes put f8 new integer swt f8 non nls 1 key codes put f9 new integer swt f9 non nls 1 key codes put f10 new integer swt f10 non nls 1 key codes put f11 new integer swt f11 non nls 1 key codes put f12 new integer swt f12 non nls 1 initkeycodes keycodes hashmap keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes arrow_up arrow_up keycodes arrow_down arrow_down keycodes arrow_left arrow_left keycodes arrow_right arrow_right keycodes page_up page_up keycodes page_down page_down keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes initializes the localized internal key code table private static void init localized key codes localized key codes new hash map 40 localized key codes put j face resources get string backspace to upper case new integer 8 non nls 1 localized key codes put j face resources get string tab to upper case new integer 9 non nls 1 localized key codes put j face resources get string return to upper case new integer 13 non nls 1 localized key codes put j face resources get string enter to upper case new integer 13 non nls 1 localized key codes put j face resources get string escape to upper case new integer 27 non nls 1 localized key codes put j face resources get string esc to upper case new integer 27 non nls 1 localized key codes put j face resources get string delete to upper case new integer 127 non nls 1 localized key codes put j face resources get string space to upper case new integer non nls 1 localized key codes put j face resources get string arrow up to upper case new integer swt arrow up non nls 1 localized key codes put j face resources get string arrow down to upper case new integer swt arrow down non nls 1 localized key codes put j face resources get string arrow left to upper case new integer swt arrow left non nls 1 localized key codes put j face resources get string arrow right to upper case new integer swt arrow right non nls 1 localized key codes put j face resources get string page up to upper case new integer swt page up non nls 1 localized key codes put j face resources get string page down to upper case new integer swt page down non nls 1 localized key codes put j face resources get string home to upper case new integer swt home non nls 1 localized key codes put j face resources get string end to upper case new integer swt end non nls 1 localized key codes put j face resources get string insert to upper case new integer swt insert non nls 1 localized key codes put j face resources get string f1 to upper case new integer swt f1 non nls 1 localized key codes put j face resources get string f2 to upper case new integer swt f2 non nls 1 localized key codes put j face resources get string f3 to upper case new integer swt f3 non nls 1 localized key codes put j face resources get string f4 to upper case new integer swt f4 non nls 1 localized key codes put j face resources get string f5 to upper case new integer swt f5 non nls 1 localized key codes put j face resources get string f6 to upper case new integer swt f6 non nls 1 localized key codes put j face resources get string f7 to upper case new integer swt f7 non nls 1 localized key codes put j face resources get string f8 to upper case new integer swt f8 non nls 1 localized key codes put j face resources get string f9 to upper case new integer swt f9 non nls 1 localized key codes put j face resources get string f10 to upper case new integer swt f10 non nls 1 localized key codes put j face resources get string f11 to upper case new integer swt f11 non nls 1 localized key codes put j face resources get string f12 to upper case new integer swt f12 non nls 1 initlocalizedkeycodes localizedkeycodes hashmap localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring arrow_up touppercase arrow_up localizedkeycodes jfaceresources getstring arrow_down touppercase arrow_down localizedkeycodes jfaceresources getstring arrow_left touppercase arrow_left localizedkeycodes jfaceresources getstring arrow_right touppercase arrow_right localizedkeycodes jfaceresources getstring page_up touppercase page_up localizedkeycodes jfaceresources getstring page_down touppercase page_down localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase initializes the internal key string table private static void init key strings key strings new hash map 40 key strings put new integer 8 j face resources get string backspace non nls 1 key strings put new integer 9 j face resources get string tab non nls 1 key strings put new integer 13 j face resources get string return non nls 1 key strings put new integer 13 j face resources get string enter non nls 1 key strings put new integer 27 j face resources get string escape non nls 1 key strings put new integer 27 j face resources get string esc non nls 1 key strings put new integer 127 j face resources get string delete non nls 1 key strings put new integer j face resources get string space non nls 1 key strings put new integer swt arrow up j face resources get string arrow up non nls 1 key strings put new integer swt arrow down j face resources get string arrow down non nls 1 key strings put new integer swt arrow left j face resources get string arrow left non nls 1 key strings put new integer swt arrow right j face resources get string arrow right non nls 1 key strings put new integer swt page up j face resources get string page up non nls 1 key strings put new integer swt page down j face resources get string page down non nls 1 key strings put new integer swt home j face resources get string home non nls 1 key strings put new integer swt end j face resources get string end non nls 1 key strings put new integer swt insert j face resources get string insert non nls 1 key strings put new integer swt f1 j face resources get string f1 non nls 1 key strings put new integer swt f2 j face resources get string f2 non nls 1 key strings put new integer swt f3 j face resources get string f3 non nls 1 key strings put new integer swt f4 j face resources get string f4 non nls 1 key strings put new integer swt f5 j face resources get string f5 non nls 1 key strings put new integer swt f6 j face resources get string f6 non nls 1 key strings put new integer swt f7 j face resources get string f7 non nls 1 key strings put new integer swt f8 j face resources get string f8 non nls 1 key strings put new integer swt f9 j face resources get string f9 non nls 1 key strings put new integer swt f10 j face resources get string f10 non nls 1 key strings put new integer swt f11 j face resources get string f11 non nls 1 key strings put new integer swt f12 j face resources get string f12 non nls 1 initkeystrings keystrings hashmap keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings arrow_up jfaceresources getstring arrow_up keystrings arrow_down jfaceresources getstring arrow_down keystrings arrow_left jfaceresources getstring arrow_left keystrings arrow_right jfaceresources getstring arrow_right keystrings page_up jfaceresources getstring page_up keystrings page_down jfaceresources getstring page_down keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring method declared on i action public boolean is checked return value val toggle btn on value val radio btn on iaction ischecked val_toggle_btn_on val_radio_btn_on method declared on i action public boolean is enabled return enabled iaction isenabled method declared on i action public boolean is handled return true iaction ishandled convenience method for removing any optional accelerator text from the given string the accelerator text appears at the end of the text and is separated from the main part by a single tab character code t code param text the text return the text sans accelerator public static string remove accelerator text string text int index text last index of t if index 1 index text last index of if index 0 return text substring 0 index return text removeacceleratortext lastindexof lastindexof convenience method for removing any mnemonics from the given string for example code remove mnemonics open code will return code open code param text the text return the text sans mnemonics since 3 0 public static string remove mnemonics string text int index text index of if index 1 return text int len text length string buffer sb new string buffer len int last index 0 while index 1 ignore at the end if index len 1 break handle the case if text char at index 1 index dbcs languages use x format if index 0 text char at index 1 text length index 3 text char at index 2 sb append text substring last index index 1 index 3 else sb append text substring last index index skip the index last index index index text index of index if last index len sb append text substring last index len return sb to string removemnemonics removemnemonics indexof stringbuffer stringbuffer lastindex charat charat charat lastindex lastindex lastindex indexof lastindex lastindex tostring method declared on i action public void remove property change listener i property change listener listener listeners remove listener iaction removepropertychangelistener ipropertychangelistener the default implementation of this code i action code method does nothing subclasses should override this method if they do not need information from the triggering event or override code run with event event code if they do public void run do nothing iaction runwithevent the default implementation of this code i action code method ignores the event argument and simply calls code run code subclasses should override this method if they need information from the triggering event or override code run code if not param event the swt event which triggered this action being run since 2 0 public void run with event event event run iaction runwithevent method declared on i action public void set action definition id string id action definition id id iaction setactiondefinitionid actiondefinitionid public void set checked boolean checked object new value null for backward compatibility if the style is not set yet then convert it to a toggle button if value null value val toggle btn on value val toggle btn off new value checked val toggle btn on val toggle btn off else if value val radio btn on value val radio btn off new value checked val radio btn on val radio btn off else some other style already so do nothing return if new value value value new value if checked fire property change checked boolean false boolean true else fire property change checked boolean true boolean false setchecked newvalue val_toggle_btn_on val_toggle_btn_off newvalue val_toggle_btn_on val_toggle_btn_off val_radio_btn_on val_radio_btn_off newvalue val_radio_btn_on val_radio_btn_off newvalue newvalue firepropertychange firepropertychange public void set description string text if description null text null description null text null description null text null text equals description string old description description description text fire property change description old description description setdescription olddescription firepropertychange olddescription public void set disabled image descriptor image descriptor new image if disabled image new image image descriptor old image disabled image disabled image new image fire property change image old image new image setdisabledimagedescriptor imagedescriptor newimage disabledimage newimage imagedescriptor oldimage disabledimage disabledimage newimage firepropertychange oldimage newimage public void set enabled boolean enabled if enabled this enabled boolean old val this enabled boolean true boolean false boolean new val enabled boolean true boolean false this enabled enabled fire property change enabled old val new val setenabled oldval newval firepropertychange oldval newval method declared on i action public void set help listener help listener listener help listener listener iaction sethelplistener helplistener helplistener public void set hover image descriptor image descriptor new image if hover image new image image descriptor old image hover image hover image new image fire property change image old image new image sethoverimagedescriptor imagedescriptor newimage hoverimage newimage imagedescriptor oldimage hoverimage hoverimage newimage firepropertychange oldimage newimage method declared on i action public void set id string id this id id iaction setid public void set image descriptor image descriptor new image if image new image image descriptor old image image image new image fire property change image old image new image setimagedescriptor imagedescriptor newimage newimage imagedescriptor oldimage newimage firepropertychange oldimage newimage sets the menu creator for this action p note that if this method is called it overrides the check status p param creator the menu creator or code null code if none public void set menu creator i menu creator creator for backward compatibility if the style is not set yet then convert it to a drop down menu if value null value creator return if value instanceof i menu creator value creator null val drop down menu creator setmenucreator imenucreator imenucreator val_drop_down_menu sets the text for this action p fires a property change event for the code text code property if the text actually changes as a consequence p p the accelerator is identified by the last index of a tab character if there are no tab characters then it is identified by the last index of a character if neither then there is no accelerator text note that if you want to insert a character into the text but no accelerator you can simply insert a or a tab at the end of the text p param text the text or code null code if none public void set text string text string old text this text int old accel this accelerator this text text if text null string accelerator text extract accelerator text text if accelerator text null int new accelerator convert localized accelerator accelerator text be sure to not wipe out the accelerator if nothing found if new accelerator 0 set accelerator new accelerator if this accelerator old accel old text null this text null old text equals this text fire property change text old text this text settext oldtext oldaccel acceleratortext extractacceleratortext acceleratortext newaccelerator convertlocalizedaccelerator acceleratortext newaccelerator setaccelerator newaccelerator oldaccel oldtext oldtext firepropertychange oldtext sets the tool tip text for this action p fires a property change event for the code tool tip text code property if the tool tip text actually changes as a consequence p param tool tip text the tool tip text or code null code if none public void set tool tip text string tool tip text string old tool tip text this tool tip text if old tool tip text null tool tip text null old tool tip text equals tool tip text this tool tip text tool tip text fire property change tool tip text old tool tip text tool tip text tool_tip_text tooltiptext settooltiptext tooltiptext oldtooltiptext tooltiptext oldtooltiptext tooltiptext oldtooltiptext tooltiptext tooltiptext tooltiptext firepropertychange tool_tip_text oldtooltiptext tooltiptext see i action set accelerator int public void set accelerator int keycode this accelerator keycode iaction setaccelerator setaccelerator reports the outcome of the running of this action via the link i action result property param success code true code if the action succeeded and code false code if the action failed or was not completed see i action result since 3 0 public final void notify result boolean success avoid boolean value of boolean to allow compilation against jcl foundation bug 80059 fire property change result null success boolean true boolean false iaction iaction notifyresult valueof firepropertychange private static final i menu creator val drop down menu new i menu creator public void dispose do nothing imenucreator val_drop_down_menu imenucreator public menu get menu control parent do nothing return null getmenu public menu get menu menu parent do nothing return null getmenu creates a new action with no text and no image p configure the action later using the set methods p protected action do nothing creates a new action with the given text and no image calls the zero arg constructor then code set text code param text the string used as the text for the action or code null code if there is no text see set text protected action string text this set text text settext settext settext creates a new action with the given text and image calls the zero arg constructor then code set text code and code set image descriptor code param text the action s text or code null code if there is no text param image the action s image or code null code if there is no image see set text see set image descriptor protected action string text image descriptor image this text set image descriptor image settext setimagedescriptor settext setimagedescriptor imagedescriptor setimagedescriptor creates a new action with the given text and style param text the action s text or code null code if there is no text param style one of code as push button code code as check box code code as drop down menu code code as radio button code and code as unspecified code protected action string text int style this text switch style case as push button value val push btn break case as check box value val toggle btn off break case as drop down menu value val drop down menu break case as radio button value val radio btn off break as_push_button as_check_box as_drop_down_menu as_radio_button as_unspecified as_push_button val_push_btn as_check_box val_toggle_btn_off as_drop_down_menu val_drop_down_menu as_radio_button val_radio_btn_off method declared on i action public void add property change listener i property change listener listener listeners add listener iaction addpropertychangelistener ipropertychangelistener parses the given accelerator text and converts it to an accelerator key code support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml param accelerator text the accelerator text localized to the current locale return the swt key code or 0 if there is no accelerator private static int convert localized accelerator string accelerator text int accelerator 0 string tokenizer stok new string tokenizer accelerator text non nls 1 int key code 1 boolean has more tokens stok has more tokens while has more tokens string token stok next token has more tokens stok has more tokens every token except the last must be one of the modifiers ctrl shift alt or command if has more tokens int modifier find localized modifier token if modifier 0 accelerator modifier else leave if there are none return 0 else key code find localized key code token if key code 1 accelerator key code return accelerator setaccelerator acceleratortext convertlocalizedaccelerator acceleratortext stringtokenizer stringtokenizer acceleratortext keycode hasmoretokens hasmoretokens hasmoretokens nexttoken hasmoretokens hasmoretokens hasmoretokens findlocalizedmodifier keycode findlocalizedkeycode keycode keycode parses the given accelerator text and converts it to an accelerator key code param accelerator text the accelerator text return the swt key code or 0 if there is no accelerator public static int convert accelerator string accelerator text int accelerator 0 string tokenizer stok new string tokenizer accelerator text non nls 1 int key code 1 boolean has more tokens stok has more tokens while has more tokens string token stok next token has more tokens stok has more tokens every token except the last must be one of the modifiers ctrl shift alt or command if has more tokens int modifier find modifier token if modifier 0 accelerator modifier else leave if there are none return 0 else key code find key code token if key code 1 accelerator key code return accelerator acceleratortext convertaccelerator acceleratortext stringtokenizer stringtokenizer acceleratortext keycode hasmoretokens hasmoretokens hasmoretokens nexttoken hasmoretokens hasmoretokens hasmoretokens findmodifier keycode findkeycode keycode keycode converts an accelerator key code to a string representation param key code the key code to be translated return a string representation of the key code public static string convert accelerator int key code string modifier get modifier string key code string full key if modifier equals non nls 1 full key find key string key code else full key modifier find key string key code non nls 1 return full key keycode convertaccelerator keycode getmodifierstring keycode fullkey fullkey findkeystring keycode fullkey findkeystring keycode fullkey private static string get modifier string int key code string mod string non nls 1 if key code swt ctrl 0 mod string find modifier string key code swt ctrl if key code swt alt 0 if mod string equals non nls 1 mod string find modifier string key code swt alt else mod string mod string find modifier string key code swt alt non nls 1 if key code swt shift 0 if mod string equals non nls 1 mod string find modifier string key code swt shift else mod string mod string find modifier string key code swt shift non nls 1 if key code swt command 0 if mod string equals non nls 1 mod string find modifier string key code swt command else mod string mod string find modifier string key code swt command non nls 1 return mod string getmodifierstring keycode modstring keycode modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode modstring extracts the accelerator text from the given text returns code null code if there is no accelerator text and the empty string if there is no text after the accelerator delimeter tab or param text the text for the action return the accelerator text or code null code private static string extract accelerator text string text int index text last index of t if index 1 index text last index of if index 0 return text substring index 1 return null extractacceleratortext lastindexof lastindexof maps a standard keyboard key name to an swt key code key names are converted to upper case before comparison if the key name is a single letter for example s its character code is returned p the following key names are known case is ignored ul li code backspace code li li code tab code li li code return code li li code enter code li li code esc code li li code escape code li li code delete code li li code space code li li code arrow up code code arrow down code code arrow left code and code arrow right code li li code page up code and code page down code li li code home code li li code end code li li code insert code li li code f1 code code f2 code through code f12 code li ul p param token the key name return the swt key code code 1 code if no match was found see swt public static int find key code string token if key codes null init key codes token token to upper case integer i integer key codes get token if i null return i int value if token length 1 return token char at 0 return 1 arrow_up arrow_down arrow_left arrow_right page_up page_down findkeycode keycodes initkeycodes touppercase keycodes intvalue charat find the supplied code for a localized key as find key code but localized to the current locale support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml param token the localized key name return the swt key code code 1 code if no match was found see find key code private static int find localized key code string token if localized key codes null init localized key codes token token to upper case integer i integer localized key codes get token if i null return i int value if token length 1 return token char at 0 return 1 findkeycode setaccelerator findkeycode findlocalizedkeycode localizedkeycodes initlocalizedkeycodes touppercase localizedkeycodes intvalue charat maps an swt key code to a standard keyboard key name the key code is stripped of modifiers swt ctrl swt alt swt shift and swt command if the key code is not an swt code for example if it a key code for the key s a string containing a character representation of the key code is returned param key code the key code to be translated return the string representation of the key code see swt since 2 0 public static string find key string int key code if key strings null init key strings int i key code swt ctrl swt alt swt shift swt command integer integer new integer i string result string key strings get integer if result null return result result new string new char char i return result keycode findkeystring keycode keystrings initkeystrings keycode keystrings maps standard keyboard modifier key names to the corresponding swt modifier bit the following modifier key names are recognized case is ignored code ctrl code code shift code code alt code and code command code the given modifier key name is converted to upper case before comparison param token the modifier key name return the swt modifier bit or code 0 code if no match was found see swt public static int find modifier string token token token to upper case if token equals ctrl non nls 1 return swt ctrl if token equals shift non nls 1 return swt shift if token equals alt non nls 1 return swt alt if token equals command non nls 1 return swt command return 0 findmodifier touppercase maps the localized modifier names to a code in the same manner as find modifier support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml see find modifier private static int find localized modifier string token if localized ctrl null init localized modifiers token token to upper case if token equals localized ctrl non nls 1 return swt ctrl if token equals localized shift non nls 1 return swt shift if token equals localized alt non nls 1 return swt alt if token equals localized command non nls 1 return swt command return 0 findmodifier setaccelerator findmodifier findlocalizedmodifier localized_ctrl initlocalizedmodifiers touppercase localized_ctrl localized_shift localized_alt localized_command initialize the list of localized modifiers private static void init localized modifiers localized ctrl j face resources get string ctrl to upper case non nls 1 localized shift j face resources get string shift to upper case non nls 1 localized alt j face resources get string alt to upper case non nls 1 localized command j face resources get string command to upper case non nls 1 initlocalizedmodifiers localized_ctrl jfaceresources getstring touppercase localized_shift jfaceresources getstring touppercase localized_alt jfaceresources getstring touppercase localized_command jfaceresources getstring touppercase returns a string representation of an swt modifier bit swt ctrl swt alt swt shift and swt command returns code null code if the key code is not an swt modifier bit param key code the swt modifier bit to be translated return the string representation of the swt modifier bit or code null code if the key code was not an swt modifier bit see swt since 2 0 public static string find modifier string int key code if key code swt ctrl return j face resources get string ctrl non nls 1 if key code swt alt return j face resources get string alt non nls 1 if key code swt shift return j face resources get string shift non nls 1 if key code swt command return j face resources get string command non nls 1 return null keycode findmodifierstring keycode keycode jfaceresources getstring keycode jfaceresources getstring keycode jfaceresources getstring keycode jfaceresources getstring notifies any property change listeners that a property has changed only listeners registered at the time this method is called are notified this method avoids creating an event object if there are no listeners registered but calls code fire property change property change event code if there are param property name the name of the property that has changed param old value the old value of the property or code null code if none param new value the new value of the property or code null code if none see i property change listener property change protected void fire property change string property name object old value object new value if listeners is empty fire property change new property change event this property name old value new value firepropertychange propertychangeevent propertyname oldvalue newvalue ipropertychangelistener propertychange firepropertychange propertyname oldvalue newvalue isempty firepropertychange propertychangeevent propertyname oldvalue newvalue notifies any property change listeners that a property has changed only listeners registered at the time this method is called are notified param event the property change event see i property change listener property change protected void fire property change property change event event object list this listeners get listeners for int i 0 i list length i i property change listener list i property change event ipropertychangelistener propertychange firepropertychange propertychangeevent getlisteners ipropertychangelistener propertychange method declared on i action public int get accelerator return accelerator iaction getaccelerator public string get action definition id return action definition id getactiondefinitionid actiondefinitionid public string get description if description null return description return get tool tip text getdescription gettooltiptext method declared on i action public image descriptor get disabled image descriptor return disabled image iaction imagedescriptor getdisabledimagedescriptor disabledimage method declared on i action public help listener get help listener return help listener iaction helplistener gethelplistener helplistener method declared on i action public image descriptor get hover image descriptor return hover image iaction imagedescriptor gethoverimagedescriptor hoverimage method declared on i action public string get id return id iaction getid method declared on i action public image descriptor get image descriptor return image iaction imagedescriptor getimagedescriptor public i menu creator get menu creator the default drop down menu value is only used to mark this action requested style so do not return it for backward compatibility reasons if value val drop down menu return null if value instanceof i menu creator return i menu creator value return null imenucreator getmenucreator val_drop_down_menu imenucreator imenucreator public int get style infer the style from the value field if value val push btn value null return as push button if value val toggle btn on value val toggle btn off return as check box if value val radio btn on value val radio btn off return as radio button if value instanceof i menu creator return as drop down menu we should never get to this line return as push button getstyle val_push_btn as_push_button val_toggle_btn_on val_toggle_btn_off as_check_box val_radio_btn_on val_radio_btn_off as_radio_button imenucreator as_drop_down_menu as_push_button method declared on i action public string get text return text iaction gettext method declared on i action public string get tool tip text return tool tip text iaction gettooltiptext tooltiptext initializes the internal key code table private static void init key codes key codes new hash map 40 key codes put backspace new integer 8 non nls 1 key codes put tab new integer 9 non nls 1 key codes put return new integer 13 non nls 1 key codes put enter new integer 13 non nls 1 key codes put escape new integer 27 non nls 1 key codes put esc new integer 27 non nls 1 key codes put delete new integer 127 non nls 1 key codes put space new integer non nls 1 key codes put arrow up new integer swt arrow up non nls 1 key codes put arrow down new integer swt arrow down non nls 1 key codes put arrow left new integer swt arrow left non nls 1 key codes put arrow right new integer swt arrow right non nls 1 key codes put page up new integer swt page up non nls 1 key codes put page down new integer swt page down non nls 1 key codes put home new integer swt home non nls 1 key codes put end new integer swt end non nls 1 key codes put insert new integer swt insert non nls 1 key codes put f1 new integer swt f1 non nls 1 key codes put f2 new integer swt f2 non nls 1 key codes put f3 new integer swt f3 non nls 1 key codes put f4 new integer swt f4 non nls 1 key codes put f5 new integer swt f5 non nls 1 key codes put f6 new integer swt f6 non nls 1 key codes put f7 new integer swt f7 non nls 1 key codes put f8 new integer swt f8 non nls 1 key codes put f9 new integer swt f9 non nls 1 key codes put f10 new integer swt f10 non nls 1 key codes put f11 new integer swt f11 non nls 1 key codes put f12 new integer swt f12 non nls 1 initkeycodes keycodes hashmap keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes arrow_up arrow_up keycodes arrow_down arrow_down keycodes arrow_left arrow_left keycodes arrow_right arrow_right keycodes page_up page_up keycodes page_down page_down keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes initializes the localized internal key code table private static void init localized key codes localized key codes new hash map 40 localized key codes put j face resources get string backspace to upper case new integer 8 non nls 1 localized key codes put j face resources get string tab to upper case new integer 9 non nls 1 localized key codes put j face resources get string return to upper case new integer 13 non nls 1 localized key codes put j face resources get string enter to upper case new integer 13 non nls 1 localized key codes put j face resources get string escape to upper case new integer 27 non nls 1 localized key codes put j face resources get string esc to upper case new integer 27 non nls 1 localized key codes put j face resources get string delete to upper case new integer 127 non nls 1 localized key codes put j face resources get string space to upper case new integer non nls 1 localized key codes put j face resources get string arrow up to upper case new integer swt arrow up non nls 1 localized key codes put j face resources get string arrow down to upper case new integer swt arrow down non nls 1 localized key codes put j face resources get string arrow left to upper case new integer swt arrow left non nls 1 localized key codes put j face resources get string arrow right to upper case new integer swt arrow right non nls 1 localized key codes put j face resources get string page up to upper case new integer swt page up non nls 1 localized key codes put j face resources get string page down to upper case new integer swt page down non nls 1 localized key codes put j face resources get string home to upper case new integer swt home non nls 1 localized key codes put j face resources get string end to upper case new integer swt end non nls 1 localized key codes put j face resources get string insert to upper case new integer swt insert non nls 1 localized key codes put j face resources get string f1 to upper case new integer swt f1 non nls 1 localized key codes put j face resources get string f2 to upper case new integer swt f2 non nls 1 localized key codes put j face resources get string f3 to upper case new integer swt f3 non nls 1 localized key codes put j face resources get string f4 to upper case new integer swt f4 non nls 1 localized key codes put j face resources get string f5 to upper case new integer swt f5 non nls 1 localized key codes put j face resources get string f6 to upper case new integer swt f6 non nls 1 localized key codes put j face resources get string f7 to upper case new integer swt f7 non nls 1 localized key codes put j face resources get string f8 to upper case new integer swt f8 non nls 1 localized key codes put j face resources get string f9 to upper case new integer swt f9 non nls 1 localized key codes put j face resources get string f10 to upper case new integer swt f10 non nls 1 localized key codes put j face resources get string f11 to upper case new integer swt f11 non nls 1 localized key codes put j face resources get string f12 to upper case new integer swt f12 non nls 1 initlocalizedkeycodes localizedkeycodes hashmap localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring arrow_up touppercase arrow_up localizedkeycodes jfaceresources getstring arrow_down touppercase arrow_down localizedkeycodes jfaceresources getstring arrow_left touppercase arrow_left localizedkeycodes jfaceresources getstring arrow_right touppercase arrow_right localizedkeycodes jfaceresources getstring page_up touppercase page_up localizedkeycodes jfaceresources getstring page_down touppercase page_down localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase initializes the internal key string table private static void init key strings key strings new hash map 40 key strings put new integer 8 j face resources get string backspace non nls 1 key strings put new integer 9 j face resources get string tab non nls 1 key strings put new integer 13 j face resources get string return non nls 1 key strings put new integer 13 j face resources get string enter non nls 1 key strings put new integer 27 j face resources get string escape non nls 1 key strings put new integer 27 j face resources get string esc non nls 1 key strings put new integer 127 j face resources get string delete non nls 1 key strings put new integer j face resources get string space non nls 1 key strings put new integer swt arrow up j face resources get string arrow up non nls 1 key strings put new integer swt arrow down j face resources get string arrow down non nls 1 key strings put new integer swt arrow left j face resources get string arrow left non nls 1 key strings put new integer swt arrow right j face resources get string arrow right non nls 1 key strings put new integer swt page up j face resources get string page up non nls 1 key strings put new integer swt page down j face resources get string page down non nls 1 key strings put new integer swt home j face resources get string home non nls 1 key strings put new integer swt end j face resources get string end non nls 1 key strings put new integer swt insert j face resources get string insert non nls 1 key strings put new integer swt f1 j face resources get string f1 non nls 1 key strings put new integer swt f2 j face resources get string f2 non nls 1 key strings put new integer swt f3 j face resources get string f3 non nls 1 key strings put new integer swt f4 j face resources get string f4 non nls 1 key strings put new integer swt f5 j face resources get string f5 non nls 1 key strings put new integer swt f6 j face resources get string f6 non nls 1 key strings put new integer swt f7 j face resources get string f7 non nls 1 key strings put new integer swt f8 j face resources get string f8 non nls 1 key strings put new integer swt f9 j face resources get string f9 non nls 1 key strings put new integer swt f10 j face resources get string f10 non nls 1 key strings put new integer swt f11 j face resources get string f11 non nls 1 key strings put new integer swt f12 j face resources get string f12 non nls 1 initkeystrings keystrings hashmap keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings arrow_up jfaceresources getstring arrow_up keystrings arrow_down jfaceresources getstring arrow_down keystrings arrow_left jfaceresources getstring arrow_left keystrings arrow_right jfaceresources getstring arrow_right keystrings page_up jfaceresources getstring page_up keystrings page_down jfaceresources getstring page_down keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring method declared on i action public boolean is checked return value val toggle btn on value val radio btn on iaction ischecked val_toggle_btn_on val_radio_btn_on method declared on i action public boolean is enabled return enabled iaction isenabled method declared on i action public boolean is handled return true iaction ishandled convenience method for removing any optional accelerator text from the given string the accelerator text appears at the end of the text and is separated from the main part by a single tab character code t code param text the text return the text sans accelerator public static string remove accelerator text string text int index text last index of t if index 1 index text last index of if index 0 return text substring 0 index return text removeacceleratortext lastindexof lastindexof convenience method for removing any mnemonics from the given string for example code remove mnemonics open code will return code open code param text the text return the text sans mnemonics since 3 0 public static string remove mnemonics string text int index text index of if index 1 return text int len text length string buffer sb new string buffer len int last index 0 while index 1 ignore at the end if index len 1 break handle the case if text char at index 1 index dbcs languages use x format if index 0 text char at index 1 text length index 3 text char at index 2 sb append text substring last index index 1 index 3 else sb append text substring last index index skip the index last index index index text index of index if last index len sb append text substring last index len return sb to string removemnemonics removemnemonics indexof stringbuffer stringbuffer lastindex charat charat charat lastindex lastindex lastindex indexof lastindex lastindex tostring method declared on i action public void remove property change listener i property change listener listener listeners remove listener iaction removepropertychangelistener ipropertychangelistener the default implementation of this code i action code method does nothing subclasses should override this method if they do not need information from the triggering event or override code run with event event code if they do public void run do nothing iaction runwithevent the default implementation of this code i action code method ignores the event argument and simply calls code run code subclasses should override this method if they need information from the triggering event or override code run code if not param event the swt event which triggered this action being run since 2 0 public void run with event event event run iaction runwithevent method declared on i action public void set action definition id string id action definition id id iaction setactiondefinitionid actiondefinitionid public void set checked boolean checked object new value null for backward compatibility if the style is not set yet then convert it to a toggle button if value null value val toggle btn on value val toggle btn off new value checked val toggle btn on val toggle btn off else if value val radio btn on value val radio btn off new value checked val radio btn on val radio btn off else some other style already so do nothing return if new value value value new value if checked fire property change checked boolean false boolean true else fire property change checked boolean true boolean false setchecked newvalue val_toggle_btn_on val_toggle_btn_off newvalue val_toggle_btn_on val_toggle_btn_off val_radio_btn_on val_radio_btn_off newvalue val_radio_btn_on val_radio_btn_off newvalue newvalue firepropertychange firepropertychange public void set description string text if description null text null description null text null description null text null text equals description string old description description description text fire property change description old description description setdescription olddescription firepropertychange olddescription public void set disabled image descriptor image descriptor new image if disabled image new image image descriptor old image disabled image disabled image new image fire property change image old image new image setdisabledimagedescriptor imagedescriptor newimage disabledimage newimage imagedescriptor oldimage disabledimage disabledimage newimage firepropertychange oldimage newimage public void set enabled boolean enabled if enabled this enabled boolean old val this enabled boolean true boolean false boolean new val enabled boolean true boolean false this enabled enabled fire property change enabled old val new val setenabled oldval newval firepropertychange oldval newval method declared on i action public void set help listener help listener listener help listener listener iaction sethelplistener helplistener helplistener public void set hover image descriptor image descriptor new image if hover image new image image descriptor old image hover image hover image new image fire property change image old image new image sethoverimagedescriptor imagedescriptor newimage hoverimage newimage imagedescriptor oldimage hoverimage hoverimage newimage firepropertychange oldimage newimage method declared on i action public void set id string id this id id iaction setid public void set image descriptor image descriptor new image if image new image image descriptor old image image image new image fire property change image old image new image setimagedescriptor imagedescriptor newimage newimage imagedescriptor oldimage newimage firepropertychange oldimage newimage sets the menu creator for this action p note that if this method is called it overrides the check status p param creator the menu creator or code null code if none public void set menu creator i menu creator creator for backward compatibility if the style is not set yet then convert it to a drop down menu if value null value creator return if value instanceof i menu creator value creator null val drop down menu creator setmenucreator imenucreator imenucreator val_drop_down_menu sets the text for this action p fires a property change event for the code text code property if the text actually changes as a consequence p p the accelerator is identified by the last index of a tab character if there are no tab characters then it is identified by the last index of a character if neither then there is no accelerator text note that if you want to insert a character into the text but no accelerator you can simply insert a or a tab at the end of the text p param text the text or code null code if none public void set text string text string old text this text int old accel this accelerator this text text if text null string accelerator text extract accelerator text text if accelerator text null int new accelerator convert localized accelerator accelerator text be sure to not wipe out the accelerator if nothing found if new accelerator 0 set accelerator new accelerator if this accelerator old accel old text null this text null old text equals this text fire property change text old text this text settext oldtext oldaccel acceleratortext extractacceleratortext acceleratortext newaccelerator convertlocalizedaccelerator acceleratortext newaccelerator setaccelerator newaccelerator oldaccel oldtext oldtext firepropertychange oldtext sets the tool tip text for this action p fires a property change event for the code tool tip text code property if the tool tip text actually changes as a consequence p param tool tip text the tool tip text or code null code if none public void set tool tip text string tool tip text string old tool tip text this tool tip text if old tool tip text null tool tip text null old tool tip text equals tool tip text this tool tip text tool tip text fire property change tool tip text old tool tip text tool tip text tool_tip_text tooltiptext settooltiptext tooltiptext oldtooltiptext tooltiptext oldtooltiptext tooltiptext oldtooltiptext tooltiptext tooltiptext tooltiptext firepropertychange tool_tip_text oldtooltiptext tooltiptext see i action set accelerator int public void set accelerator int keycode this accelerator keycode iaction setaccelerator setaccelerator reports the outcome of the running of this action via the link i action result property param success code true code if the action succeeded and code false code if the action failed or was not completed see i action result since 3 0 public final void notify result boolean success avoid boolean value of boolean to allow compilation against jcl foundation bug 80059 fire property change result null success boolean true boolean false iaction iaction notifyresult valueof firepropertychange private static final i menu creator val drop down menu new i menu creator public void dispose do nothing imenucreator val_drop_down_menu imenucreator public menu get menu control parent do nothing return null getmenu public menu get menu menu parent do nothing return null getmenu creates a new action with no text and no image p configure the action later using the set methods p protected action do nothing creates a new action with the given text and no image calls the zero arg constructor then code set text code param text the string used as the text for the action or code null code if there is no text see set text protected action string text this set text text settext settext settext creates a new action with the given text and image calls the zero arg constructor then code set text code and code set image descriptor code param text the action s text or code null code if there is no text param image the action s image or code null code if there is no image see set text see set image descriptor protected action string text image descriptor image this text set image descriptor image settext setimagedescriptor settext setimagedescriptor imagedescriptor setimagedescriptor creates a new action with the given text and style param text the action s text or code null code if there is no text param style one of code as push button code code as check box code code as drop down menu code code as radio button code and code as unspecified code protected action string text int style this text switch style case as push button value val push btn break case as check box value val toggle btn off break case as drop down menu value val drop down menu break case as radio button value val radio btn off break as_push_button as_check_box as_drop_down_menu as_radio_button as_unspecified as_push_button val_push_btn as_check_box val_toggle_btn_off as_drop_down_menu val_drop_down_menu as_radio_button val_radio_btn_off method declared on i action public void add property change listener i property change listener listener listeners add listener iaction addpropertychangelistener ipropertychangelistener parses the given accelerator text and converts it to an accelerator key code support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml param accelerator text the accelerator text localized to the current locale return the swt key code or 0 if there is no accelerator private static int convert localized accelerator string accelerator text int accelerator 0 string tokenizer stok new string tokenizer accelerator text non nls 1 int key code 1 boolean has more tokens stok has more tokens while has more tokens string token stok next token has more tokens stok has more tokens every token except the last must be one of the modifiers ctrl shift alt or command if has more tokens int modifier find localized modifier token if modifier 0 accelerator modifier else leave if there are none return 0 else key code find localized key code token if key code 1 accelerator key code return accelerator setaccelerator acceleratortext convertlocalizedaccelerator acceleratortext stringtokenizer stringtokenizer acceleratortext keycode hasmoretokens hasmoretokens hasmoretokens nexttoken hasmoretokens hasmoretokens hasmoretokens findlocalizedmodifier keycode findlocalizedkeycode keycode keycode parses the given accelerator text and converts it to an accelerator key code param accelerator text the accelerator text return the swt key code or 0 if there is no accelerator public static int convert accelerator string accelerator text int accelerator 0 string tokenizer stok new string tokenizer accelerator text non nls 1 int key code 1 boolean has more tokens stok has more tokens while has more tokens string token stok next token has more tokens stok has more tokens every token except the last must be one of the modifiers ctrl shift alt or command if has more tokens int modifier find modifier token if modifier 0 accelerator modifier else leave if there are none return 0 else key code find key code token if key code 1 accelerator key code return accelerator acceleratortext convertaccelerator acceleratortext stringtokenizer stringtokenizer acceleratortext keycode hasmoretokens hasmoretokens hasmoretokens nexttoken hasmoretokens hasmoretokens hasmoretokens findmodifier keycode findkeycode keycode keycode converts an accelerator key code to a string representation param key code the key code to be translated return a string representation of the key code public static string convert accelerator int key code string modifier get modifier string key code string full key if modifier equals non nls 1 full key find key string key code else full key modifier find key string key code non nls 1 return full key keycode convertaccelerator keycode getmodifierstring keycode fullkey fullkey findkeystring keycode fullkey findkeystring keycode fullkey private static string get modifier string int key code string mod string non nls 1 if key code swt ctrl 0 mod string find modifier string key code swt ctrl if key code swt alt 0 if mod string equals non nls 1 mod string find modifier string key code swt alt else mod string mod string find modifier string key code swt alt non nls 1 if key code swt shift 0 if mod string equals non nls 1 mod string find modifier string key code swt shift else mod string mod string find modifier string key code swt shift non nls 1 if key code swt command 0 if mod string equals non nls 1 mod string find modifier string key code swt command else mod string mod string find modifier string key code swt command non nls 1 return mod string getmodifierstring keycode modstring keycode modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode modstring extracts the accelerator text from the given text returns code null code if there is no accelerator text and the empty string if there is no text after the accelerator delimeter tab or param text the text for the action return the accelerator text or code null code private static string extract accelerator text string text int index text last index of t if index 1 index text last index of if index 0 return text substring index 1 return null extractacceleratortext lastindexof lastindexof maps a standard keyboard key name to an swt key code key names are converted to upper case before comparison if the key name is a single letter for example s its character code is returned p the following key names are known case is ignored ul li code backspace code li li code tab code li li code return code li li code enter code li li code esc code li li code escape code li li code delete code li li code space code li li code arrow up code code arrow down code code arrow left code and code arrow right code li li code page up code and code page down code li li code home code li li code end code li li code insert code li li code f1 code code f2 code through code f12 code li ul p param token the key name return the swt key code code 1 code if no match was found see swt public static int find key code string token if key codes null init key codes token token to upper case integer i integer key codes get token if i null return i int value if token length 1 return token char at 0 return 1 arrow_up arrow_down arrow_left arrow_right page_up page_down findkeycode keycodes initkeycodes touppercase keycodes intvalue charat find the supplied code for a localized key as find key code but localized to the current locale support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml param token the localized key name return the swt key code code 1 code if no match was found see find key code private static int find localized key code string token if localized key codes null init localized key codes token token to upper case integer i integer localized key codes get token if i null return i int value if token length 1 return token char at 0 return 1 findkeycode setaccelerator findkeycode findlocalizedkeycode localizedkeycodes initlocalizedkeycodes touppercase localizedkeycodes intvalue charat maps an swt key code to a standard keyboard key name the key code is stripped of modifiers swt ctrl swt alt swt shift and swt command if the key code is not an swt code for example if it a key code for the key s a string containing a character representation of the key code is returned param key code the key code to be translated return the string representation of the key code see swt since 2 0 public static string find key string int key code if key strings null init key strings int i key code swt ctrl swt alt swt shift swt command integer integer new integer i string result string key strings get integer if result null return result result new string new char char i return result keycode findkeystring keycode keystrings initkeystrings keycode keystrings maps standard keyboard modifier key names to the corresponding swt modifier bit the following modifier key names are recognized case is ignored code ctrl code code shift code code alt code and code command code the given modifier key name is converted to upper case before comparison param token the modifier key name return the swt modifier bit or code 0 code if no match was found see swt public static int find modifier string token token token to upper case if token equals ctrl non nls 1 return swt ctrl if token equals shift non nls 1 return swt shift if token equals alt non nls 1 return swt alt if token equals command non nls 1 return swt command return 0 findmodifier touppercase maps the localized modifier names to a code in the same manner as find modifier support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml see find modifier private static int find localized modifier string token if localized ctrl null init localized modifiers token token to upper case if token equals localized ctrl non nls 1 return swt ctrl if token equals localized shift non nls 1 return swt shift if token equals localized alt non nls 1 return swt alt if token equals localized command non nls 1 return swt command return 0 findmodifier setaccelerator findmodifier findlocalizedmodifier localized_ctrl initlocalizedmodifiers touppercase localized_ctrl localized_shift localized_alt localized_command initialize the list of localized modifiers private static void init localized modifiers localized ctrl j face resources get string ctrl to upper case non nls 1 localized shift j face resources get string shift to upper case non nls 1 localized alt j face resources get string alt to upper case non nls 1 localized command j face resources get string command to upper case non nls 1 initlocalizedmodifiers localized_ctrl jfaceresources getstring touppercase localized_shift jfaceresources getstring touppercase localized_alt jfaceresources getstring touppercase localized_command jfaceresources getstring touppercase returns a string representation of an swt modifier bit swt ctrl swt alt swt shift and swt command returns code null code if the key code is not an swt modifier bit param key code the swt modifier bit to be translated return the string representation of the swt modifier bit or code null code if the key code was not an swt modifier bit see swt since 2 0 public static string find modifier string int key code if key code swt ctrl return j face resources get string ctrl non nls 1 if key code swt alt return j face resources get string alt non nls 1 if key code swt shift return j face resources get string shift non nls 1 if key code swt command return j face resources get string command non nls 1 return null keycode findmodifierstring keycode keycode jfaceresources getstring keycode jfaceresources getstring keycode jfaceresources getstring keycode jfaceresources getstring notifies any property change listeners that a property has changed only listeners registered at the time this method is called are notified this method avoids creating an event object if there are no listeners registered but calls code fire property change property change event code if there are param property name the name of the property that has changed param old value the old value of the property or code null code if none param new value the new value of the property or code null code if none see i property change listener property change protected void fire property change string property name object old value object new value if listeners is empty fire property change new property change event this property name old value new value firepropertychange propertychangeevent propertyname oldvalue newvalue ipropertychangelistener propertychange firepropertychange propertyname oldvalue newvalue isempty firepropertychange propertychangeevent propertyname oldvalue newvalue notifies any property change listeners that a property has changed only listeners registered at the time this method is called are notified param event the property change event see i property change listener property change protected void fire property change property change event event object list this listeners get listeners for int i 0 i list length i i property change listener list i property change event ipropertychangelistener propertychange firepropertychange propertychangeevent getlisteners ipropertychangelistener propertychange method declared on i action public int get accelerator return accelerator iaction getaccelerator public string get action definition id return action definition id getactiondefinitionid actiondefinitionid public string get description if description null return description return get tool tip text getdescription gettooltiptext method declared on i action public image descriptor get disabled image descriptor return disabled image iaction imagedescriptor getdisabledimagedescriptor disabledimage method declared on i action public help listener get help listener return help listener iaction helplistener gethelplistener helplistener method declared on i action public image descriptor get hover image descriptor return hover image iaction imagedescriptor gethoverimagedescriptor hoverimage method declared on i action public string get id return id iaction getid method declared on i action public image descriptor get image descriptor return image iaction imagedescriptor getimagedescriptor public i menu creator get menu creator the default drop down menu value is only used to mark this action requested style so do not return it for backward compatibility reasons if value val drop down menu return null if value instanceof i menu creator return i menu creator value return null imenucreator getmenucreator val_drop_down_menu imenucreator imenucreator public int get style infer the style from the value field if value val push btn value null return as push button if value val toggle btn on value val toggle btn off return as check box if value val radio btn on value val radio btn off return as radio button if value instanceof i menu creator return as drop down menu we should never get to this line return as push button getstyle val_push_btn as_push_button val_toggle_btn_on val_toggle_btn_off as_check_box val_radio_btn_on val_radio_btn_off as_radio_button imenucreator as_drop_down_menu as_push_button method declared on i action public string get text return text iaction gettext method declared on i action public string get tool tip text return tool tip text iaction gettooltiptext tooltiptext initializes the internal key code table private static void init key codes key codes new hash map 40 key codes put backspace new integer 8 non nls 1 key codes put tab new integer 9 non nls 1 key codes put return new integer 13 non nls 1 key codes put enter new integer 13 non nls 1 key codes put escape new integer 27 non nls 1 key codes put esc new integer 27 non nls 1 key codes put delete new integer 127 non nls 1 key codes put space new integer non nls 1 key codes put arrow up new integer swt arrow up non nls 1 key codes put arrow down new integer swt arrow down non nls 1 key codes put arrow left new integer swt arrow left non nls 1 key codes put arrow right new integer swt arrow right non nls 1 key codes put page up new integer swt page up non nls 1 key codes put page down new integer swt page down non nls 1 key codes put home new integer swt home non nls 1 key codes put end new integer swt end non nls 1 key codes put insert new integer swt insert non nls 1 key codes put f1 new integer swt f1 non nls 1 key codes put f2 new integer swt f2 non nls 1 key codes put f3 new integer swt f3 non nls 1 key codes put f4 new integer swt f4 non nls 1 key codes put f5 new integer swt f5 non nls 1 key codes put f6 new integer swt f6 non nls 1 key codes put f7 new integer swt f7 non nls 1 key codes put f8 new integer swt f8 non nls 1 key codes put f9 new integer swt f9 non nls 1 key codes put f10 new integer swt f10 non nls 1 key codes put f11 new integer swt f11 non nls 1 key codes put f12 new integer swt f12 non nls 1 initkeycodes keycodes hashmap keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes arrow_up arrow_up keycodes arrow_down arrow_down keycodes arrow_left arrow_left keycodes arrow_right arrow_right keycodes page_up page_up keycodes page_down page_down keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes initializes the localized internal key code table private static void init localized key codes localized key codes new hash map 40 localized key codes put j face resources get string backspace to upper case new integer 8 non nls 1 localized key codes put j face resources get string tab to upper case new integer 9 non nls 1 localized key codes put j face resources get string return to upper case new integer 13 non nls 1 localized key codes put j face resources get string enter to upper case new integer 13 non nls 1 localized key codes put j face resources get string escape to upper case new integer 27 non nls 1 localized key codes put j face resources get string esc to upper case new integer 27 non nls 1 localized key codes put j face resources get string delete to upper case new integer 127 non nls 1 localized key codes put j face resources get string space to upper case new integer non nls 1 localized key codes put j face resources get string arrow up to upper case new integer swt arrow up non nls 1 localized key codes put j face resources get string arrow down to upper case new integer swt arrow down non nls 1 localized key codes put j face resources get string arrow left to upper case new integer swt arrow left non nls 1 localized key codes put j face resources get string arrow right to upper case new integer swt arrow right non nls 1 localized key codes put j face resources get string page up to upper case new integer swt page up non nls 1 localized key codes put j face resources get string page down to upper case new integer swt page down non nls 1 localized key codes put j face resources get string home to upper case new integer swt home non nls 1 localized key codes put j face resources get string end to upper case new integer swt end non nls 1 localized key codes put j face resources get string insert to upper case new integer swt insert non nls 1 localized key codes put j face resources get string f1 to upper case new integer swt f1 non nls 1 localized key codes put j face resources get string f2 to upper case new integer swt f2 non nls 1 localized key codes put j face resources get string f3 to upper case new integer swt f3 non nls 1 localized key codes put j face resources get string f4 to upper case new integer swt f4 non nls 1 localized key codes put j face resources get string f5 to upper case new integer swt f5 non nls 1 localized key codes put j face resources get string f6 to upper case new integer swt f6 non nls 1 localized key codes put j face resources get string f7 to upper case new integer swt f7 non nls 1 localized key codes put j face resources get string f8 to upper case new integer swt f8 non nls 1 localized key codes put j face resources get string f9 to upper case new integer swt f9 non nls 1 localized key codes put j face resources get string f10 to upper case new integer swt f10 non nls 1 localized key codes put j face resources get string f11 to upper case new integer swt f11 non nls 1 localized key codes put j face resources get string f12 to upper case new integer swt f12 non nls 1 initlocalizedkeycodes localizedkeycodes hashmap localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring arrow_up touppercase arrow_up localizedkeycodes jfaceresources getstring arrow_down touppercase arrow_down localizedkeycodes jfaceresources getstring arrow_left touppercase arrow_left localizedkeycodes jfaceresources getstring arrow_right touppercase arrow_right localizedkeycodes jfaceresources getstring page_up touppercase page_up localizedkeycodes jfaceresources getstring page_down touppercase page_down localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase initializes the internal key string table private static void init key strings key strings new hash map 40 key strings put new integer 8 j face resources get string backspace non nls 1 key strings put new integer 9 j face resources get string tab non nls 1 key strings put new integer 13 j face resources get string return non nls 1 key strings put new integer 13 j face resources get string enter non nls 1 key strings put new integer 27 j face resources get string escape non nls 1 key strings put new integer 27 j face resources get string esc non nls 1 key strings put new integer 127 j face resources get string delete non nls 1 key strings put new integer j face resources get string space non nls 1 key strings put new integer swt arrow up j face resources get string arrow up non nls 1 key strings put new integer swt arrow down j face resources get string arrow down non nls 1 key strings put new integer swt arrow left j face resources get string arrow left non nls 1 key strings put new integer swt arrow right j face resources get string arrow right non nls 1 key strings put new integer swt page up j face resources get string page up non nls 1 key strings put new integer swt page down j face resources get string page down non nls 1 key strings put new integer swt home j face resources get string home non nls 1 key strings put new integer swt end j face resources get string end non nls 1 key strings put new integer swt insert j face resources get string insert non nls 1 key strings put new integer swt f1 j face resources get string f1 non nls 1 key strings put new integer swt f2 j face resources get string f2 non nls 1 key strings put new integer swt f3 j face resources get string f3 non nls 1 key strings put new integer swt f4 j face resources get string f4 non nls 1 key strings put new integer swt f5 j face resources get string f5 non nls 1 key strings put new integer swt f6 j face resources get string f6 non nls 1 key strings put new integer swt f7 j face resources get string f7 non nls 1 key strings put new integer swt f8 j face resources get string f8 non nls 1 key strings put new integer swt f9 j face resources get string f9 non nls 1 key strings put new integer swt f10 j face resources get string f10 non nls 1 key strings put new integer swt f11 j face resources get string f11 non nls 1 key strings put new integer swt f12 j face resources get string f12 non nls 1 initkeystrings keystrings hashmap keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings arrow_up jfaceresources getstring arrow_up keystrings arrow_down jfaceresources getstring arrow_down keystrings arrow_left jfaceresources getstring arrow_left keystrings arrow_right jfaceresources getstring arrow_right keystrings page_up jfaceresources getstring page_up keystrings page_down jfaceresources getstring page_down keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring method declared on i action public boolean is checked return value val toggle btn on value val radio btn on iaction ischecked val_toggle_btn_on val_radio_btn_on method declared on i action public boolean is enabled return enabled iaction isenabled method declared on i action public boolean is handled return true iaction ishandled convenience method for removing any optional accelerator text from the given string the accelerator text appears at the end of the text and is separated from the main part by a single tab character code t code param text the text return the text sans accelerator public static string remove accelerator text string text int index text last index of t if index 1 index text last index of if index 0 return text substring 0 index return text removeacceleratortext lastindexof lastindexof convenience method for removing any mnemonics from the given string for example code remove mnemonics open code will return code open code param text the text return the text sans mnemonics since 3 0 public static string remove mnemonics string text int index text index of if index 1 return text int len text length string buffer sb new string buffer len int last index 0 while index 1 ignore at the end if index len 1 break handle the case if text char at index 1 index dbcs languages use x format if index 0 text char at index 1 text length index 3 text char at index 2 sb append text substring last index index 1 index 3 else sb append text substring last index index skip the index last index index index text index of index if last index len sb append text substring last index len return sb to string removemnemonics removemnemonics indexof stringbuffer stringbuffer lastindex charat charat charat lastindex lastindex lastindex indexof lastindex lastindex tostring method declared on i action public void remove property change listener i property change listener listener listeners remove listener iaction removepropertychangelistener ipropertychangelistener the default implementation of this code i action code method does nothing subclasses should override this method if they do not need information from the triggering event or override code run with event event code if they do public void run do nothing iaction runwithevent the default implementation of this code i action code method ignores the event argument and simply calls code run code subclasses should override this method if they need information from the triggering event or override code run code if not param event the swt event which triggered this action being run since 2 0 public void run with event event event run iaction runwithevent method declared on i action public void set action definition id string id action definition id id iaction setactiondefinitionid actiondefinitionid public void set checked boolean checked object new value null for backward compatibility if the style is not set yet then convert it to a toggle button if value null value val toggle btn on value val toggle btn off new value checked val toggle btn on val toggle btn off else if value val radio btn on value val radio btn off new value checked val radio btn on val radio btn off else some other style already so do nothing return if new value value value new value if checked fire property change checked boolean false boolean true else fire property change checked boolean true boolean false setchecked newvalue val_toggle_btn_on val_toggle_btn_off newvalue val_toggle_btn_on val_toggle_btn_off val_radio_btn_on val_radio_btn_off newvalue val_radio_btn_on val_radio_btn_off newvalue newvalue firepropertychange firepropertychange public void set description string text if description null text null description null text null description null text null text equals description string old description description description text fire property change description old description description setdescription olddescription firepropertychange olddescription public void set disabled image descriptor image descriptor new image if disabled image new image image descriptor old image disabled image disabled image new image fire property change image old image new image setdisabledimagedescriptor imagedescriptor newimage disabledimage newimage imagedescriptor oldimage disabledimage disabledimage newimage firepropertychange oldimage newimage public void set enabled boolean enabled if enabled this enabled boolean old val this enabled boolean true boolean false boolean new val enabled boolean true boolean false this enabled enabled fire property change enabled old val new val setenabled oldval newval firepropertychange oldval newval method declared on i action public void set help listener help listener listener help listener listener iaction sethelplistener helplistener helplistener public void set hover image descriptor image descriptor new image if hover image new image image descriptor old image hover image hover image new image fire property change image old image new image sethoverimagedescriptor imagedescriptor newimage hoverimage newimage imagedescriptor oldimage hoverimage hoverimage newimage firepropertychange oldimage newimage method declared on i action public void set id string id this id id iaction setid public void set image descriptor image descriptor new image if image new image image descriptor old image image image new image fire property change image old image new image setimagedescriptor imagedescriptor newimage newimage imagedescriptor oldimage newimage firepropertychange oldimage newimage sets the menu creator for this action p note that if this method is called it overrides the check status p param creator the menu creator or code null code if none public void set menu creator i menu creator creator for backward compatibility if the style is not set yet then convert it to a drop down menu if value null value creator return if value instanceof i menu creator value creator null val drop down menu creator setmenucreator imenucreator imenucreator val_drop_down_menu sets the text for this action p fires a property change event for the code text code property if the text actually changes as a consequence p p the accelerator is identified by the last index of a tab character if there are no tab characters then it is identified by the last index of a character if neither then there is no accelerator text note that if you want to insert a character into the text but no accelerator you can simply insert a or a tab at the end of the text p param text the text or code null code if none public void set text string text string old text this text int old accel this accelerator this text text if text null string accelerator text extract accelerator text text if accelerator text null int new accelerator convert localized accelerator accelerator text be sure to not wipe out the accelerator if nothing found if new accelerator 0 set accelerator new accelerator if this accelerator old accel old text null this text null old text equals this text fire property change text old text this text settext oldtext oldaccel acceleratortext extractacceleratortext acceleratortext newaccelerator convertlocalizedaccelerator acceleratortext newaccelerator setaccelerator newaccelerator oldaccel oldtext oldtext firepropertychange oldtext sets the tool tip text for this action p fires a property change event for the code tool tip text code property if the tool tip text actually changes as a consequence p param tool tip text the tool tip text or code null code if none public void set tool tip text string tool tip text string old tool tip text this tool tip text if old tool tip text null tool tip text null old tool tip text equals tool tip text this tool tip text tool tip text fire property change tool tip text old tool tip text tool tip text tool_tip_text tooltiptext settooltiptext tooltiptext oldtooltiptext tooltiptext oldtooltiptext tooltiptext oldtooltiptext tooltiptext tooltiptext tooltiptext firepropertychange tool_tip_text oldtooltiptext tooltiptext see i action set accelerator int public void set accelerator int keycode this accelerator keycode iaction setaccelerator setaccelerator reports the outcome of the running of this action via the link i action result property param success code true code if the action succeeded and code false code if the action failed or was not completed see i action result since 3 0 public final void notify result boolean success avoid boolean value of boolean to allow compilation against jcl foundation bug 80059 fire property change result null success boolean true boolean false iaction iaction notifyresult valueof firepropertychange private static final i menu creator val drop down menu new i menu creator public void dispose do nothing imenucreator val_drop_down_menu imenucreator public menu get menu control parent do nothing return null getmenu public menu get menu menu parent do nothing return null getmenu creates a new action with no text and no image p configure the action later using the set methods p protected action do nothing creates a new action with the given text and no image calls the zero arg constructor then code set text code param text the string used as the text for the action or code null code if there is no text see set text protected action string text this set text text settext settext settext creates a new action with the given text and image calls the zero arg constructor then code set text code and code set image descriptor code param text the action s text or code null code if there is no text param image the action s image or code null code if there is no image see set text see set image descriptor protected action string text image descriptor image this text set image descriptor image settext setimagedescriptor settext setimagedescriptor imagedescriptor setimagedescriptor creates a new action with the given text and style param text the action s text or code null code if there is no text param style one of code as push button code code as check box code code as drop down menu code code as radio button code and code as unspecified code protected action string text int style this text switch style case as push button value val push btn break case as check box value val toggle btn off break case as drop down menu value val drop down menu break case as radio button value val radio btn off break as_push_button as_check_box as_drop_down_menu as_radio_button as_unspecified as_push_button val_push_btn as_check_box val_toggle_btn_off as_drop_down_menu val_drop_down_menu as_radio_button val_radio_btn_off method declared on i action public void add property change listener i property change listener listener listeners add listener iaction addpropertychangelistener ipropertychangelistener parses the given accelerator text and converts it to an accelerator key code support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml param accelerator text the accelerator text localized to the current locale return the swt key code or 0 if there is no accelerator private static int convert localized accelerator string accelerator text int accelerator 0 string tokenizer stok new string tokenizer accelerator text non nls 1 int key code 1 boolean has more tokens stok has more tokens while has more tokens string token stok next token has more tokens stok has more tokens every token except the last must be one of the modifiers ctrl shift alt or command if has more tokens int modifier find localized modifier token if modifier 0 accelerator modifier else leave if there are none return 0 else key code find localized key code token if key code 1 accelerator key code return accelerator setaccelerator acceleratortext convertlocalizedaccelerator acceleratortext stringtokenizer stringtokenizer acceleratortext keycode hasmoretokens hasmoretokens hasmoretokens nexttoken hasmoretokens hasmoretokens hasmoretokens findlocalizedmodifier keycode findlocalizedkeycode keycode keycode parses the given accelerator text and converts it to an accelerator key code param accelerator text the accelerator text return the swt key code or 0 if there is no accelerator public static int convert accelerator string accelerator text int accelerator 0 string tokenizer stok new string tokenizer accelerator text non nls 1 int key code 1 boolean has more tokens stok has more tokens while has more tokens string token stok next token has more tokens stok has more tokens every token except the last must be one of the modifiers ctrl shift alt or command if has more tokens int modifier find modifier token if modifier 0 accelerator modifier else leave if there are none return 0 else key code find key code token if key code 1 accelerator key code return accelerator acceleratortext convertaccelerator acceleratortext stringtokenizer stringtokenizer acceleratortext keycode hasmoretokens hasmoretokens hasmoretokens nexttoken hasmoretokens hasmoretokens hasmoretokens findmodifier keycode findkeycode keycode keycode converts an accelerator key code to a string representation param key code the key code to be translated return a string representation of the key code public static string convert accelerator int key code string modifier get modifier string key code string full key if modifier equals non nls 1 full key find key string key code else full key modifier find key string key code non nls 1 return full key keycode convertaccelerator keycode getmodifierstring keycode fullkey fullkey findkeystring keycode fullkey findkeystring keycode fullkey private static string get modifier string int key code string mod string non nls 1 if key code swt ctrl 0 mod string find modifier string key code swt ctrl if key code swt alt 0 if mod string equals non nls 1 mod string find modifier string key code swt alt else mod string mod string find modifier string key code swt alt non nls 1 if key code swt shift 0 if mod string equals non nls 1 mod string find modifier string key code swt shift else mod string mod string find modifier string key code swt shift non nls 1 if key code swt command 0 if mod string equals non nls 1 mod string find modifier string key code swt command else mod string mod string find modifier string key code swt command non nls 1 return mod string getmodifierstring keycode modstring keycode modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode modstring extracts the accelerator text from the given text returns code null code if there is no accelerator text and the empty string if there is no text after the accelerator delimeter tab or param text the text for the action return the accelerator text or code null code private static string extract accelerator text string text int index text last index of t if index 1 index text last index of if index 0 return text substring index 1 return null extractacceleratortext lastindexof lastindexof maps a standard keyboard key name to an swt key code key names are converted to upper case before comparison if the key name is a single letter for example s its character code is returned p the following key names are known case is ignored ul li code backspace code li li code tab code li li code return code li li code enter code li li code esc code li li code escape code li li code delete code li li code space code li li code arrow up code code arrow down code code arrow left code and code arrow right code li li code page up code and code page down code li li code home code li li code end code li li code insert code li li code f1 code code f2 code through code f12 code li ul p param token the key name return the swt key code code 1 code if no match was found see swt public static int find key code string token if key codes null init key codes token token to upper case integer i integer key codes get token if i null return i int value if token length 1 return token char at 0 return 1 arrow_up arrow_down arrow_left arrow_right page_up page_down findkeycode keycodes initkeycodes touppercase keycodes intvalue charat find the supplied code for a localized key as find key code but localized to the current locale support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml param token the localized key name return the swt key code code 1 code if no match was found see find key code private static int find localized key code string token if localized key codes null init localized key codes token token to upper case integer i integer localized key codes get token if i null return i int value if token length 1 return token char at 0 return 1 findkeycode setaccelerator findkeycode findlocalizedkeycode localizedkeycodes initlocalizedkeycodes touppercase localizedkeycodes intvalue charat maps an swt key code to a standard keyboard key name the key code is stripped of modifiers swt ctrl swt alt swt shift and swt command if the key code is not an swt code for example if it a key code for the key s a string containing a character representation of the key code is returned param key code the key code to be translated return the string representation of the key code see swt since 2 0 public static string find key string int key code if key strings null init key strings int i key code swt ctrl swt alt swt shift swt command integer integer new integer i string result string key strings get integer if result null return result result new string new char char i return result keycode findkeystring keycode keystrings initkeystrings keycode keystrings maps standard keyboard modifier key names to the corresponding swt modifier bit the following modifier key names are recognized case is ignored code ctrl code code shift code code alt code and code command code the given modifier key name is converted to upper case before comparison param token the modifier key name return the swt modifier bit or code 0 code if no match was found see swt public static int find modifier string token token token to upper case if token equals ctrl non nls 1 return swt ctrl if token equals shift non nls 1 return swt shift if token equals alt non nls 1 return swt alt if token equals command non nls 1 return swt command return 0 findmodifier touppercase maps the localized modifier names to a code in the same manner as find modifier support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml see find modifier private static int find localized modifier string token if localized ctrl null init localized modifiers token token to upper case if token equals localized ctrl non nls 1 return swt ctrl if token equals localized shift non nls 1 return swt shift if token equals localized alt non nls 1 return swt alt if token equals localized command non nls 1 return swt command return 0 findmodifier setaccelerator findmodifier findlocalizedmodifier localized_ctrl initlocalizedmodifiers touppercase localized_ctrl localized_shift localized_alt localized_command initialize the list of localized modifiers private static void init localized modifiers localized ctrl j face resources get string ctrl to upper case non nls 1 localized shift j face resources get string shift to upper case non nls 1 localized alt j face resources get string alt to upper case non nls 1 localized command j face resources get string command to upper case non nls 1 initlocalizedmodifiers localized_ctrl jfaceresources getstring touppercase localized_shift jfaceresources getstring touppercase localized_alt jfaceresources getstring touppercase localized_command jfaceresources getstring touppercase returns a string representation of an swt modifier bit swt ctrl swt alt swt shift and swt command returns code null code if the key code is not an swt modifier bit param key code the swt modifier bit to be translated return the string representation of the swt modifier bit or code null code if the key code was not an swt modifier bit see swt since 2 0 public static string find modifier string int key code if key code swt ctrl return j face resources get string ctrl non nls 1 if key code swt alt return j face resources get string alt non nls 1 if key code swt shift return j face resources get string shift non nls 1 if key code swt command return j face resources get string command non nls 1 return null keycode findmodifierstring keycode keycode jfaceresources getstring keycode jfaceresources getstring keycode jfaceresources getstring keycode jfaceresources getstring notifies any property change listeners that a property has changed only listeners registered at the time this method is called are notified this method avoids creating an event object if there are no listeners registered but calls code fire property change property change event code if there are param property name the name of the property that has changed param old value the old value of the property or code null code if none param new value the new value of the property or code null code if none see i property change listener property change protected void fire property change string property name object old value object new value if listeners is empty fire property change new property change event this property name old value new value firepropertychange propertychangeevent propertyname oldvalue newvalue ipropertychangelistener propertychange firepropertychange propertyname oldvalue newvalue isempty firepropertychange propertychangeevent propertyname oldvalue newvalue notifies any property change listeners that a property has changed only listeners registered at the time this method is called are notified param event the property change event see i property change listener property change protected void fire property change property change event event object list this listeners get listeners for int i 0 i list length i i property change listener list i property change event ipropertychangelistener propertychange firepropertychange propertychangeevent getlisteners ipropertychangelistener propertychange method declared on i action public int get accelerator return accelerator iaction getaccelerator public string get action definition id return action definition id getactiondefinitionid actiondefinitionid public string get description if description null return description return get tool tip text getdescription gettooltiptext method declared on i action public image descriptor get disabled image descriptor return disabled image iaction imagedescriptor getdisabledimagedescriptor disabledimage method declared on i action public help listener get help listener return help listener iaction helplistener gethelplistener helplistener method declared on i action public image descriptor get hover image descriptor return hover image iaction imagedescriptor gethoverimagedescriptor hoverimage method declared on i action public string get id return id iaction getid method declared on i action public image descriptor get image descriptor return image iaction imagedescriptor getimagedescriptor public i menu creator get menu creator the default drop down menu value is only used to mark this action requested style so do not return it for backward compatibility reasons if value val drop down menu return null if value instanceof i menu creator return i menu creator value return null imenucreator getmenucreator val_drop_down_menu imenucreator imenucreator public int get style infer the style from the value field if value val push btn value null return as push button if value val toggle btn on value val toggle btn off return as check box if value val radio btn on value val radio btn off return as radio button if value instanceof i menu creator return as drop down menu we should never get to this line return as push button getstyle val_push_btn as_push_button val_toggle_btn_on val_toggle_btn_off as_check_box val_radio_btn_on val_radio_btn_off as_radio_button imenucreator as_drop_down_menu as_push_button method declared on i action public string get text return text iaction gettext method declared on i action public string get tool tip text return tool tip text iaction gettooltiptext tooltiptext initializes the internal key code table private static void init key codes key codes new hash map 40 key codes put backspace new integer 8 non nls 1 key codes put tab new integer 9 non nls 1 key codes put return new integer 13 non nls 1 key codes put enter new integer 13 non nls 1 key codes put escape new integer 27 non nls 1 key codes put esc new integer 27 non nls 1 key codes put delete new integer 127 non nls 1 key codes put space new integer non nls 1 key codes put arrow up new integer swt arrow up non nls 1 key codes put arrow down new integer swt arrow down non nls 1 key codes put arrow left new integer swt arrow left non nls 1 key codes put arrow right new integer swt arrow right non nls 1 key codes put page up new integer swt page up non nls 1 key codes put page down new integer swt page down non nls 1 key codes put home new integer swt home non nls 1 key codes put end new integer swt end non nls 1 key codes put insert new integer swt insert non nls 1 key codes put f1 new integer swt f1 non nls 1 key codes put f2 new integer swt f2 non nls 1 key codes put f3 new integer swt f3 non nls 1 key codes put f4 new integer swt f4 non nls 1 key codes put f5 new integer swt f5 non nls 1 key codes put f6 new integer swt f6 non nls 1 key codes put f7 new integer swt f7 non nls 1 key codes put f8 new integer swt f8 non nls 1 key codes put f9 new integer swt f9 non nls 1 key codes put f10 new integer swt f10 non nls 1 key codes put f11 new integer swt f11 non nls 1 key codes put f12 new integer swt f12 non nls 1 initkeycodes keycodes hashmap keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes arrow_up arrow_up keycodes arrow_down arrow_down keycodes arrow_left arrow_left keycodes arrow_right arrow_right keycodes page_up page_up keycodes page_down page_down keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes initializes the localized internal key code table private static void init localized key codes localized key codes new hash map 40 localized key codes put j face resources get string backspace to upper case new integer 8 non nls 1 localized key codes put j face resources get string tab to upper case new integer 9 non nls 1 localized key codes put j face resources get string return to upper case new integer 13 non nls 1 localized key codes put j face resources get string enter to upper case new integer 13 non nls 1 localized key codes put j face resources get string escape to upper case new integer 27 non nls 1 localized key codes put j face resources get string esc to upper case new integer 27 non nls 1 localized key codes put j face resources get string delete to upper case new integer 127 non nls 1 localized key codes put j face resources get string space to upper case new integer non nls 1 localized key codes put j face resources get string arrow up to upper case new integer swt arrow up non nls 1 localized key codes put j face resources get string arrow down to upper case new integer swt arrow down non nls 1 localized key codes put j face resources get string arrow left to upper case new integer swt arrow left non nls 1 localized key codes put j face resources get string arrow right to upper case new integer swt arrow right non nls 1 localized key codes put j face resources get string page up to upper case new integer swt page up non nls 1 localized key codes put j face resources get string page down to upper case new integer swt page down non nls 1 localized key codes put j face resources get string home to upper case new integer swt home non nls 1 localized key codes put j face resources get string end to upper case new integer swt end non nls 1 localized key codes put j face resources get string insert to upper case new integer swt insert non nls 1 localized key codes put j face resources get string f1 to upper case new integer swt f1 non nls 1 localized key codes put j face resources get string f2 to upper case new integer swt f2 non nls 1 localized key codes put j face resources get string f3 to upper case new integer swt f3 non nls 1 localized key codes put j face resources get string f4 to upper case new integer swt f4 non nls 1 localized key codes put j face resources get string f5 to upper case new integer swt f5 non nls 1 localized key codes put j face resources get string f6 to upper case new integer swt f6 non nls 1 localized key codes put j face resources get string f7 to upper case new integer swt f7 non nls 1 localized key codes put j face resources get string f8 to upper case new integer swt f8 non nls 1 localized key codes put j face resources get string f9 to upper case new integer swt f9 non nls 1 localized key codes put j face resources get string f10 to upper case new integer swt f10 non nls 1 localized key codes put j face resources get string f11 to upper case new integer swt f11 non nls 1 localized key codes put j face resources get string f12 to upper case new integer swt f12 non nls 1 initlocalizedkeycodes localizedkeycodes hashmap localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring arrow_up touppercase arrow_up localizedkeycodes jfaceresources getstring arrow_down touppercase arrow_down localizedkeycodes jfaceresources getstring arrow_left touppercase arrow_left localizedkeycodes jfaceresources getstring arrow_right touppercase arrow_right localizedkeycodes jfaceresources getstring page_up touppercase page_up localizedkeycodes jfaceresources getstring page_down touppercase page_down localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase initializes the internal key string table private static void init key strings key strings new hash map 40 key strings put new integer 8 j face resources get string backspace non nls 1 key strings put new integer 9 j face resources get string tab non nls 1 key strings put new integer 13 j face resources get string return non nls 1 key strings put new integer 13 j face resources get string enter non nls 1 key strings put new integer 27 j face resources get string escape non nls 1 key strings put new integer 27 j face resources get string esc non nls 1 key strings put new integer 127 j face resources get string delete non nls 1 key strings put new integer j face resources get string space non nls 1 key strings put new integer swt arrow up j face resources get string arrow up non nls 1 key strings put new integer swt arrow down j face resources get string arrow down non nls 1 key strings put new integer swt arrow left j face resources get string arrow left non nls 1 key strings put new integer swt arrow right j face resources get string arrow right non nls 1 key strings put new integer swt page up j face resources get string page up non nls 1 key strings put new integer swt page down j face resources get string page down non nls 1 key strings put new integer swt home j face resources get string home non nls 1 key strings put new integer swt end j face resources get string end non nls 1 key strings put new integer swt insert j face resources get string insert non nls 1 key strings put new integer swt f1 j face resources get string f1 non nls 1 key strings put new integer swt f2 j face resources get string f2 non nls 1 key strings put new integer swt f3 j face resources get string f3 non nls 1 key strings put new integer swt f4 j face resources get string f4 non nls 1 key strings put new integer swt f5 j face resources get string f5 non nls 1 key strings put new integer swt f6 j face resources get string f6 non nls 1 key strings put new integer swt f7 j face resources get string f7 non nls 1 key strings put new integer swt f8 j face resources get string f8 non nls 1 key strings put new integer swt f9 j face resources get string f9 non nls 1 key strings put new integer swt f10 j face resources get string f10 non nls 1 key strings put new integer swt f11 j face resources get string f11 non nls 1 key strings put new integer swt f12 j face resources get string f12 non nls 1 initkeystrings keystrings hashmap keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings arrow_up jfaceresources getstring arrow_up keystrings arrow_down jfaceresources getstring arrow_down keystrings arrow_left jfaceresources getstring arrow_left keystrings arrow_right jfaceresources getstring arrow_right keystrings page_up jfaceresources getstring page_up keystrings page_down jfaceresources getstring page_down keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring method declared on i action public boolean is checked return value val toggle btn on value val radio btn on iaction ischecked val_toggle_btn_on val_radio_btn_on method declared on i action public boolean is enabled return enabled iaction isenabled method declared on i action public boolean is handled return true iaction ishandled convenience method for removing any optional accelerator text from the given string the accelerator text appears at the end of the text and is separated from the main part by a single tab character code t code param text the text return the text sans accelerator public static string remove accelerator text string text int index text last index of t if index 1 index text last index of if index 0 return text substring 0 index return text removeacceleratortext lastindexof lastindexof convenience method for removing any mnemonics from the given string for example code remove mnemonics open code will return code open code param text the text return the text sans mnemonics since 3 0 public static string remove mnemonics string text int index text index of if index 1 return text int len text length string buffer sb new string buffer len int last index 0 while index 1 ignore at the end if index len 1 break handle the case if text char at index 1 index dbcs languages use x format if index 0 text char at index 1 text length index 3 text char at index 2 sb append text substring last index index 1 index 3 else sb append text substring last index index skip the index last index index index text index of index if last index len sb append text substring last index len return sb to string removemnemonics removemnemonics indexof stringbuffer stringbuffer lastindex charat charat charat lastindex lastindex lastindex indexof lastindex lastindex tostring method declared on i action public void remove property change listener i property change listener listener listeners remove listener iaction removepropertychangelistener ipropertychangelistener the default implementation of this code i action code method does nothing subclasses should override this method if they do not need information from the triggering event or override code run with event event code if they do public void run do nothing iaction runwithevent the default implementation of this code i action code method ignores the event argument and simply calls code run code subclasses should override this method if they need information from the triggering event or override code run code if not param event the swt event which triggered this action being run since 2 0 public void run with event event event run iaction runwithevent method declared on i action public void set action definition id string id action definition id id iaction setactiondefinitionid actiondefinitionid public void set checked boolean checked object new value null for backward compatibility if the style is not set yet then convert it to a toggle button if value null value val toggle btn on value val toggle btn off new value checked val toggle btn on val toggle btn off else if value val radio btn on value val radio btn off new value checked val radio btn on val radio btn off else some other style already so do nothing return if new value value value new value if checked fire property change checked boolean false boolean true else fire property change checked boolean true boolean false setchecked newvalue val_toggle_btn_on val_toggle_btn_off newvalue val_toggle_btn_on val_toggle_btn_off val_radio_btn_on val_radio_btn_off newvalue val_radio_btn_on val_radio_btn_off newvalue newvalue firepropertychange firepropertychange public void set description string text if description null text null description null text null description null text null text equals description string old description description description text fire property change description old description description setdescription olddescription firepropertychange olddescription public void set disabled image descriptor image descriptor new image if disabled image new image image descriptor old image disabled image disabled image new image fire property change image old image new image setdisabledimagedescriptor imagedescriptor newimage disabledimage newimage imagedescriptor oldimage disabledimage disabledimage newimage firepropertychange oldimage newimage public void set enabled boolean enabled if enabled this enabled boolean old val this enabled boolean true boolean false boolean new val enabled boolean true boolean false this enabled enabled fire property change enabled old val new val setenabled oldval newval firepropertychange oldval newval method declared on i action public void set help listener help listener listener help listener listener iaction sethelplistener helplistener helplistener public void set hover image descriptor image descriptor new image if hover image new image image descriptor old image hover image hover image new image fire property change image old image new image sethoverimagedescriptor imagedescriptor newimage hoverimage newimage imagedescriptor oldimage hoverimage hoverimage newimage firepropertychange oldimage newimage method declared on i action public void set id string id this id id iaction setid public void set image descriptor image descriptor new image if image new image image descriptor old image image image new image fire property change image old image new image setimagedescriptor imagedescriptor newimage newimage imagedescriptor oldimage newimage firepropertychange oldimage newimage sets the menu creator for this action p note that if this method is called it overrides the check status p param creator the menu creator or code null code if none public void set menu creator i menu creator creator for backward compatibility if the style is not set yet then convert it to a drop down menu if value null value creator return if value instanceof i menu creator value creator null val drop down menu creator setmenucreator imenucreator imenucreator val_drop_down_menu sets the text for this action p fires a property change event for the code text code property if the text actually changes as a consequence p p the accelerator is identified by the last index of a tab character if there are no tab characters then it is identified by the last index of a character if neither then there is no accelerator text note that if you want to insert a character into the text but no accelerator you can simply insert a or a tab at the end of the text p param text the text or code null code if none public void set text string text string old text this text int old accel this accelerator this text text if text null string accelerator text extract accelerator text text if accelerator text null int new accelerator convert localized accelerator accelerator text be sure to not wipe out the accelerator if nothing found if new accelerator 0 set accelerator new accelerator if this accelerator old accel old text null this text null old text equals this text fire property change text old text this text settext oldtext oldaccel acceleratortext extractacceleratortext acceleratortext newaccelerator convertlocalizedaccelerator acceleratortext newaccelerator setaccelerator newaccelerator oldaccel oldtext oldtext firepropertychange oldtext sets the tool tip text for this action p fires a property change event for the code tool tip text code property if the tool tip text actually changes as a consequence p param tool tip text the tool tip text or code null code if none public void set tool tip text string tool tip text string old tool tip text this tool tip text if old tool tip text null tool tip text null old tool tip text equals tool tip text this tool tip text tool tip text fire property change tool tip text old tool tip text tool tip text tool_tip_text tooltiptext settooltiptext tooltiptext oldtooltiptext tooltiptext oldtooltiptext tooltiptext oldtooltiptext tooltiptext tooltiptext tooltiptext firepropertychange tool_tip_text oldtooltiptext tooltiptext see i action set accelerator int public void set accelerator int keycode this accelerator keycode iaction setaccelerator setaccelerator reports the outcome of the running of this action via the link i action result property param success code true code if the action succeeded and code false code if the action failed or was not completed see i action result since 3 0 public final void notify result boolean success avoid boolean value of boolean to allow compilation against jcl foundation bug 80059 fire property change result null success boolean true boolean false iaction iaction notifyresult valueof firepropertychange private static final i menu creator val drop down menu new i menu creator public void dispose do nothing imenucreator val_drop_down_menu imenucreator public menu get menu control parent do nothing return null getmenu public menu get menu menu parent do nothing return null getmenu creates a new action with no text and no image p configure the action later using the set methods p protected action do nothing creates a new action with the given text and no image calls the zero arg constructor then code set text code param text the string used as the text for the action or code null code if there is no text see set text protected action string text this set text text settext settext settext creates a new action with the given text and image calls the zero arg constructor then code set text code and code set image descriptor code param text the action s text or code null code if there is no text param image the action s image or code null code if there is no image see set text see set image descriptor protected action string text image descriptor image this text set image descriptor image settext setimagedescriptor settext setimagedescriptor imagedescriptor setimagedescriptor creates a new action with the given text and style param text the action s text or code null code if there is no text param style one of code as push button code code as check box code code as drop down menu code code as radio button code and code as unspecified code protected action string text int style this text switch style case as push button value val push btn break case as check box value val toggle btn off break case as drop down menu value val drop down menu break case as radio button value val radio btn off break as_push_button as_check_box as_drop_down_menu as_radio_button as_unspecified as_push_button val_push_btn as_check_box val_toggle_btn_off as_drop_down_menu val_drop_down_menu as_radio_button val_radio_btn_off method declared on i action public void add property change listener i property change listener listener listeners add listener iaction addpropertychangelistener ipropertychangelistener parses the given accelerator text and converts it to an accelerator key code support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml param accelerator text the accelerator text localized to the current locale return the swt key code or 0 if there is no accelerator private static int convert localized accelerator string accelerator text int accelerator 0 string tokenizer stok new string tokenizer accelerator text non nls 1 int key code 1 boolean has more tokens stok has more tokens while has more tokens string token stok next token has more tokens stok has more tokens every token except the last must be one of the modifiers ctrl shift alt or command if has more tokens int modifier find localized modifier token if modifier 0 accelerator modifier else leave if there are none return 0 else key code find localized key code token if key code 1 accelerator key code return accelerator setaccelerator acceleratortext convertlocalizedaccelerator acceleratortext stringtokenizer stringtokenizer acceleratortext keycode hasmoretokens hasmoretokens hasmoretokens nexttoken hasmoretokens hasmoretokens hasmoretokens findlocalizedmodifier keycode findlocalizedkeycode keycode keycode parses the given accelerator text and converts it to an accelerator key code param accelerator text the accelerator text return the swt key code or 0 if there is no accelerator public static int convert accelerator string accelerator text int accelerator 0 string tokenizer stok new string tokenizer accelerator text non nls 1 int key code 1 boolean has more tokens stok has more tokens while has more tokens string token stok next token has more tokens stok has more tokens every token except the last must be one of the modifiers ctrl shift alt or command if has more tokens int modifier find modifier token if modifier 0 accelerator modifier else leave if there are none return 0 else key code find key code token if key code 1 accelerator key code return accelerator acceleratortext convertaccelerator acceleratortext stringtokenizer stringtokenizer acceleratortext keycode hasmoretokens hasmoretokens hasmoretokens nexttoken hasmoretokens hasmoretokens hasmoretokens findmodifier keycode findkeycode keycode keycode converts an accelerator key code to a string representation param key code the key code to be translated return a string representation of the key code public static string convert accelerator int key code string modifier get modifier string key code string full key if modifier equals non nls 1 full key find key string key code else full key modifier find key string key code non nls 1 return full key keycode convertaccelerator keycode getmodifierstring keycode fullkey fullkey findkeystring keycode fullkey findkeystring keycode fullkey private static string get modifier string int key code string mod string non nls 1 if key code swt ctrl 0 mod string find modifier string key code swt ctrl if key code swt alt 0 if mod string equals non nls 1 mod string find modifier string key code swt alt else mod string mod string find modifier string key code swt alt non nls 1 if key code swt shift 0 if mod string equals non nls 1 mod string find modifier string key code swt shift else mod string mod string find modifier string key code swt shift non nls 1 if key code swt command 0 if mod string equals non nls 1 mod string find modifier string key code swt command else mod string mod string find modifier string key code swt command non nls 1 return mod string getmodifierstring keycode modstring keycode modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode modstring extracts the accelerator text from the given text returns code null code if there is no accelerator text and the empty string if there is no text after the accelerator delimeter tab or param text the text for the action return the accelerator text or code null code private static string extract accelerator text string text int index text last index of t if index 1 index text last index of if index 0 return text substring index 1 return null extractacceleratortext lastindexof lastindexof maps a standard keyboard key name to an swt key code key names are converted to upper case before comparison if the key name is a single letter for example s its character code is returned p the following key names are known case is ignored ul li code backspace code li li code tab code li li code return code li li code enter code li li code esc code li li code escape code li li code delete code li li code space code li li code arrow up code code arrow down code code arrow left code and code arrow right code li li code page up code and code page down code li li code home code li li code end code li li code insert code li li code f1 code code f2 code through code f12 code li ul p param token the key name return the swt key code code 1 code if no match was found see swt public static int find key code string token if key codes null init key codes token token to upper case integer i integer key codes get token if i null return i int value if token length 1 return token char at 0 return 1 arrow_up arrow_down arrow_left arrow_right page_up page_down findkeycode keycodes initkeycodes touppercase keycodes intvalue charat find the supplied code for a localized key as find key code but localized to the current locale support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml param token the localized key name return the swt key code code 1 code if no match was found see find key code private static int find localized key code string token if localized key codes null init localized key codes token token to upper case integer i integer localized key codes get token if i null return i int value if token length 1 return token char at 0 return 1 findkeycode setaccelerator findkeycode findlocalizedkeycode localizedkeycodes initlocalizedkeycodes touppercase localizedkeycodes intvalue charat maps an swt key code to a standard keyboard key name the key code is stripped of modifiers swt ctrl swt alt swt shift and swt command if the key code is not an swt code for example if it a key code for the key s a string containing a character representation of the key code is returned param key code the key code to be translated return the string representation of the key code see swt since 2 0 public static string find key string int key code if key strings null init key strings int i key code swt ctrl swt alt swt shift swt command integer integer new integer i string result string key strings get integer if result null return result result new string new char char i return result keycode findkeystring keycode keystrings initkeystrings keycode keystrings maps standard keyboard modifier key names to the corresponding swt modifier bit the following modifier key names are recognized case is ignored code ctrl code code shift code code alt code and code command code the given modifier key name is converted to upper case before comparison param token the modifier key name return the swt modifier bit or code 0 code if no match was found see swt public static int find modifier string token token token to upper case if token equals ctrl non nls 1 return swt ctrl if token equals shift non nls 1 return swt shift if token equals alt non nls 1 return swt alt if token equals command non nls 1 return swt command return 0 findmodifier touppercase maps the localized modifier names to a code in the same manner as find modifier support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml see find modifier private static int find localized modifier string token if localized ctrl null init localized modifiers token token to upper case if token equals localized ctrl non nls 1 return swt ctrl if token equals localized shift non nls 1 return swt shift if token equals localized alt non nls 1 return swt alt if token equals localized command non nls 1 return swt command return 0 findmodifier setaccelerator findmodifier findlocalizedmodifier localized_ctrl initlocalizedmodifiers touppercase localized_ctrl localized_shift localized_alt localized_command initialize the list of localized modifiers private static void init localized modifiers localized ctrl j face resources get string ctrl to upper case non nls 1 localized shift j face resources get string shift to upper case non nls 1 localized alt j face resources get string alt to upper case non nls 1 localized command j face resources get string command to upper case non nls 1 initlocalizedmodifiers localized_ctrl jfaceresources getstring touppercase localized_shift jfaceresources getstring touppercase localized_alt jfaceresources getstring touppercase localized_command jfaceresources getstring touppercase returns a string representation of an swt modifier bit swt ctrl swt alt swt shift and swt command returns code null code if the key code is not an swt modifier bit param key code the swt modifier bit to be translated return the string representation of the swt modifier bit or code null code if the key code was not an swt modifier bit see swt since 2 0 public static string find modifier string int key code if key code swt ctrl return j face resources get string ctrl non nls 1 if key code swt alt return j face resources get string alt non nls 1 if key code swt shift return j face resources get string shift non nls 1 if key code swt command return j face resources get string command non nls 1 return null keycode findmodifierstring keycode keycode jfaceresources getstring keycode jfaceresources getstring keycode jfaceresources getstring keycode jfaceresources getstring notifies any property change listeners that a property has changed only listeners registered at the time this method is called are notified this method avoids creating an event object if there are no listeners registered but calls code fire property change property change event code if there are param property name the name of the property that has changed param old value the old value of the property or code null code if none param new value the new value of the property or code null code if none see i property change listener property change protected void fire property change string property name object old value object new value if listeners is empty fire property change new property change event this property name old value new value firepropertychange propertychangeevent propertyname oldvalue newvalue ipropertychangelistener propertychange firepropertychange propertyname oldvalue newvalue isempty firepropertychange propertychangeevent propertyname oldvalue newvalue notifies any property change listeners that a property has changed only listeners registered at the time this method is called are notified param event the property change event see i property change listener property change protected void fire property change property change event event object list this listeners get listeners for int i 0 i list length i i property change listener list i property change event ipropertychangelistener propertychange firepropertychange propertychangeevent getlisteners ipropertychangelistener propertychange method declared on i action public int get accelerator return accelerator iaction getaccelerator public string get action definition id return action definition id getactiondefinitionid actiondefinitionid public string get description if description null return description return get tool tip text getdescription gettooltiptext method declared on i action public image descriptor get disabled image descriptor return disabled image iaction imagedescriptor getdisabledimagedescriptor disabledimage method declared on i action public help listener get help listener return help listener iaction helplistener gethelplistener helplistener method declared on i action public image descriptor get hover image descriptor return hover image iaction imagedescriptor gethoverimagedescriptor hoverimage method declared on i action public string get id return id iaction getid method declared on i action public image descriptor get image descriptor return image iaction imagedescriptor getimagedescriptor public i menu creator get menu creator the default drop down menu value is only used to mark this action requested style so do not return it for backward compatibility reasons if value val drop down menu return null if value instanceof i menu creator return i menu creator value return null imenucreator getmenucreator val_drop_down_menu imenucreator imenucreator public int get style infer the style from the value field if value val push btn value null return as push button if value val toggle btn on value val toggle btn off return as check box if value val radio btn on value val radio btn off return as radio button if value instanceof i menu creator return as drop down menu we should never get to this line return as push button getstyle val_push_btn as_push_button val_toggle_btn_on val_toggle_btn_off as_check_box val_radio_btn_on val_radio_btn_off as_radio_button imenucreator as_drop_down_menu as_push_button method declared on i action public string get text return text iaction gettext method declared on i action public string get tool tip text return tool tip text iaction gettooltiptext tooltiptext initializes the internal key code table private static void init key codes key codes new hash map 40 key codes put backspace new integer 8 non nls 1 key codes put tab new integer 9 non nls 1 key codes put return new integer 13 non nls 1 key codes put enter new integer 13 non nls 1 key codes put escape new integer 27 non nls 1 key codes put esc new integer 27 non nls 1 key codes put delete new integer 127 non nls 1 key codes put space new integer non nls 1 key codes put arrow up new integer swt arrow up non nls 1 key codes put arrow down new integer swt arrow down non nls 1 key codes put arrow left new integer swt arrow left non nls 1 key codes put arrow right new integer swt arrow right non nls 1 key codes put page up new integer swt page up non nls 1 key codes put page down new integer swt page down non nls 1 key codes put home new integer swt home non nls 1 key codes put end new integer swt end non nls 1 key codes put insert new integer swt insert non nls 1 key codes put f1 new integer swt f1 non nls 1 key codes put f2 new integer swt f2 non nls 1 key codes put f3 new integer swt f3 non nls 1 key codes put f4 new integer swt f4 non nls 1 key codes put f5 new integer swt f5 non nls 1 key codes put f6 new integer swt f6 non nls 1 key codes put f7 new integer swt f7 non nls 1 key codes put f8 new integer swt f8 non nls 1 key codes put f9 new integer swt f9 non nls 1 key codes put f10 new integer swt f10 non nls 1 key codes put f11 new integer swt f11 non nls 1 key codes put f12 new integer swt f12 non nls 1 initkeycodes keycodes hashmap keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes arrow_up arrow_up keycodes arrow_down arrow_down keycodes arrow_left arrow_left keycodes arrow_right arrow_right keycodes page_up page_up keycodes page_down page_down keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes initializes the localized internal key code table private static void init localized key codes localized key codes new hash map 40 localized key codes put j face resources get string backspace to upper case new integer 8 non nls 1 localized key codes put j face resources get string tab to upper case new integer 9 non nls 1 localized key codes put j face resources get string return to upper case new integer 13 non nls 1 localized key codes put j face resources get string enter to upper case new integer 13 non nls 1 localized key codes put j face resources get string escape to upper case new integer 27 non nls 1 localized key codes put j face resources get string esc to upper case new integer 27 non nls 1 localized key codes put j face resources get string delete to upper case new integer 127 non nls 1 localized key codes put j face resources get string space to upper case new integer non nls 1 localized key codes put j face resources get string arrow up to upper case new integer swt arrow up non nls 1 localized key codes put j face resources get string arrow down to upper case new integer swt arrow down non nls 1 localized key codes put j face resources get string arrow left to upper case new integer swt arrow left non nls 1 localized key codes put j face resources get string arrow right to upper case new integer swt arrow right non nls 1 localized key codes put j face resources get string page up to upper case new integer swt page up non nls 1 localized key codes put j face resources get string page down to upper case new integer swt page down non nls 1 localized key codes put j face resources get string home to upper case new integer swt home non nls 1 localized key codes put j face resources get string end to upper case new integer swt end non nls 1 localized key codes put j face resources get string insert to upper case new integer swt insert non nls 1 localized key codes put j face resources get string f1 to upper case new integer swt f1 non nls 1 localized key codes put j face resources get string f2 to upper case new integer swt f2 non nls 1 localized key codes put j face resources get string f3 to upper case new integer swt f3 non nls 1 localized key codes put j face resources get string f4 to upper case new integer swt f4 non nls 1 localized key codes put j face resources get string f5 to upper case new integer swt f5 non nls 1 localized key codes put j face resources get string f6 to upper case new integer swt f6 non nls 1 localized key codes put j face resources get string f7 to upper case new integer swt f7 non nls 1 localized key codes put j face resources get string f8 to upper case new integer swt f8 non nls 1 localized key codes put j face resources get string f9 to upper case new integer swt f9 non nls 1 localized key codes put j face resources get string f10 to upper case new integer swt f10 non nls 1 localized key codes put j face resources get string f11 to upper case new integer swt f11 non nls 1 localized key codes put j face resources get string f12 to upper case new integer swt f12 non nls 1 initlocalizedkeycodes localizedkeycodes hashmap localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring arrow_up touppercase arrow_up localizedkeycodes jfaceresources getstring arrow_down touppercase arrow_down localizedkeycodes jfaceresources getstring arrow_left touppercase arrow_left localizedkeycodes jfaceresources getstring arrow_right touppercase arrow_right localizedkeycodes jfaceresources getstring page_up touppercase page_up localizedkeycodes jfaceresources getstring page_down touppercase page_down localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase initializes the internal key string table private static void init key strings key strings new hash map 40 key strings put new integer 8 j face resources get string backspace non nls 1 key strings put new integer 9 j face resources get string tab non nls 1 key strings put new integer 13 j face resources get string return non nls 1 key strings put new integer 13 j face resources get string enter non nls 1 key strings put new integer 27 j face resources get string escape non nls 1 key strings put new integer 27 j face resources get string esc non nls 1 key strings put new integer 127 j face resources get string delete non nls 1 key strings put new integer j face resources get string space non nls 1 key strings put new integer swt arrow up j face resources get string arrow up non nls 1 key strings put new integer swt arrow down j face resources get string arrow down non nls 1 key strings put new integer swt arrow left j face resources get string arrow left non nls 1 key strings put new integer swt arrow right j face resources get string arrow right non nls 1 key strings put new integer swt page up j face resources get string page up non nls 1 key strings put new integer swt page down j face resources get string page down non nls 1 key strings put new integer swt home j face resources get string home non nls 1 key strings put new integer swt end j face resources get string end non nls 1 key strings put new integer swt insert j face resources get string insert non nls 1 key strings put new integer swt f1 j face resources get string f1 non nls 1 key strings put new integer swt f2 j face resources get string f2 non nls 1 key strings put new integer swt f3 j face resources get string f3 non nls 1 key strings put new integer swt f4 j face resources get string f4 non nls 1 key strings put new integer swt f5 j face resources get string f5 non nls 1 key strings put new integer swt f6 j face resources get string f6 non nls 1 key strings put new integer swt f7 j face resources get string f7 non nls 1 key strings put new integer swt f8 j face resources get string f8 non nls 1 key strings put new integer swt f9 j face resources get string f9 non nls 1 key strings put new integer swt f10 j face resources get string f10 non nls 1 key strings put new integer swt f11 j face resources get string f11 non nls 1 key strings put new integer swt f12 j face resources get string f12 non nls 1 initkeystrings keystrings hashmap keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings arrow_up jfaceresources getstring arrow_up keystrings arrow_down jfaceresources getstring arrow_down keystrings arrow_left jfaceresources getstring arrow_left keystrings arrow_right jfaceresources getstring arrow_right keystrings page_up jfaceresources getstring page_up keystrings page_down jfaceresources getstring page_down keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring method declared on i action public boolean is checked return value val toggle btn on value val radio btn on iaction ischecked val_toggle_btn_on val_radio_btn_on method declared on i action public boolean is enabled return enabled iaction isenabled method declared on i action public boolean is handled return true iaction ishandled convenience method for removing any optional accelerator text from the given string the accelerator text appears at the end of the text and is separated from the main part by a single tab character code t code param text the text return the text sans accelerator public static string remove accelerator text string text int index text last index of t if index 1 index text last index of if index 0 return text substring 0 index return text removeacceleratortext lastindexof lastindexof convenience method for removing any mnemonics from the given string for example code remove mnemonics open code will return code open code param text the text return the text sans mnemonics since 3 0 public static string remove mnemonics string text int index text index of if index 1 return text int len text length string buffer sb new string buffer len int last index 0 while index 1 ignore at the end if index len 1 break handle the case if text char at index 1 index dbcs languages use x format if index 0 text char at index 1 text length index 3 text char at index 2 sb append text substring last index index 1 index 3 else sb append text substring last index index skip the index last index index index text index of index if last index len sb append text substring last index len return sb to string removemnemonics removemnemonics indexof stringbuffer stringbuffer lastindex charat charat charat lastindex lastindex lastindex indexof lastindex lastindex tostring method declared on i action public void remove property change listener i property change listener listener listeners remove listener iaction removepropertychangelistener ipropertychangelistener the default implementation of this code i action code method does nothing subclasses should override this method if they do not need information from the triggering event or override code run with event event code if they do public void run do nothing iaction runwithevent the default implementation of this code i action code method ignores the event argument and simply calls code run code subclasses should override this method if they need information from the triggering event or override code run code if not param event the swt event which triggered this action being run since 2 0 public void run with event event event run iaction runwithevent method declared on i action public void set action definition id string id action definition id id iaction setactiondefinitionid actiondefinitionid public void set checked boolean checked object new value null for backward compatibility if the style is not set yet then convert it to a toggle button if value null value val toggle btn on value val toggle btn off new value checked val toggle btn on val toggle btn off else if value val radio btn on value val radio btn off new value checked val radio btn on val radio btn off else some other style already so do nothing return if new value value value new value if checked fire property change checked boolean false boolean true else fire property change checked boolean true boolean false setchecked newvalue val_toggle_btn_on val_toggle_btn_off newvalue val_toggle_btn_on val_toggle_btn_off val_radio_btn_on val_radio_btn_off newvalue val_radio_btn_on val_radio_btn_off newvalue newvalue firepropertychange firepropertychange public void set description string text if description null text null description null text null description null text null text equals description string old description description description text fire property change description old description description setdescription olddescription firepropertychange olddescription public void set disabled image descriptor image descriptor new image if disabled image new image image descriptor old image disabled image disabled image new image fire property change image old image new image setdisabledimagedescriptor imagedescriptor newimage disabledimage newimage imagedescriptor oldimage disabledimage disabledimage newimage firepropertychange oldimage newimage public void set enabled boolean enabled if enabled this enabled boolean old val this enabled boolean true boolean false boolean new val enabled boolean true boolean false this enabled enabled fire property change enabled old val new val setenabled oldval newval firepropertychange oldval newval method declared on i action public void set help listener help listener listener help listener listener iaction sethelplistener helplistener helplistener public void set hover image descriptor image descriptor new image if hover image new image image descriptor old image hover image hover image new image fire property change image old image new image sethoverimagedescriptor imagedescriptor newimage hoverimage newimage imagedescriptor oldimage hoverimage hoverimage newimage firepropertychange oldimage newimage method declared on i action public void set id string id this id id iaction setid public void set image descriptor image descriptor new image if image new image image descriptor old image image image new image fire property change image old image new image setimagedescriptor imagedescriptor newimage newimage imagedescriptor oldimage newimage firepropertychange oldimage newimage sets the menu creator for this action p note that if this method is called it overrides the check status p param creator the menu creator or code null code if none public void set menu creator i menu creator creator for backward compatibility if the style is not set yet then convert it to a drop down menu if value null value creator return if value instanceof i menu creator value creator null val drop down menu creator setmenucreator imenucreator imenucreator val_drop_down_menu sets the text for this action p fires a property change event for the code text code property if the text actually changes as a consequence p p the accelerator is identified by the last index of a tab character if there are no tab characters then it is identified by the last index of a character if neither then there is no accelerator text note that if you want to insert a character into the text but no accelerator you can simply insert a or a tab at the end of the text p param text the text or code null code if none public void set text string text string old text this text int old accel this accelerator this text text if text null string accelerator text extract accelerator text text if accelerator text null int new accelerator convert localized accelerator accelerator text be sure to not wipe out the accelerator if nothing found if new accelerator 0 set accelerator new accelerator if this accelerator old accel old text null this text null old text equals this text fire property change text old text this text settext oldtext oldaccel acceleratortext extractacceleratortext acceleratortext newaccelerator convertlocalizedaccelerator acceleratortext newaccelerator setaccelerator newaccelerator oldaccel oldtext oldtext firepropertychange oldtext sets the tool tip text for this action p fires a property change event for the code tool tip text code property if the tool tip text actually changes as a consequence p param tool tip text the tool tip text or code null code if none public void set tool tip text string tool tip text string old tool tip text this tool tip text if old tool tip text null tool tip text null old tool tip text equals tool tip text this tool tip text tool tip text fire property change tool tip text old tool tip text tool tip text tool_tip_text tooltiptext settooltiptext tooltiptext oldtooltiptext tooltiptext oldtooltiptext tooltiptext oldtooltiptext tooltiptext tooltiptext tooltiptext firepropertychange tool_tip_text oldtooltiptext tooltiptext see i action set accelerator int public void set accelerator int keycode this accelerator keycode iaction setaccelerator setaccelerator reports the outcome of the running of this action via the link i action result property param success code true code if the action succeeded and code false code if the action failed or was not completed see i action result since 3 0 public final void notify result boolean success avoid boolean value of boolean to allow compilation against jcl foundation bug 80059 fire property change result null success boolean true boolean false iaction iaction notifyresult valueof firepropertychange private static final i menu creator val drop down menu new i menu creator public void dispose do nothing imenucreator val_drop_down_menu imenucreator public menu get menu control parent do nothing return null getmenu public menu get menu menu parent do nothing return null getmenu creates a new action with no text and no image p configure the action later using the set methods p protected action do nothing creates a new action with the given text and no image calls the zero arg constructor then code set text code param text the string used as the text for the action or code null code if there is no text see set text protected action string text this set text text settext settext settext creates a new action with the given text and image calls the zero arg constructor then code set text code and code set image descriptor code param text the action s text or code null code if there is no text param image the action s image or code null code if there is no image see set text see set image descriptor protected action string text image descriptor image this text set image descriptor image settext setimagedescriptor settext setimagedescriptor imagedescriptor setimagedescriptor creates a new action with the given text and style param text the action s text or code null code if there is no text param style one of code as push button code code as check box code code as drop down menu code code as radio button code and code as unspecified code protected action string text int style this text switch style case as push button value val push btn break case as check box value val toggle btn off break case as drop down menu value val drop down menu break case as radio button value val radio btn off break as_push_button as_check_box as_drop_down_menu as_radio_button as_unspecified as_push_button val_push_btn as_check_box val_toggle_btn_off as_drop_down_menu val_drop_down_menu as_radio_button val_radio_btn_off method declared on i action public void add property change listener i property change listener listener listeners add listener iaction addpropertychangelistener ipropertychangelistener parses the given accelerator text and converts it to an accelerator key code support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml param accelerator text the accelerator text localized to the current locale return the swt key code or 0 if there is no accelerator private static int convert localized accelerator string accelerator text int accelerator 0 string tokenizer stok new string tokenizer accelerator text non nls 1 int key code 1 boolean has more tokens stok has more tokens while has more tokens string token stok next token has more tokens stok has more tokens every token except the last must be one of the modifiers ctrl shift alt or command if has more tokens int modifier find localized modifier token if modifier 0 accelerator modifier else leave if there are none return 0 else key code find localized key code token if key code 1 accelerator key code return accelerator setaccelerator acceleratortext convertlocalizedaccelerator acceleratortext stringtokenizer stringtokenizer acceleratortext keycode hasmoretokens hasmoretokens hasmoretokens nexttoken hasmoretokens hasmoretokens hasmoretokens findlocalizedmodifier keycode findlocalizedkeycode keycode keycode parses the given accelerator text and converts it to an accelerator key code param accelerator text the accelerator text return the swt key code or 0 if there is no accelerator public static int convert accelerator string accelerator text int accelerator 0 string tokenizer stok new string tokenizer accelerator text non nls 1 int key code 1 boolean has more tokens stok has more tokens while has more tokens string token stok next token has more tokens stok has more tokens every token except the last must be one of the modifiers ctrl shift alt or command if has more tokens int modifier find modifier token if modifier 0 accelerator modifier else leave if there are none return 0 else key code find key code token if key code 1 accelerator key code return accelerator acceleratortext convertaccelerator acceleratortext stringtokenizer stringtokenizer acceleratortext keycode hasmoretokens hasmoretokens hasmoretokens nexttoken hasmoretokens hasmoretokens hasmoretokens findmodifier keycode findkeycode keycode keycode converts an accelerator key code to a string representation param key code the key code to be translated return a string representation of the key code public static string convert accelerator int key code string modifier get modifier string key code string full key if modifier equals non nls 1 full key find key string key code else full key modifier find key string key code non nls 1 return full key keycode convertaccelerator keycode getmodifierstring keycode fullkey fullkey findkeystring keycode fullkey findkeystring keycode fullkey private static string get modifier string int key code string mod string non nls 1 if key code swt ctrl 0 mod string find modifier string key code swt ctrl if key code swt alt 0 if mod string equals non nls 1 mod string find modifier string key code swt alt else mod string mod string find modifier string key code swt alt non nls 1 if key code swt shift 0 if mod string equals non nls 1 mod string find modifier string key code swt shift else mod string mod string find modifier string key code swt shift non nls 1 if key code swt command 0 if mod string equals non nls 1 mod string find modifier string key code swt command else mod string mod string find modifier string key code swt command non nls 1 return mod string getmodifierstring keycode modstring keycode modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode modstring extracts the accelerator text from the given text returns code null code if there is no accelerator text and the empty string if there is no text after the accelerator delimeter tab or param text the text for the action return the accelerator text or code null code private static string extract accelerator text string text int index text last index of t if index 1 index text last index of if index 0 return text substring index 1 return null extractacceleratortext lastindexof lastindexof maps a standard keyboard key name to an swt key code key names are converted to upper case before comparison if the key name is a single letter for example s its character code is returned p the following key names are known case is ignored ul li code backspace code li li code tab code li li code return code li li code enter code li li code esc code li li code escape code li li code delete code li li code space code li li code arrow up code code arrow down code code arrow left code and code arrow right code li li code page up code and code page down code li li code home code li li code end code li li code insert code li li code f1 code code f2 code through code f12 code li ul p param token the key name return the swt key code code 1 code if no match was found see swt public static int find key code string token if key codes null init key codes token token to upper case integer i integer key codes get token if i null return i int value if token length 1 return token char at 0 return 1 arrow_up arrow_down arrow_left arrow_right page_up page_down findkeycode keycodes initkeycodes touppercase keycodes intvalue charat find the supplied code for a localized key as find key code but localized to the current locale support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml param token the localized key name return the swt key code code 1 code if no match was found see find key code private static int find localized key code string token if localized key codes null init localized key codes token token to upper case integer i integer localized key codes get token if i null return i int value if token length 1 return token char at 0 return 1 findkeycode setaccelerator findkeycode findlocalizedkeycode localizedkeycodes initlocalizedkeycodes touppercase localizedkeycodes intvalue charat maps an swt key code to a standard keyboard key name the key code is stripped of modifiers swt ctrl swt alt swt shift and swt command if the key code is not an swt code for example if it a key code for the key s a string containing a character representation of the key code is returned param key code the key code to be translated return the string representation of the key code see swt since 2 0 public static string find key string int key code if key strings null init key strings int i key code swt ctrl swt alt swt shift swt command integer integer new integer i string result string key strings get integer if result null return result result new string new char char i return result keycode findkeystring keycode keystrings initkeystrings keycode keystrings maps standard keyboard modifier key names to the corresponding swt modifier bit the following modifier key names are recognized case is ignored code ctrl code code shift code code alt code and code command code the given modifier key name is converted to upper case before comparison param token the modifier key name return the swt modifier bit or code 0 code if no match was found see swt public static int find modifier string token token token to upper case if token equals ctrl non nls 1 return swt ctrl if token equals shift non nls 1 return swt shift if token equals alt non nls 1 return swt alt if token equals command non nls 1 return swt command return 0 findmodifier touppercase maps the localized modifier names to a code in the same manner as find modifier support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml see find modifier private static int find localized modifier string token if localized ctrl null init localized modifiers token token to upper case if token equals localized ctrl non nls 1 return swt ctrl if token equals localized shift non nls 1 return swt shift if token equals localized alt non nls 1 return swt alt if token equals localized command non nls 1 return swt command return 0 findmodifier setaccelerator findmodifier findlocalizedmodifier localized_ctrl initlocalizedmodifiers touppercase localized_ctrl localized_shift localized_alt localized_command initialize the list of localized modifiers private static void init localized modifiers localized ctrl j face resources get string ctrl to upper case non nls 1 localized shift j face resources get string shift to upper case non nls 1 localized alt j face resources get string alt to upper case non nls 1 localized command j face resources get string command to upper case non nls 1 initlocalizedmodifiers localized_ctrl jfaceresources getstring touppercase localized_shift jfaceresources getstring touppercase localized_alt jfaceresources getstring touppercase localized_command jfaceresources getstring touppercase returns a string representation of an swt modifier bit swt ctrl swt alt swt shift and swt command returns code null code if the key code is not an swt modifier bit param key code the swt modifier bit to be translated return the string representation of the swt modifier bit or code null code if the key code was not an swt modifier bit see swt since 2 0 public static string find modifier string int key code if key code swt ctrl return j face resources get string ctrl non nls 1 if key code swt alt return j face resources get string alt non nls 1 if key code swt shift return j face resources get string shift non nls 1 if key code swt command return j face resources get string command non nls 1 return null keycode findmodifierstring keycode keycode jfaceresources getstring keycode jfaceresources getstring keycode jfaceresources getstring keycode jfaceresources getstring notifies any property change listeners that a property has changed only listeners registered at the time this method is called are notified this method avoids creating an event object if there are no listeners registered but calls code fire property change property change event code if there are param property name the name of the property that has changed param old value the old value of the property or code null code if none param new value the new value of the property or code null code if none see i property change listener property change protected void fire property change string property name object old value object new value if listeners is empty fire property change new property change event this property name old value new value firepropertychange propertychangeevent propertyname oldvalue newvalue ipropertychangelistener propertychange firepropertychange propertyname oldvalue newvalue isempty firepropertychange propertychangeevent propertyname oldvalue newvalue notifies any property change listeners that a property has changed only listeners registered at the time this method is called are notified param event the property change event see i property change listener property change protected void fire property change property change event event object list this listeners get listeners for int i 0 i list length i i property change listener list i property change event ipropertychangelistener propertychange firepropertychange propertychangeevent getlisteners ipropertychangelistener propertychange method declared on i action public int get accelerator return accelerator iaction getaccelerator public string get action definition id return action definition id getactiondefinitionid actiondefinitionid public string get description if description null return description return get tool tip text getdescription gettooltiptext method declared on i action public image descriptor get disabled image descriptor return disabled image iaction imagedescriptor getdisabledimagedescriptor disabledimage method declared on i action public help listener get help listener return help listener iaction helplistener gethelplistener helplistener method declared on i action public image descriptor get hover image descriptor return hover image iaction imagedescriptor gethoverimagedescriptor hoverimage method declared on i action public string get id return id iaction getid method declared on i action public image descriptor get image descriptor return image iaction imagedescriptor getimagedescriptor public i menu creator get menu creator the default drop down menu value is only used to mark this action requested style so do not return it for backward compatibility reasons if value val drop down menu return null if value instanceof i menu creator return i menu creator value return null imenucreator getmenucreator val_drop_down_menu imenucreator imenucreator public int get style infer the style from the value field if value val push btn value null return as push button if value val toggle btn on value val toggle btn off return as check box if value val radio btn on value val radio btn off return as radio button if value instanceof i menu creator return as drop down menu we should never get to this line return as push button getstyle val_push_btn as_push_button val_toggle_btn_on val_toggle_btn_off as_check_box val_radio_btn_on val_radio_btn_off as_radio_button imenucreator as_drop_down_menu as_push_button method declared on i action public string get text return text iaction gettext method declared on i action public string get tool tip text return tool tip text iaction gettooltiptext tooltiptext initializes the internal key code table private static void init key codes key codes new hash map 40 key codes put backspace new integer 8 non nls 1 key codes put tab new integer 9 non nls 1 key codes put return new integer 13 non nls 1 key codes put enter new integer 13 non nls 1 key codes put escape new integer 27 non nls 1 key codes put esc new integer 27 non nls 1 key codes put delete new integer 127 non nls 1 key codes put space new integer non nls 1 key codes put arrow up new integer swt arrow up non nls 1 key codes put arrow down new integer swt arrow down non nls 1 key codes put arrow left new integer swt arrow left non nls 1 key codes put arrow right new integer swt arrow right non nls 1 key codes put page up new integer swt page up non nls 1 key codes put page down new integer swt page down non nls 1 key codes put home new integer swt home non nls 1 key codes put end new integer swt end non nls 1 key codes put insert new integer swt insert non nls 1 key codes put f1 new integer swt f1 non nls 1 key codes put f2 new integer swt f2 non nls 1 key codes put f3 new integer swt f3 non nls 1 key codes put f4 new integer swt f4 non nls 1 key codes put f5 new integer swt f5 non nls 1 key codes put f6 new integer swt f6 non nls 1 key codes put f7 new integer swt f7 non nls 1 key codes put f8 new integer swt f8 non nls 1 key codes put f9 new integer swt f9 non nls 1 key codes put f10 new integer swt f10 non nls 1 key codes put f11 new integer swt f11 non nls 1 key codes put f12 new integer swt f12 non nls 1 initkeycodes keycodes hashmap keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes arrow_up arrow_up keycodes arrow_down arrow_down keycodes arrow_left arrow_left keycodes arrow_right arrow_right keycodes page_up page_up keycodes page_down page_down keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes initializes the localized internal key code table private static void init localized key codes localized key codes new hash map 40 localized key codes put j face resources get string backspace to upper case new integer 8 non nls 1 localized key codes put j face resources get string tab to upper case new integer 9 non nls 1 localized key codes put j face resources get string return to upper case new integer 13 non nls 1 localized key codes put j face resources get string enter to upper case new integer 13 non nls 1 localized key codes put j face resources get string escape to upper case new integer 27 non nls 1 localized key codes put j face resources get string esc to upper case new integer 27 non nls 1 localized key codes put j face resources get string delete to upper case new integer 127 non nls 1 localized key codes put j face resources get string space to upper case new integer non nls 1 localized key codes put j face resources get string arrow up to upper case new integer swt arrow up non nls 1 localized key codes put j face resources get string arrow down to upper case new integer swt arrow down non nls 1 localized key codes put j face resources get string arrow left to upper case new integer swt arrow left non nls 1 localized key codes put j face resources get string arrow right to upper case new integer swt arrow right non nls 1 localized key codes put j face resources get string page up to upper case new integer swt page up non nls 1 localized key codes put j face resources get string page down to upper case new integer swt page down non nls 1 localized key codes put j face resources get string home to upper case new integer swt home non nls 1 localized key codes put j face resources get string end to upper case new integer swt end non nls 1 localized key codes put j face resources get string insert to upper case new integer swt insert non nls 1 localized key codes put j face resources get string f1 to upper case new integer swt f1 non nls 1 localized key codes put j face resources get string f2 to upper case new integer swt f2 non nls 1 localized key codes put j face resources get string f3 to upper case new integer swt f3 non nls 1 localized key codes put j face resources get string f4 to upper case new integer swt f4 non nls 1 localized key codes put j face resources get string f5 to upper case new integer swt f5 non nls 1 localized key codes put j face resources get string f6 to upper case new integer swt f6 non nls 1 localized key codes put j face resources get string f7 to upper case new integer swt f7 non nls 1 localized key codes put j face resources get string f8 to upper case new integer swt f8 non nls 1 localized key codes put j face resources get string f9 to upper case new integer swt f9 non nls 1 localized key codes put j face resources get string f10 to upper case new integer swt f10 non nls 1 localized key codes put j face resources get string f11 to upper case new integer swt f11 non nls 1 localized key codes put j face resources get string f12 to upper case new integer swt f12 non nls 1 initlocalizedkeycodes localizedkeycodes hashmap localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring arrow_up touppercase arrow_up localizedkeycodes jfaceresources getstring arrow_down touppercase arrow_down localizedkeycodes jfaceresources getstring arrow_left touppercase arrow_left localizedkeycodes jfaceresources getstring arrow_right touppercase arrow_right localizedkeycodes jfaceresources getstring page_up touppercase page_up localizedkeycodes jfaceresources getstring page_down touppercase page_down localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase initializes the internal key string table private static void init key strings key strings new hash map 40 key strings put new integer 8 j face resources get string backspace non nls 1 key strings put new integer 9 j face resources get string tab non nls 1 key strings put new integer 13 j face resources get string return non nls 1 key strings put new integer 13 j face resources get string enter non nls 1 key strings put new integer 27 j face resources get string escape non nls 1 key strings put new integer 27 j face resources get string esc non nls 1 key strings put new integer 127 j face resources get string delete non nls 1 key strings put new integer j face resources get string space non nls 1 key strings put new integer swt arrow up j face resources get string arrow up non nls 1 key strings put new integer swt arrow down j face resources get string arrow down non nls 1 key strings put new integer swt arrow left j face resources get string arrow left non nls 1 key strings put new integer swt arrow right j face resources get string arrow right non nls 1 key strings put new integer swt page up j face resources get string page up non nls 1 key strings put new integer swt page down j face resources get string page down non nls 1 key strings put new integer swt home j face resources get string home non nls 1 key strings put new integer swt end j face resources get string end non nls 1 key strings put new integer swt insert j face resources get string insert non nls 1 key strings put new integer swt f1 j face resources get string f1 non nls 1 key strings put new integer swt f2 j face resources get string f2 non nls 1 key strings put new integer swt f3 j face resources get string f3 non nls 1 key strings put new integer swt f4 j face resources get string f4 non nls 1 key strings put new integer swt f5 j face resources get string f5 non nls 1 key strings put new integer swt f6 j face resources get string f6 non nls 1 key strings put new integer swt f7 j face resources get string f7 non nls 1 key strings put new integer swt f8 j face resources get string f8 non nls 1 key strings put new integer swt f9 j face resources get string f9 non nls 1 key strings put new integer swt f10 j face resources get string f10 non nls 1 key strings put new integer swt f11 j face resources get string f11 non nls 1 key strings put new integer swt f12 j face resources get string f12 non nls 1 initkeystrings keystrings hashmap keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings arrow_up jfaceresources getstring arrow_up keystrings arrow_down jfaceresources getstring arrow_down keystrings arrow_left jfaceresources getstring arrow_left keystrings arrow_right jfaceresources getstring arrow_right keystrings page_up jfaceresources getstring page_up keystrings page_down jfaceresources getstring page_down keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring method declared on i action public boolean is checked return value val toggle btn on value val radio btn on iaction ischecked val_toggle_btn_on val_radio_btn_on method declared on i action public boolean is enabled return enabled iaction isenabled method declared on i action public boolean is handled return true iaction ishandled convenience method for removing any optional accelerator text from the given string the accelerator text appears at the end of the text and is separated from the main part by a single tab character code t code param text the text return the text sans accelerator public static string remove accelerator text string text int index text last index of t if index 1 index text last index of if index 0 return text substring 0 index return text removeacceleratortext lastindexof lastindexof convenience method for removing any mnemonics from the given string for example code remove mnemonics open code will return code open code param text the text return the text sans mnemonics since 3 0 public static string remove mnemonics string text int index text index of if index 1 return text int len text length string buffer sb new string buffer len int last index 0 while index 1 ignore at the end if index len 1 break handle the case if text char at index 1 index dbcs languages use x format if index 0 text char at index 1 text length index 3 text char at index 2 sb append text substring last index index 1 index 3 else sb append text substring last index index skip the index last index index index text index of index if last index len sb append text substring last index len return sb to string removemnemonics removemnemonics indexof stringbuffer stringbuffer lastindex charat charat charat lastindex lastindex lastindex indexof lastindex lastindex tostring method declared on i action public void remove property change listener i property change listener listener listeners remove listener iaction removepropertychangelistener ipropertychangelistener the default implementation of this code i action code method does nothing subclasses should override this method if they do not need information from the triggering event or override code run with event event code if they do public void run do nothing iaction runwithevent the default implementation of this code i action code method ignores the event argument and simply calls code run code subclasses should override this method if they need information from the triggering event or override code run code if not param event the swt event which triggered this action being run since 2 0 public void run with event event event run iaction runwithevent method declared on i action public void set action definition id string id action definition id id iaction setactiondefinitionid actiondefinitionid public void set checked boolean checked object new value null for backward compatibility if the style is not set yet then convert it to a toggle button if value null value val toggle btn on value val toggle btn off new value checked val toggle btn on val toggle btn off else if value val radio btn on value val radio btn off new value checked val radio btn on val radio btn off else some other style already so do nothing return if new value value value new value if checked fire property change checked boolean false boolean true else fire property change checked boolean true boolean false setchecked newvalue val_toggle_btn_on val_toggle_btn_off newvalue val_toggle_btn_on val_toggle_btn_off val_radio_btn_on val_radio_btn_off newvalue val_radio_btn_on val_radio_btn_off newvalue newvalue firepropertychange firepropertychange public void set description string text if description null text null description null text null description null text null text equals description string old description description description text fire property change description old description description setdescription olddescription firepropertychange olddescription public void set disabled image descriptor image descriptor new image if disabled image new image image descriptor old image disabled image disabled image new image fire property change image old image new image setdisabledimagedescriptor imagedescriptor newimage disabledimage newimage imagedescriptor oldimage disabledimage disabledimage newimage firepropertychange oldimage newimage public void set enabled boolean enabled if enabled this enabled boolean old val this enabled boolean true boolean false boolean new val enabled boolean true boolean false this enabled enabled fire property change enabled old val new val setenabled oldval newval firepropertychange oldval newval method declared on i action public void set help listener help listener listener help listener listener iaction sethelplistener helplistener helplistener public void set hover image descriptor image descriptor new image if hover image new image image descriptor old image hover image hover image new image fire property change image old image new image sethoverimagedescriptor imagedescriptor newimage hoverimage newimage imagedescriptor oldimage hoverimage hoverimage newimage firepropertychange oldimage newimage method declared on i action public void set id string id this id id iaction setid public void set image descriptor image descriptor new image if image new image image descriptor old image image image new image fire property change image old image new image setimagedescriptor imagedescriptor newimage newimage imagedescriptor oldimage newimage firepropertychange oldimage newimage sets the menu creator for this action p note that if this method is called it overrides the check status p param creator the menu creator or code null code if none public void set menu creator i menu creator creator for backward compatibility if the style is not set yet then convert it to a drop down menu if value null value creator return if value instanceof i menu creator value creator null val drop down menu creator setmenucreator imenucreator imenucreator val_drop_down_menu sets the text for this action p fires a property change event for the code text code property if the text actually changes as a consequence p p the accelerator is identified by the last index of a tab character if there are no tab characters then it is identified by the last index of a character if neither then there is no accelerator text note that if you want to insert a character into the text but no accelerator you can simply insert a or a tab at the end of the text p param text the text or code null code if none public void set text string text string old text this text int old accel this accelerator this text text if text null string accelerator text extract accelerator text text if accelerator text null int new accelerator convert localized accelerator accelerator text be sure to not wipe out the accelerator if nothing found if new accelerator 0 set accelerator new accelerator if this accelerator old accel old text null this text null old text equals this text fire property change text old text this text settext oldtext oldaccel acceleratortext extractacceleratortext acceleratortext newaccelerator convertlocalizedaccelerator acceleratortext newaccelerator setaccelerator newaccelerator oldaccel oldtext oldtext firepropertychange oldtext sets the tool tip text for this action p fires a property change event for the code tool tip text code property if the tool tip text actually changes as a consequence p param tool tip text the tool tip text or code null code if none public void set tool tip text string tool tip text string old tool tip text this tool tip text if old tool tip text null tool tip text null old tool tip text equals tool tip text this tool tip text tool tip text fire property change tool tip text old tool tip text tool tip text tool_tip_text tooltiptext settooltiptext tooltiptext oldtooltiptext tooltiptext oldtooltiptext tooltiptext oldtooltiptext tooltiptext tooltiptext tooltiptext firepropertychange tool_tip_text oldtooltiptext tooltiptext see i action set accelerator int public void set accelerator int keycode this accelerator keycode iaction setaccelerator setaccelerator reports the outcome of the running of this action via the link i action result property param success code true code if the action succeeded and code false code if the action failed or was not completed see i action result since 3 0 public final void notify result boolean success avoid boolean value of boolean to allow compilation against jcl foundation bug 80059 fire property change result null success boolean true boolean false iaction iaction notifyresult valueof firepropertychange private static final i menu creator val drop down menu new i menu creator public void dispose do nothing imenucreator val_drop_down_menu imenucreator public menu get menu control parent do nothing return null getmenu public menu get menu menu parent do nothing return null getmenu creates a new action with no text and no image p configure the action later using the set methods p protected action do nothing creates a new action with the given text and no image calls the zero arg constructor then code set text code param text the string used as the text for the action or code null code if there is no text see set text protected action string text this set text text settext settext settext creates a new action with the given text and image calls the zero arg constructor then code set text code and code set image descriptor code param text the action s text or code null code if there is no text param image the action s image or code null code if there is no image see set text see set image descriptor protected action string text image descriptor image this text set image descriptor image settext setimagedescriptor settext setimagedescriptor imagedescriptor setimagedescriptor creates a new action with the given text and style param text the action s text or code null code if there is no text param style one of code as push button code code as check box code code as drop down menu code code as radio button code and code as unspecified code protected action string text int style this text switch style case as push button value val push btn break case as check box value val toggle btn off break case as drop down menu value val drop down menu break case as radio button value val radio btn off break as_push_button as_check_box as_drop_down_menu as_radio_button as_unspecified as_push_button val_push_btn as_check_box val_toggle_btn_off as_drop_down_menu val_drop_down_menu as_radio_button val_radio_btn_off method declared on i action public void add property change listener i property change listener listener listeners add listener iaction addpropertychangelistener ipropertychangelistener parses the given accelerator text and converts it to an accelerator key code support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml param accelerator text the accelerator text localized to the current locale return the swt key code or 0 if there is no accelerator private static int convert localized accelerator string accelerator text int accelerator 0 string tokenizer stok new string tokenizer accelerator text non nls 1 int key code 1 boolean has more tokens stok has more tokens while has more tokens string token stok next token has more tokens stok has more tokens every token except the last must be one of the modifiers ctrl shift alt or command if has more tokens int modifier find localized modifier token if modifier 0 accelerator modifier else leave if there are none return 0 else key code find localized key code token if key code 1 accelerator key code return accelerator setaccelerator acceleratortext convertlocalizedaccelerator acceleratortext stringtokenizer stringtokenizer acceleratortext keycode hasmoretokens hasmoretokens hasmoretokens nexttoken hasmoretokens hasmoretokens hasmoretokens findlocalizedmodifier keycode findlocalizedkeycode keycode keycode parses the given accelerator text and converts it to an accelerator key code param accelerator text the accelerator text return the swt key code or 0 if there is no accelerator public static int convert accelerator string accelerator text int accelerator 0 string tokenizer stok new string tokenizer accelerator text non nls 1 int key code 1 boolean has more tokens stok has more tokens while has more tokens string token stok next token has more tokens stok has more tokens every token except the last must be one of the modifiers ctrl shift alt or command if has more tokens int modifier find modifier token if modifier 0 accelerator modifier else leave if there are none return 0 else key code find key code token if key code 1 accelerator key code return accelerator acceleratortext convertaccelerator acceleratortext stringtokenizer stringtokenizer acceleratortext keycode hasmoretokens hasmoretokens hasmoretokens nexttoken hasmoretokens hasmoretokens hasmoretokens findmodifier keycode findkeycode keycode keycode converts an accelerator key code to a string representation param key code the key code to be translated return a string representation of the key code public static string convert accelerator int key code string modifier get modifier string key code string full key if modifier equals non nls 1 full key find key string key code else full key modifier find key string key code non nls 1 return full key keycode convertaccelerator keycode getmodifierstring keycode fullkey fullkey findkeystring keycode fullkey findkeystring keycode fullkey private static string get modifier string int key code string mod string non nls 1 if key code swt ctrl 0 mod string find modifier string key code swt ctrl if key code swt alt 0 if mod string equals non nls 1 mod string find modifier string key code swt alt else mod string mod string find modifier string key code swt alt non nls 1 if key code swt shift 0 if mod string equals non nls 1 mod string find modifier string key code swt shift else mod string mod string find modifier string key code swt shift non nls 1 if key code swt command 0 if mod string equals non nls 1 mod string find modifier string key code swt command else mod string mod string find modifier string key code swt command non nls 1 return mod string getmodifierstring keycode modstring keycode modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode modstring extracts the accelerator text from the given text returns code null code if there is no accelerator text and the empty string if there is no text after the accelerator delimeter tab or param text the text for the action return the accelerator text or code null code private static string extract accelerator text string text int index text last index of t if index 1 index text last index of if index 0 return text substring index 1 return null extractacceleratortext lastindexof lastindexof maps a standard keyboard key name to an swt key code key names are converted to upper case before comparison if the key name is a single letter for example s its character code is returned p the following key names are known case is ignored ul li code backspace code li li code tab code li li code return code li li code enter code li li code esc code li li code escape code li li code delete code li li code space code li li code arrow up code code arrow down code code arrow left code and code arrow right code li li code page up code and code page down code li li code home code li li code end code li li code insert code li li code f1 code code f2 code through code f12 code li ul p param token the key name return the swt key code code 1 code if no match was found see swt public static int find key code string token if key codes null init key codes token token to upper case integer i integer key codes get token if i null return i int value if token length 1 return token char at 0 return 1 arrow_up arrow_down arrow_left arrow_right page_up page_down findkeycode keycodes initkeycodes touppercase keycodes intvalue charat find the supplied code for a localized key as find key code but localized to the current locale support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml param token the localized key name return the swt key code code 1 code if no match was found see find key code private static int find localized key code string token if localized key codes null init localized key codes token token to upper case integer i integer localized key codes get token if i null return i int value if token length 1 return token char at 0 return 1 findkeycode setaccelerator findkeycode findlocalizedkeycode localizedkeycodes initlocalizedkeycodes touppercase localizedkeycodes intvalue charat maps an swt key code to a standard keyboard key name the key code is stripped of modifiers swt ctrl swt alt swt shift and swt command if the key code is not an swt code for example if it a key code for the key s a string containing a character representation of the key code is returned param key code the key code to be translated return the string representation of the key code see swt since 2 0 public static string find key string int key code if key strings null init key strings int i key code swt ctrl swt alt swt shift swt command integer integer new integer i string result string key strings get integer if result null return result result new string new char char i return result keycode findkeystring keycode keystrings initkeystrings keycode keystrings maps standard keyboard modifier key names to the corresponding swt modifier bit the following modifier key names are recognized case is ignored code ctrl code code shift code code alt code and code command code the given modifier key name is converted to upper case before comparison param token the modifier key name return the swt modifier bit or code 0 code if no match was found see swt public static int find modifier string token token token to upper case if token equals ctrl non nls 1 return swt ctrl if token equals shift non nls 1 return swt shift if token equals alt non nls 1 return swt alt if token equals command non nls 1 return swt command return 0 findmodifier touppercase maps the localized modifier names to a code in the same manner as find modifier support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml see find modifier private static int find localized modifier string token if localized ctrl null init localized modifiers token token to upper case if token equals localized ctrl non nls 1 return swt ctrl if token equals localized shift non nls 1 return swt shift if token equals localized alt non nls 1 return swt alt if token equals localized command non nls 1 return swt command return 0 findmodifier setaccelerator findmodifier findlocalizedmodifier localized_ctrl initlocalizedmodifiers touppercase localized_ctrl localized_shift localized_alt localized_command initialize the list of localized modifiers private static void init localized modifiers localized ctrl j face resources get string ctrl to upper case non nls 1 localized shift j face resources get string shift to upper case non nls 1 localized alt j face resources get string alt to upper case non nls 1 localized command j face resources get string command to upper case non nls 1 initlocalizedmodifiers localized_ctrl jfaceresources getstring touppercase localized_shift jfaceresources getstring touppercase localized_alt jfaceresources getstring touppercase localized_command jfaceresources getstring touppercase returns a string representation of an swt modifier bit swt ctrl swt alt swt shift and swt command returns code null code if the key code is not an swt modifier bit param key code the swt modifier bit to be translated return the string representation of the swt modifier bit or code null code if the key code was not an swt modifier bit see swt since 2 0 public static string find modifier string int key code if key code swt ctrl return j face resources get string ctrl non nls 1 if key code swt alt return j face resources get string alt non nls 1 if key code swt shift return j face resources get string shift non nls 1 if key code swt command return j face resources get string command non nls 1 return null keycode findmodifierstring keycode keycode jfaceresources getstring keycode jfaceresources getstring keycode jfaceresources getstring keycode jfaceresources getstring notifies any property change listeners that a property has changed only listeners registered at the time this method is called are notified this method avoids creating an event object if there are no listeners registered but calls code fire property change property change event code if there are param property name the name of the property that has changed param old value the old value of the property or code null code if none param new value the new value of the property or code null code if none see i property change listener property change protected void fire property change string property name object old value object new value if listeners is empty fire property change new property change event this property name old value new value firepropertychange propertychangeevent propertyname oldvalue newvalue ipropertychangelistener propertychange firepropertychange propertyname oldvalue newvalue isempty firepropertychange propertychangeevent propertyname oldvalue newvalue notifies any property change listeners that a property has changed only listeners registered at the time this method is called are notified param event the property change event see i property change listener property change protected void fire property change property change event event object list this listeners get listeners for int i 0 i list length i i property change listener list i property change event ipropertychangelistener propertychange firepropertychange propertychangeevent getlisteners ipropertychangelistener propertychange method declared on i action public int get accelerator return accelerator iaction getaccelerator public string get action definition id return action definition id getactiondefinitionid actiondefinitionid public string get description if description null return description return get tool tip text getdescription gettooltiptext method declared on i action public image descriptor get disabled image descriptor return disabled image iaction imagedescriptor getdisabledimagedescriptor disabledimage method declared on i action public help listener get help listener return help listener iaction helplistener gethelplistener helplistener method declared on i action public image descriptor get hover image descriptor return hover image iaction imagedescriptor gethoverimagedescriptor hoverimage method declared on i action public string get id return id iaction getid method declared on i action public image descriptor get image descriptor return image iaction imagedescriptor getimagedescriptor public i menu creator get menu creator the default drop down menu value is only used to mark this action requested style so do not return it for backward compatibility reasons if value val drop down menu return null if value instanceof i menu creator return i menu creator value return null imenucreator getmenucreator val_drop_down_menu imenucreator imenucreator public int get style infer the style from the value field if value val push btn value null return as push button if value val toggle btn on value val toggle btn off return as check box if value val radio btn on value val radio btn off return as radio button if value instanceof i menu creator return as drop down menu we should never get to this line return as push button getstyle val_push_btn as_push_button val_toggle_btn_on val_toggle_btn_off as_check_box val_radio_btn_on val_radio_btn_off as_radio_button imenucreator as_drop_down_menu as_push_button method declared on i action public string get text return text iaction gettext method declared on i action public string get tool tip text return tool tip text iaction gettooltiptext tooltiptext initializes the internal key code table private static void init key codes key codes new hash map 40 key codes put backspace new integer 8 non nls 1 key codes put tab new integer 9 non nls 1 key codes put return new integer 13 non nls 1 key codes put enter new integer 13 non nls 1 key codes put escape new integer 27 non nls 1 key codes put esc new integer 27 non nls 1 key codes put delete new integer 127 non nls 1 key codes put space new integer non nls 1 key codes put arrow up new integer swt arrow up non nls 1 key codes put arrow down new integer swt arrow down non nls 1 key codes put arrow left new integer swt arrow left non nls 1 key codes put arrow right new integer swt arrow right non nls 1 key codes put page up new integer swt page up non nls 1 key codes put page down new integer swt page down non nls 1 key codes put home new integer swt home non nls 1 key codes put end new integer swt end non nls 1 key codes put insert new integer swt insert non nls 1 key codes put f1 new integer swt f1 non nls 1 key codes put f2 new integer swt f2 non nls 1 key codes put f3 new integer swt f3 non nls 1 key codes put f4 new integer swt f4 non nls 1 key codes put f5 new integer swt f5 non nls 1 key codes put f6 new integer swt f6 non nls 1 key codes put f7 new integer swt f7 non nls 1 key codes put f8 new integer swt f8 non nls 1 key codes put f9 new integer swt f9 non nls 1 key codes put f10 new integer swt f10 non nls 1 key codes put f11 new integer swt f11 non nls 1 key codes put f12 new integer swt f12 non nls 1 initkeycodes keycodes hashmap keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes arrow_up arrow_up keycodes arrow_down arrow_down keycodes arrow_left arrow_left keycodes arrow_right arrow_right keycodes page_up page_up keycodes page_down page_down keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes initializes the localized internal key code table private static void init localized key codes localized key codes new hash map 40 localized key codes put j face resources get string backspace to upper case new integer 8 non nls 1 localized key codes put j face resources get string tab to upper case new integer 9 non nls 1 localized key codes put j face resources get string return to upper case new integer 13 non nls 1 localized key codes put j face resources get string enter to upper case new integer 13 non nls 1 localized key codes put j face resources get string escape to upper case new integer 27 non nls 1 localized key codes put j face resources get string esc to upper case new integer 27 non nls 1 localized key codes put j face resources get string delete to upper case new integer 127 non nls 1 localized key codes put j face resources get string space to upper case new integer non nls 1 localized key codes put j face resources get string arrow up to upper case new integer swt arrow up non nls 1 localized key codes put j face resources get string arrow down to upper case new integer swt arrow down non nls 1 localized key codes put j face resources get string arrow left to upper case new integer swt arrow left non nls 1 localized key codes put j face resources get string arrow right to upper case new integer swt arrow right non nls 1 localized key codes put j face resources get string page up to upper case new integer swt page up non nls 1 localized key codes put j face resources get string page down to upper case new integer swt page down non nls 1 localized key codes put j face resources get string home to upper case new integer swt home non nls 1 localized key codes put j face resources get string end to upper case new integer swt end non nls 1 localized key codes put j face resources get string insert to upper case new integer swt insert non nls 1 localized key codes put j face resources get string f1 to upper case new integer swt f1 non nls 1 localized key codes put j face resources get string f2 to upper case new integer swt f2 non nls 1 localized key codes put j face resources get string f3 to upper case new integer swt f3 non nls 1 localized key codes put j face resources get string f4 to upper case new integer swt f4 non nls 1 localized key codes put j face resources get string f5 to upper case new integer swt f5 non nls 1 localized key codes put j face resources get string f6 to upper case new integer swt f6 non nls 1 localized key codes put j face resources get string f7 to upper case new integer swt f7 non nls 1 localized key codes put j face resources get string f8 to upper case new integer swt f8 non nls 1 localized key codes put j face resources get string f9 to upper case new integer swt f9 non nls 1 localized key codes put j face resources get string f10 to upper case new integer swt f10 non nls 1 localized key codes put j face resources get string f11 to upper case new integer swt f11 non nls 1 localized key codes put j face resources get string f12 to upper case new integer swt f12 non nls 1 initlocalizedkeycodes localizedkeycodes hashmap localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring arrow_up touppercase arrow_up localizedkeycodes jfaceresources getstring arrow_down touppercase arrow_down localizedkeycodes jfaceresources getstring arrow_left touppercase arrow_left localizedkeycodes jfaceresources getstring arrow_right touppercase arrow_right localizedkeycodes jfaceresources getstring page_up touppercase page_up localizedkeycodes jfaceresources getstring page_down touppercase page_down localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase initializes the internal key string table private static void init key strings key strings new hash map 40 key strings put new integer 8 j face resources get string backspace non nls 1 key strings put new integer 9 j face resources get string tab non nls 1 key strings put new integer 13 j face resources get string return non nls 1 key strings put new integer 13 j face resources get string enter non nls 1 key strings put new integer 27 j face resources get string escape non nls 1 key strings put new integer 27 j face resources get string esc non nls 1 key strings put new integer 127 j face resources get string delete non nls 1 key strings put new integer j face resources get string space non nls 1 key strings put new integer swt arrow up j face resources get string arrow up non nls 1 key strings put new integer swt arrow down j face resources get string arrow down non nls 1 key strings put new integer swt arrow left j face resources get string arrow left non nls 1 key strings put new integer swt arrow right j face resources get string arrow right non nls 1 key strings put new integer swt page up j face resources get string page up non nls 1 key strings put new integer swt page down j face resources get string page down non nls 1 key strings put new integer swt home j face resources get string home non nls 1 key strings put new integer swt end j face resources get string end non nls 1 key strings put new integer swt insert j face resources get string insert non nls 1 key strings put new integer swt f1 j face resources get string f1 non nls 1 key strings put new integer swt f2 j face resources get string f2 non nls 1 key strings put new integer swt f3 j face resources get string f3 non nls 1 key strings put new integer swt f4 j face resources get string f4 non nls 1 key strings put new integer swt f5 j face resources get string f5 non nls 1 key strings put new integer swt f6 j face resources get string f6 non nls 1 key strings put new integer swt f7 j face resources get string f7 non nls 1 key strings put new integer swt f8 j face resources get string f8 non nls 1 key strings put new integer swt f9 j face resources get string f9 non nls 1 key strings put new integer swt f10 j face resources get string f10 non nls 1 key strings put new integer swt f11 j face resources get string f11 non nls 1 key strings put new integer swt f12 j face resources get string f12 non nls 1 initkeystrings keystrings hashmap keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings arrow_up jfaceresources getstring arrow_up keystrings arrow_down jfaceresources getstring arrow_down keystrings arrow_left jfaceresources getstring arrow_left keystrings arrow_right jfaceresources getstring arrow_right keystrings page_up jfaceresources getstring page_up keystrings page_down jfaceresources getstring page_down keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring method declared on i action public boolean is checked return value val toggle btn on value val radio btn on iaction ischecked val_toggle_btn_on val_radio_btn_on method declared on i action public boolean is enabled return enabled iaction isenabled method declared on i action public boolean is handled return true iaction ishandled convenience method for removing any optional accelerator text from the given string the accelerator text appears at the end of the text and is separated from the main part by a single tab character code t code param text the text return the text sans accelerator public static string remove accelerator text string text int index text last index of t if index 1 index text last index of if index 0 return text substring 0 index return text removeacceleratortext lastindexof lastindexof convenience method for removing any mnemonics from the given string for example code remove mnemonics open code will return code open code param text the text return the text sans mnemonics since 3 0 public static string remove mnemonics string text int index text index of if index 1 return text int len text length string buffer sb new string buffer len int last index 0 while index 1 ignore at the end if index len 1 break handle the case if text char at index 1 index dbcs languages use x format if index 0 text char at index 1 text length index 3 text char at index 2 sb append text substring last index index 1 index 3 else sb append text substring last index index skip the index last index index index text index of index if last index len sb append text substring last index len return sb to string removemnemonics removemnemonics indexof stringbuffer stringbuffer lastindex charat charat charat lastindex lastindex lastindex indexof lastindex lastindex tostring method declared on i action public void remove property change listener i property change listener listener listeners remove listener iaction removepropertychangelistener ipropertychangelistener the default implementation of this code i action code method does nothing subclasses should override this method if they do not need information from the triggering event or override code run with event event code if they do public void run do nothing iaction runwithevent the default implementation of this code i action code method ignores the event argument and simply calls code run code subclasses should override this method if they need information from the triggering event or override code run code if not param event the swt event which triggered this action being run since 2 0 public void run with event event event run iaction runwithevent method declared on i action public void set action definition id string id action definition id id iaction setactiondefinitionid actiondefinitionid public void set checked boolean checked object new value null for backward compatibility if the style is not set yet then convert it to a toggle button if value null value val toggle btn on value val toggle btn off new value checked val toggle btn on val toggle btn off else if value val radio btn on value val radio btn off new value checked val radio btn on val radio btn off else some other style already so do nothing return if new value value value new value if checked fire property change checked boolean false boolean true else fire property change checked boolean true boolean false setchecked newvalue val_toggle_btn_on val_toggle_btn_off newvalue val_toggle_btn_on val_toggle_btn_off val_radio_btn_on val_radio_btn_off newvalue val_radio_btn_on val_radio_btn_off newvalue newvalue firepropertychange firepropertychange public void set description string text if description null text null description null text null description null text null text equals description string old description description description text fire property change description old description description setdescription olddescription firepropertychange olddescription public void set disabled image descriptor image descriptor new image if disabled image new image image descriptor old image disabled image disabled image new image fire property change image old image new image setdisabledimagedescriptor imagedescriptor newimage disabledimage newimage imagedescriptor oldimage disabledimage disabledimage newimage firepropertychange oldimage newimage public void set enabled boolean enabled if enabled this enabled boolean old val this enabled boolean true boolean false boolean new val enabled boolean true boolean false this enabled enabled fire property change enabled old val new val setenabled oldval newval firepropertychange oldval newval method declared on i action public void set help listener help listener listener help listener listener iaction sethelplistener helplistener helplistener public void set hover image descriptor image descriptor new image if hover image new image image descriptor old image hover image hover image new image fire property change image old image new image sethoverimagedescriptor imagedescriptor newimage hoverimage newimage imagedescriptor oldimage hoverimage hoverimage newimage firepropertychange oldimage newimage method declared on i action public void set id string id this id id iaction setid public void set image descriptor image descriptor new image if image new image image descriptor old image image image new image fire property change image old image new image setimagedescriptor imagedescriptor newimage newimage imagedescriptor oldimage newimage firepropertychange oldimage newimage sets the menu creator for this action p note that if this method is called it overrides the check status p param creator the menu creator or code null code if none public void set menu creator i menu creator creator for backward compatibility if the style is not set yet then convert it to a drop down menu if value null value creator return if value instanceof i menu creator value creator null val drop down menu creator setmenucreator imenucreator imenucreator val_drop_down_menu sets the text for this action p fires a property change event for the code text code property if the text actually changes as a consequence p p the accelerator is identified by the last index of a tab character if there are no tab characters then it is identified by the last index of a character if neither then there is no accelerator text note that if you want to insert a character into the text but no accelerator you can simply insert a or a tab at the end of the text p param text the text or code null code if none public void set text string text string old text this text int old accel this accelerator this text text if text null string accelerator text extract accelerator text text if accelerator text null int new accelerator convert localized accelerator accelerator text be sure to not wipe out the accelerator if nothing found if new accelerator 0 set accelerator new accelerator if this accelerator old accel old text null this text null old text equals this text fire property change text old text this text settext oldtext oldaccel acceleratortext extractacceleratortext acceleratortext newaccelerator convertlocalizedaccelerator acceleratortext newaccelerator setaccelerator newaccelerator oldaccel oldtext oldtext firepropertychange oldtext sets the tool tip text for this action p fires a property change event for the code tool tip text code property if the tool tip text actually changes as a consequence p param tool tip text the tool tip text or code null code if none public void set tool tip text string tool tip text string old tool tip text this tool tip text if old tool tip text null tool tip text null old tool tip text equals tool tip text this tool tip text tool tip text fire property change tool tip text old tool tip text tool tip text tool_tip_text tooltiptext settooltiptext tooltiptext oldtooltiptext tooltiptext oldtooltiptext tooltiptext oldtooltiptext tooltiptext tooltiptext tooltiptext firepropertychange tool_tip_text oldtooltiptext tooltiptext see i action set accelerator int public void set accelerator int keycode this accelerator keycode iaction setaccelerator setaccelerator reports the outcome of the running of this action via the link i action result property param success code true code if the action succeeded and code false code if the action failed or was not completed see i action result since 3 0 public final void notify result boolean success avoid boolean value of boolean to allow compilation against jcl foundation bug 80059 fire property change result null success boolean true boolean false iaction iaction notifyresult valueof firepropertychange private static final i menu creator val drop down menu new i menu creator public void dispose do nothing imenucreator val_drop_down_menu imenucreator public menu get menu control parent do nothing return null getmenu public menu get menu menu parent do nothing return null getmenu creates a new action with no text and no image p configure the action later using the set methods p protected action do nothing creates a new action with the given text and no image calls the zero arg constructor then code set text code param text the string used as the text for the action or code null code if there is no text see set text protected action string text this set text text settext settext settext creates a new action with the given text and image calls the zero arg constructor then code set text code and code set image descriptor code param text the action s text or code null code if there is no text param image the action s image or code null code if there is no image see set text see set image descriptor protected action string text image descriptor image this text set image descriptor image settext setimagedescriptor settext setimagedescriptor imagedescriptor setimagedescriptor creates a new action with the given text and style param text the action s text or code null code if there is no text param style one of code as push button code code as check box code code as drop down menu code code as radio button code and code as unspecified code protected action string text int style this text switch style case as push button value val push btn break case as check box value val toggle btn off break case as drop down menu value val drop down menu break case as radio button value val radio btn off break as_push_button as_check_box as_drop_down_menu as_radio_button as_unspecified as_push_button val_push_btn as_check_box val_toggle_btn_off as_drop_down_menu val_drop_down_menu as_radio_button val_radio_btn_off method declared on i action public void add property change listener i property change listener listener listeners add listener iaction addpropertychangelistener ipropertychangelistener parses the given accelerator text and converts it to an accelerator key code support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml param accelerator text the accelerator text localized to the current locale return the swt key code or 0 if there is no accelerator private static int convert localized accelerator string accelerator text int accelerator 0 string tokenizer stok new string tokenizer accelerator text non nls 1 int key code 1 boolean has more tokens stok has more tokens while has more tokens string token stok next token has more tokens stok has more tokens every token except the last must be one of the modifiers ctrl shift alt or command if has more tokens int modifier find localized modifier token if modifier 0 accelerator modifier else leave if there are none return 0 else key code find localized key code token if key code 1 accelerator key code return accelerator setaccelerator acceleratortext convertlocalizedaccelerator acceleratortext stringtokenizer stringtokenizer acceleratortext keycode hasmoretokens hasmoretokens hasmoretokens nexttoken hasmoretokens hasmoretokens hasmoretokens findlocalizedmodifier keycode findlocalizedkeycode keycode keycode parses the given accelerator text and converts it to an accelerator key code param accelerator text the accelerator text return the swt key code or 0 if there is no accelerator public static int convert accelerator string accelerator text int accelerator 0 string tokenizer stok new string tokenizer accelerator text non nls 1 int key code 1 boolean has more tokens stok has more tokens while has more tokens string token stok next token has more tokens stok has more tokens every token except the last must be one of the modifiers ctrl shift alt or command if has more tokens int modifier find modifier token if modifier 0 accelerator modifier else leave if there are none return 0 else key code find key code token if key code 1 accelerator key code return accelerator acceleratortext convertaccelerator acceleratortext stringtokenizer stringtokenizer acceleratortext keycode hasmoretokens hasmoretokens hasmoretokens nexttoken hasmoretokens hasmoretokens hasmoretokens findmodifier keycode findkeycode keycode keycode converts an accelerator key code to a string representation param key code the key code to be translated return a string representation of the key code public static string convert accelerator int key code string modifier get modifier string key code string full key if modifier equals non nls 1 full key find key string key code else full key modifier find key string key code non nls 1 return full key keycode convertaccelerator keycode getmodifierstring keycode fullkey fullkey findkeystring keycode fullkey findkeystring keycode fullkey private static string get modifier string int key code string mod string non nls 1 if key code swt ctrl 0 mod string find modifier string key code swt ctrl if key code swt alt 0 if mod string equals non nls 1 mod string find modifier string key code swt alt else mod string mod string find modifier string key code swt alt non nls 1 if key code swt shift 0 if mod string equals non nls 1 mod string find modifier string key code swt shift else mod string mod string find modifier string key code swt shift non nls 1 if key code swt command 0 if mod string equals non nls 1 mod string find modifier string key code swt command else mod string mod string find modifier string key code swt command non nls 1 return mod string getmodifierstring keycode modstring keycode modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode modstring extracts the accelerator text from the given text returns code null code if there is no accelerator text and the empty string if there is no text after the accelerator delimeter tab or param text the text for the action return the accelerator text or code null code private static string extract accelerator text string text int index text last index of t if index 1 index text last index of if index 0 return text substring index 1 return null extractacceleratortext lastindexof lastindexof maps a standard keyboard key name to an swt key code key names are converted to upper case before comparison if the key name is a single letter for example s its character code is returned p the following key names are known case is ignored ul li code backspace code li li code tab code li li code return code li li code enter code li li code esc code li li code escape code li li code delete code li li code space code li li code arrow up code code arrow down code code arrow left code and code arrow right code li li code page up code and code page down code li li code home code li li code end code li li code insert code li li code f1 code code f2 code through code f12 code li ul p param token the key name return the swt key code code 1 code if no match was found see swt public static int find key code string token if key codes null init key codes token token to upper case integer i integer key codes get token if i null return i int value if token length 1 return token char at 0 return 1 arrow_up arrow_down arrow_left arrow_right page_up page_down findkeycode keycodes initkeycodes touppercase keycodes intvalue charat find the supplied code for a localized key as find key code but localized to the current locale support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml param token the localized key name return the swt key code code 1 code if no match was found see find key code private static int find localized key code string token if localized key codes null init localized key codes token token to upper case integer i integer localized key codes get token if i null return i int value if token length 1 return token char at 0 return 1 findkeycode setaccelerator findkeycode findlocalizedkeycode localizedkeycodes initlocalizedkeycodes touppercase localizedkeycodes intvalue charat maps an swt key code to a standard keyboard key name the key code is stripped of modifiers swt ctrl swt alt swt shift and swt command if the key code is not an swt code for example if it a key code for the key s a string containing a character representation of the key code is returned param key code the key code to be translated return the string representation of the key code see swt since 2 0 public static string find key string int key code if key strings null init key strings int i key code swt ctrl swt alt swt shift swt command integer integer new integer i string result string key strings get integer if result null return result result new string new char char i return result keycode findkeystring keycode keystrings initkeystrings keycode keystrings maps standard keyboard modifier key names to the corresponding swt modifier bit the following modifier key names are recognized case is ignored code ctrl code code shift code code alt code and code command code the given modifier key name is converted to upper case before comparison param token the modifier key name return the swt modifier bit or code 0 code if no match was found see swt public static int find modifier string token token token to upper case if token equals ctrl non nls 1 return swt ctrl if token equals shift non nls 1 return swt shift if token equals alt non nls 1 return swt alt if token equals command non nls 1 return swt command return 0 findmodifier touppercase maps the localized modifier names to a code in the same manner as find modifier support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml see find modifier private static int find localized modifier string token if localized ctrl null init localized modifiers token token to upper case if token equals localized ctrl non nls 1 return swt ctrl if token equals localized shift non nls 1 return swt shift if token equals localized alt non nls 1 return swt alt if token equals localized command non nls 1 return swt command return 0 findmodifier setaccelerator findmodifier findlocalizedmodifier localized_ctrl initlocalizedmodifiers touppercase localized_ctrl localized_shift localized_alt localized_command initialize the list of localized modifiers private static void init localized modifiers localized ctrl j face resources get string ctrl to upper case non nls 1 localized shift j face resources get string shift to upper case non nls 1 localized alt j face resources get string alt to upper case non nls 1 localized command j face resources get string command to upper case non nls 1 initlocalizedmodifiers localized_ctrl jfaceresources getstring touppercase localized_shift jfaceresources getstring touppercase localized_alt jfaceresources getstring touppercase localized_command jfaceresources getstring touppercase returns a string representation of an swt modifier bit swt ctrl swt alt swt shift and swt command returns code null code if the key code is not an swt modifier bit param key code the swt modifier bit to be translated return the string representation of the swt modifier bit or code null code if the key code was not an swt modifier bit see swt since 2 0 public static string find modifier string int key code if key code swt ctrl return j face resources get string ctrl non nls 1 if key code swt alt return j face resources get string alt non nls 1 if key code swt shift return j face resources get string shift non nls 1 if key code swt command return j face resources get string command non nls 1 return null keycode findmodifierstring keycode keycode jfaceresources getstring keycode jfaceresources getstring keycode jfaceresources getstring keycode jfaceresources getstring notifies any property change listeners that a property has changed only listeners registered at the time this method is called are notified this method avoids creating an event object if there are no listeners registered but calls code fire property change property change event code if there are param property name the name of the property that has changed param old value the old value of the property or code null code if none param new value the new value of the property or code null code if none see i property change listener property change protected void fire property change string property name object old value object new value if listeners is empty fire property change new property change event this property name old value new value firepropertychange propertychangeevent propertyname oldvalue newvalue ipropertychangelistener propertychange firepropertychange propertyname oldvalue newvalue isempty firepropertychange propertychangeevent propertyname oldvalue newvalue notifies any property change listeners that a property has changed only listeners registered at the time this method is called are notified param event the property change event see i property change listener property change protected void fire property change property change event event object list this listeners get listeners for int i 0 i list length i i property change listener list i property change event ipropertychangelistener propertychange firepropertychange propertychangeevent getlisteners ipropertychangelistener propertychange method declared on i action public int get accelerator return accelerator iaction getaccelerator public string get action definition id return action definition id getactiondefinitionid actiondefinitionid public string get description if description null return description return get tool tip text getdescription gettooltiptext method declared on i action public image descriptor get disabled image descriptor return disabled image iaction imagedescriptor getdisabledimagedescriptor disabledimage method declared on i action public help listener get help listener return help listener iaction helplistener gethelplistener helplistener method declared on i action public image descriptor get hover image descriptor return hover image iaction imagedescriptor gethoverimagedescriptor hoverimage method declared on i action public string get id return id iaction getid method declared on i action public image descriptor get image descriptor return image iaction imagedescriptor getimagedescriptor public i menu creator get menu creator the default drop down menu value is only used to mark this action requested style so do not return it for backward compatibility reasons if value val drop down menu return null if value instanceof i menu creator return i menu creator value return null imenucreator getmenucreator val_drop_down_menu imenucreator imenucreator public int get style infer the style from the value field if value val push btn value null return as push button if value val toggle btn on value val toggle btn off return as check box if value val radio btn on value val radio btn off return as radio button if value instanceof i menu creator return as drop down menu we should never get to this line return as push button getstyle val_push_btn as_push_button val_toggle_btn_on val_toggle_btn_off as_check_box val_radio_btn_on val_radio_btn_off as_radio_button imenucreator as_drop_down_menu as_push_button method declared on i action public string get text return text iaction gettext method declared on i action public string get tool tip text return tool tip text iaction gettooltiptext tooltiptext initializes the internal key code table private static void init key codes key codes new hash map 40 key codes put backspace new integer 8 non nls 1 key codes put tab new integer 9 non nls 1 key codes put return new integer 13 non nls 1 key codes put enter new integer 13 non nls 1 key codes put escape new integer 27 non nls 1 key codes put esc new integer 27 non nls 1 key codes put delete new integer 127 non nls 1 key codes put space new integer non nls 1 key codes put arrow up new integer swt arrow up non nls 1 key codes put arrow down new integer swt arrow down non nls 1 key codes put arrow left new integer swt arrow left non nls 1 key codes put arrow right new integer swt arrow right non nls 1 key codes put page up new integer swt page up non nls 1 key codes put page down new integer swt page down non nls 1 key codes put home new integer swt home non nls 1 key codes put end new integer swt end non nls 1 key codes put insert new integer swt insert non nls 1 key codes put f1 new integer swt f1 non nls 1 key codes put f2 new integer swt f2 non nls 1 key codes put f3 new integer swt f3 non nls 1 key codes put f4 new integer swt f4 non nls 1 key codes put f5 new integer swt f5 non nls 1 key codes put f6 new integer swt f6 non nls 1 key codes put f7 new integer swt f7 non nls 1 key codes put f8 new integer swt f8 non nls 1 key codes put f9 new integer swt f9 non nls 1 key codes put f10 new integer swt f10 non nls 1 key codes put f11 new integer swt f11 non nls 1 key codes put f12 new integer swt f12 non nls 1 initkeycodes keycodes hashmap keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes arrow_up arrow_up keycodes arrow_down arrow_down keycodes arrow_left arrow_left keycodes arrow_right arrow_right keycodes page_up page_up keycodes page_down page_down keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes initializes the localized internal key code table private static void init localized key codes localized key codes new hash map 40 localized key codes put j face resources get string backspace to upper case new integer 8 non nls 1 localized key codes put j face resources get string tab to upper case new integer 9 non nls 1 localized key codes put j face resources get string return to upper case new integer 13 non nls 1 localized key codes put j face resources get string enter to upper case new integer 13 non nls 1 localized key codes put j face resources get string escape to upper case new integer 27 non nls 1 localized key codes put j face resources get string esc to upper case new integer 27 non nls 1 localized key codes put j face resources get string delete to upper case new integer 127 non nls 1 localized key codes put j face resources get string space to upper case new integer non nls 1 localized key codes put j face resources get string arrow up to upper case new integer swt arrow up non nls 1 localized key codes put j face resources get string arrow down to upper case new integer swt arrow down non nls 1 localized key codes put j face resources get string arrow left to upper case new integer swt arrow left non nls 1 localized key codes put j face resources get string arrow right to upper case new integer swt arrow right non nls 1 localized key codes put j face resources get string page up to upper case new integer swt page up non nls 1 localized key codes put j face resources get string page down to upper case new integer swt page down non nls 1 localized key codes put j face resources get string home to upper case new integer swt home non nls 1 localized key codes put j face resources get string end to upper case new integer swt end non nls 1 localized key codes put j face resources get string insert to upper case new integer swt insert non nls 1 localized key codes put j face resources get string f1 to upper case new integer swt f1 non nls 1 localized key codes put j face resources get string f2 to upper case new integer swt f2 non nls 1 localized key codes put j face resources get string f3 to upper case new integer swt f3 non nls 1 localized key codes put j face resources get string f4 to upper case new integer swt f4 non nls 1 localized key codes put j face resources get string f5 to upper case new integer swt f5 non nls 1 localized key codes put j face resources get string f6 to upper case new integer swt f6 non nls 1 localized key codes put j face resources get string f7 to upper case new integer swt f7 non nls 1 localized key codes put j face resources get string f8 to upper case new integer swt f8 non nls 1 localized key codes put j face resources get string f9 to upper case new integer swt f9 non nls 1 localized key codes put j face resources get string f10 to upper case new integer swt f10 non nls 1 localized key codes put j face resources get string f11 to upper case new integer swt f11 non nls 1 localized key codes put j face resources get string f12 to upper case new integer swt f12 non nls 1 initlocalizedkeycodes localizedkeycodes hashmap localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring arrow_up touppercase arrow_up localizedkeycodes jfaceresources getstring arrow_down touppercase arrow_down localizedkeycodes jfaceresources getstring arrow_left touppercase arrow_left localizedkeycodes jfaceresources getstring arrow_right touppercase arrow_right localizedkeycodes jfaceresources getstring page_up touppercase page_up localizedkeycodes jfaceresources getstring page_down touppercase page_down localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase initializes the internal key string table private static void init key strings key strings new hash map 40 key strings put new integer 8 j face resources get string backspace non nls 1 key strings put new integer 9 j face resources get string tab non nls 1 key strings put new integer 13 j face resources get string return non nls 1 key strings put new integer 13 j face resources get string enter non nls 1 key strings put new integer 27 j face resources get string escape non nls 1 key strings put new integer 27 j face resources get string esc non nls 1 key strings put new integer 127 j face resources get string delete non nls 1 key strings put new integer j face resources get string space non nls 1 key strings put new integer swt arrow up j face resources get string arrow up non nls 1 key strings put new integer swt arrow down j face resources get string arrow down non nls 1 key strings put new integer swt arrow left j face resources get string arrow left non nls 1 key strings put new integer swt arrow right j face resources get string arrow right non nls 1 key strings put new integer swt page up j face resources get string page up non nls 1 key strings put new integer swt page down j face resources get string page down non nls 1 key strings put new integer swt home j face resources get string home non nls 1 key strings put new integer swt end j face resources get string end non nls 1 key strings put new integer swt insert j face resources get string insert non nls 1 key strings put new integer swt f1 j face resources get string f1 non nls 1 key strings put new integer swt f2 j face resources get string f2 non nls 1 key strings put new integer swt f3 j face resources get string f3 non nls 1 key strings put new integer swt f4 j face resources get string f4 non nls 1 key strings put new integer swt f5 j face resources get string f5 non nls 1 key strings put new integer swt f6 j face resources get string f6 non nls 1 key strings put new integer swt f7 j face resources get string f7 non nls 1 key strings put new integer swt f8 j face resources get string f8 non nls 1 key strings put new integer swt f9 j face resources get string f9 non nls 1 key strings put new integer swt f10 j face resources get string f10 non nls 1 key strings put new integer swt f11 j face resources get string f11 non nls 1 key strings put new integer swt f12 j face resources get string f12 non nls 1 initkeystrings keystrings hashmap keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings arrow_up jfaceresources getstring arrow_up keystrings arrow_down jfaceresources getstring arrow_down keystrings arrow_left jfaceresources getstring arrow_left keystrings arrow_right jfaceresources getstring arrow_right keystrings page_up jfaceresources getstring page_up keystrings page_down jfaceresources getstring page_down keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring method declared on i action public boolean is checked return value val toggle btn on value val radio btn on iaction ischecked val_toggle_btn_on val_radio_btn_on method declared on i action public boolean is enabled return enabled iaction isenabled method declared on i action public boolean is handled return true iaction ishandled convenience method for removing any optional accelerator text from the given string the accelerator text appears at the end of the text and is separated from the main part by a single tab character code t code param text the text return the text sans accelerator public static string remove accelerator text string text int index text last index of t if index 1 index text last index of if index 0 return text substring 0 index return text removeacceleratortext lastindexof lastindexof convenience method for removing any mnemonics from the given string for example code remove mnemonics open code will return code open code param text the text return the text sans mnemonics since 3 0 public static string remove mnemonics string text int index text index of if index 1 return text int len text length string buffer sb new string buffer len int last index 0 while index 1 ignore at the end if index len 1 break handle the case if text char at index 1 index dbcs languages use x format if index 0 text char at index 1 text length index 3 text char at index 2 sb append text substring last index index 1 index 3 else sb append text substring last index index skip the index last index index index text index of index if last index len sb append text substring last index len return sb to string removemnemonics removemnemonics indexof stringbuffer stringbuffer lastindex charat charat charat lastindex lastindex lastindex indexof lastindex lastindex tostring method declared on i action public void remove property change listener i property change listener listener listeners remove listener iaction removepropertychangelistener ipropertychangelistener the default implementation of this code i action code method does nothing subclasses should override this method if they do not need information from the triggering event or override code run with event event code if they do public void run do nothing iaction runwithevent the default implementation of this code i action code method ignores the event argument and simply calls code run code subclasses should override this method if they need information from the triggering event or override code run code if not param event the swt event which triggered this action being run since 2 0 public void run with event event event run iaction runwithevent method declared on i action public void set action definition id string id action definition id id iaction setactiondefinitionid actiondefinitionid public void set checked boolean checked object new value null for backward compatibility if the style is not set yet then convert it to a toggle button if value null value val toggle btn on value val toggle btn off new value checked val toggle btn on val toggle btn off else if value val radio btn on value val radio btn off new value checked val radio btn on val radio btn off else some other style already so do nothing return if new value value value new value if checked fire property change checked boolean false boolean true else fire property change checked boolean true boolean false setchecked newvalue val_toggle_btn_on val_toggle_btn_off newvalue val_toggle_btn_on val_toggle_btn_off val_radio_btn_on val_radio_btn_off newvalue val_radio_btn_on val_radio_btn_off newvalue newvalue firepropertychange firepropertychange public void set description string text if description null text null description null text null description null text null text equals description string old description description description text fire property change description old description description setdescription olddescription firepropertychange olddescription public void set disabled image descriptor image descriptor new image if disabled image new image image descriptor old image disabled image disabled image new image fire property change image old image new image setdisabledimagedescriptor imagedescriptor newimage disabledimage newimage imagedescriptor oldimage disabledimage disabledimage newimage firepropertychange oldimage newimage public void set enabled boolean enabled if enabled this enabled boolean old val this enabled boolean true boolean false boolean new val enabled boolean true boolean false this enabled enabled fire property change enabled old val new val setenabled oldval newval firepropertychange oldval newval method declared on i action public void set help listener help listener listener help listener listener iaction sethelplistener helplistener helplistener public void set hover image descriptor image descriptor new image if hover image new image image descriptor old image hover image hover image new image fire property change image old image new image sethoverimagedescriptor imagedescriptor newimage hoverimage newimage imagedescriptor oldimage hoverimage hoverimage newimage firepropertychange oldimage newimage method declared on i action public void set id string id this id id iaction setid public void set image descriptor image descriptor new image if image new image image descriptor old image image image new image fire property change image old image new image setimagedescriptor imagedescriptor newimage newimage imagedescriptor oldimage newimage firepropertychange oldimage newimage sets the menu creator for this action p note that if this method is called it overrides the check status p param creator the menu creator or code null code if none public void set menu creator i menu creator creator for backward compatibility if the style is not set yet then convert it to a drop down menu if value null value creator return if value instanceof i menu creator value creator null val drop down menu creator setmenucreator imenucreator imenucreator val_drop_down_menu sets the text for this action p fires a property change event for the code text code property if the text actually changes as a consequence p p the accelerator is identified by the last index of a tab character if there are no tab characters then it is identified by the last index of a character if neither then there is no accelerator text note that if you want to insert a character into the text but no accelerator you can simply insert a or a tab at the end of the text p param text the text or code null code if none public void set text string text string old text this text int old accel this accelerator this text text if text null string accelerator text extract accelerator text text if accelerator text null int new accelerator convert localized accelerator accelerator text be sure to not wipe out the accelerator if nothing found if new accelerator 0 set accelerator new accelerator if this accelerator old accel old text null this text null old text equals this text fire property change text old text this text settext oldtext oldaccel acceleratortext extractacceleratortext acceleratortext newaccelerator convertlocalizedaccelerator acceleratortext newaccelerator setaccelerator newaccelerator oldaccel oldtext oldtext firepropertychange oldtext sets the tool tip text for this action p fires a property change event for the code tool tip text code property if the tool tip text actually changes as a consequence p param tool tip text the tool tip text or code null code if none public void set tool tip text string tool tip text string old tool tip text this tool tip text if old tool tip text null tool tip text null old tool tip text equals tool tip text this tool tip text tool tip text fire property change tool tip text old tool tip text tool tip text tool_tip_text tooltiptext settooltiptext tooltiptext oldtooltiptext tooltiptext oldtooltiptext tooltiptext oldtooltiptext tooltiptext tooltiptext tooltiptext firepropertychange tool_tip_text oldtooltiptext tooltiptext see i action set accelerator int public void set accelerator int keycode this accelerator keycode iaction setaccelerator setaccelerator reports the outcome of the running of this action via the link i action result property param success code true code if the action succeeded and code false code if the action failed or was not completed see i action result since 3 0 public final void notify result boolean success avoid boolean value of boolean to allow compilation against jcl foundation bug 80059 fire property change result null success boolean true boolean false iaction iaction notifyresult valueof firepropertychange private static final i menu creator val drop down menu new i menu creator public void dispose do nothing imenucreator val_drop_down_menu imenucreator public menu get menu control parent do nothing return null getmenu public menu get menu menu parent do nothing return null getmenu creates a new action with no text and no image p configure the action later using the set methods p protected action do nothing creates a new action with the given text and no image calls the zero arg constructor then code set text code param text the string used as the text for the action or code null code if there is no text see set text protected action string text this set text text settext settext settext creates a new action with the given text and image calls the zero arg constructor then code set text code and code set image descriptor code param text the action s text or code null code if there is no text param image the action s image or code null code if there is no image see set text see set image descriptor protected action string text image descriptor image this text set image descriptor image settext setimagedescriptor settext setimagedescriptor imagedescriptor setimagedescriptor creates a new action with the given text and style param text the action s text or code null code if there is no text param style one of code as push button code code as check box code code as drop down menu code code as radio button code and code as unspecified code protected action string text int style this text switch style case as push button value val push btn break case as check box value val toggle btn off break case as drop down menu value val drop down menu break case as radio button value val radio btn off break as_push_button as_check_box as_drop_down_menu as_radio_button as_unspecified as_push_button val_push_btn as_check_box val_toggle_btn_off as_drop_down_menu val_drop_down_menu as_radio_button val_radio_btn_off method declared on i action public void add property change listener i property change listener listener listeners add listener iaction addpropertychangelistener ipropertychangelistener parses the given accelerator text and converts it to an accelerator key code support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml param accelerator text the accelerator text localized to the current locale return the swt key code or 0 if there is no accelerator private static int convert localized accelerator string accelerator text int accelerator 0 string tokenizer stok new string tokenizer accelerator text non nls 1 int key code 1 boolean has more tokens stok has more tokens while has more tokens string token stok next token has more tokens stok has more tokens every token except the last must be one of the modifiers ctrl shift alt or command if has more tokens int modifier find localized modifier token if modifier 0 accelerator modifier else leave if there are none return 0 else key code find localized key code token if key code 1 accelerator key code return accelerator setaccelerator acceleratortext convertlocalizedaccelerator acceleratortext stringtokenizer stringtokenizer acceleratortext keycode hasmoretokens hasmoretokens hasmoretokens nexttoken hasmoretokens hasmoretokens hasmoretokens findlocalizedmodifier keycode findlocalizedkeycode keycode keycode parses the given accelerator text and converts it to an accelerator key code param accelerator text the accelerator text return the swt key code or 0 if there is no accelerator public static int convert accelerator string accelerator text int accelerator 0 string tokenizer stok new string tokenizer accelerator text non nls 1 int key code 1 boolean has more tokens stok has more tokens while has more tokens string token stok next token has more tokens stok has more tokens every token except the last must be one of the modifiers ctrl shift alt or command if has more tokens int modifier find modifier token if modifier 0 accelerator modifier else leave if there are none return 0 else key code find key code token if key code 1 accelerator key code return accelerator acceleratortext convertaccelerator acceleratortext stringtokenizer stringtokenizer acceleratortext keycode hasmoretokens hasmoretokens hasmoretokens nexttoken hasmoretokens hasmoretokens hasmoretokens findmodifier keycode findkeycode keycode keycode converts an accelerator key code to a string representation param key code the key code to be translated return a string representation of the key code public static string convert accelerator int key code string modifier get modifier string key code string full key if modifier equals non nls 1 full key find key string key code else full key modifier find key string key code non nls 1 return full key keycode convertaccelerator keycode getmodifierstring keycode fullkey fullkey findkeystring keycode fullkey findkeystring keycode fullkey private static string get modifier string int key code string mod string non nls 1 if key code swt ctrl 0 mod string find modifier string key code swt ctrl if key code swt alt 0 if mod string equals non nls 1 mod string find modifier string key code swt alt else mod string mod string find modifier string key code swt alt non nls 1 if key code swt shift 0 if mod string equals non nls 1 mod string find modifier string key code swt shift else mod string mod string find modifier string key code swt shift non nls 1 if key code swt command 0 if mod string equals non nls 1 mod string find modifier string key code swt command else mod string mod string find modifier string key code swt command non nls 1 return mod string getmodifierstring keycode modstring keycode modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode modstring extracts the accelerator text from the given text returns code null code if there is no accelerator text and the empty string if there is no text after the accelerator delimeter tab or param text the text for the action return the accelerator text or code null code private static string extract accelerator text string text int index text last index of t if index 1 index text last index of if index 0 return text substring index 1 return null extractacceleratortext lastindexof lastindexof maps a standard keyboard key name to an swt key code key names are converted to upper case before comparison if the key name is a single letter for example s its character code is returned p the following key names are known case is ignored ul li code backspace code li li code tab code li li code return code li li code enter code li li code esc code li li code escape code li li code delete code li li code space code li li code arrow up code code arrow down code code arrow left code and code arrow right code li li code page up code and code page down code li li code home code li li code end code li li code insert code li li code f1 code code f2 code through code f12 code li ul p param token the key name return the swt key code code 1 code if no match was found see swt public static int find key code string token if key codes null init key codes token token to upper case integer i integer key codes get token if i null return i int value if token length 1 return token char at 0 return 1 arrow_up arrow_down arrow_left arrow_right page_up page_down findkeycode keycodes initkeycodes touppercase keycodes intvalue charat find the supplied code for a localized key as find key code but localized to the current locale support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml param token the localized key name return the swt key code code 1 code if no match was found see find key code private static int find localized key code string token if localized key codes null init localized key codes token token to upper case integer i integer localized key codes get token if i null return i int value if token length 1 return token char at 0 return 1 findkeycode setaccelerator findkeycode findlocalizedkeycode localizedkeycodes initlocalizedkeycodes touppercase localizedkeycodes intvalue charat maps an swt key code to a standard keyboard key name the key code is stripped of modifiers swt ctrl swt alt swt shift and swt command if the key code is not an swt code for example if it a key code for the key s a string containing a character representation of the key code is returned param key code the key code to be translated return the string representation of the key code see swt since 2 0 public static string find key string int key code if key strings null init key strings int i key code swt ctrl swt alt swt shift swt command integer integer new integer i string result string key strings get integer if result null return result result new string new char char i return result keycode findkeystring keycode keystrings initkeystrings keycode keystrings maps standard keyboard modifier key names to the corresponding swt modifier bit the following modifier key names are recognized case is ignored code ctrl code code shift code code alt code and code command code the given modifier key name is converted to upper case before comparison param token the modifier key name return the swt modifier bit or code 0 code if no match was found see swt public static int find modifier string token token token to upper case if token equals ctrl non nls 1 return swt ctrl if token equals shift non nls 1 return swt shift if token equals alt non nls 1 return swt alt if token equals command non nls 1 return swt command return 0 findmodifier touppercase maps the localized modifier names to a code in the same manner as find modifier support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml see find modifier private static int find localized modifier string token if localized ctrl null init localized modifiers token token to upper case if token equals localized ctrl non nls 1 return swt ctrl if token equals localized shift non nls 1 return swt shift if token equals localized alt non nls 1 return swt alt if token equals localized command non nls 1 return swt command return 0 findmodifier setaccelerator findmodifier findlocalizedmodifier localized_ctrl initlocalizedmodifiers touppercase localized_ctrl localized_shift localized_alt localized_command initialize the list of localized modifiers private static void init localized modifiers localized ctrl j face resources get string ctrl to upper case non nls 1 localized shift j face resources get string shift to upper case non nls 1 localized alt j face resources get string alt to upper case non nls 1 localized command j face resources get string command to upper case non nls 1 initlocalizedmodifiers localized_ctrl jfaceresources getstring touppercase localized_shift jfaceresources getstring touppercase localized_alt jfaceresources getstring touppercase localized_command jfaceresources getstring touppercase returns a string representation of an swt modifier bit swt ctrl swt alt swt shift and swt command returns code null code if the key code is not an swt modifier bit param key code the swt modifier bit to be translated return the string representation of the swt modifier bit or code null code if the key code was not an swt modifier bit see swt since 2 0 public static string find modifier string int key code if key code swt ctrl return j face resources get string ctrl non nls 1 if key code swt alt return j face resources get string alt non nls 1 if key code swt shift return j face resources get string shift non nls 1 if key code swt command return j face resources get string command non nls 1 return null keycode findmodifierstring keycode keycode jfaceresources getstring keycode jfaceresources getstring keycode jfaceresources getstring keycode jfaceresources getstring notifies any property change listeners that a property has changed only listeners registered at the time this method is called are notified this method avoids creating an event object if there are no listeners registered but calls code fire property change property change event code if there are param property name the name of the property that has changed param old value the old value of the property or code null code if none param new value the new value of the property or code null code if none see i property change listener property change protected void fire property change string property name object old value object new value if listeners is empty fire property change new property change event this property name old value new value firepropertychange propertychangeevent propertyname oldvalue newvalue ipropertychangelistener propertychange firepropertychange propertyname oldvalue newvalue isempty firepropertychange propertychangeevent propertyname oldvalue newvalue notifies any property change listeners that a property has changed only listeners registered at the time this method is called are notified param event the property change event see i property change listener property change protected void fire property change property change event event object list this listeners get listeners for int i 0 i list length i i property change listener list i property change event ipropertychangelistener propertychange firepropertychange propertychangeevent getlisteners ipropertychangelistener propertychange method declared on i action public int get accelerator return accelerator iaction getaccelerator public string get action definition id return action definition id getactiondefinitionid actiondefinitionid public string get description if description null return description return get tool tip text getdescription gettooltiptext method declared on i action public image descriptor get disabled image descriptor return disabled image iaction imagedescriptor getdisabledimagedescriptor disabledimage method declared on i action public help listener get help listener return help listener iaction helplistener gethelplistener helplistener method declared on i action public image descriptor get hover image descriptor return hover image iaction imagedescriptor gethoverimagedescriptor hoverimage method declared on i action public string get id return id iaction getid method declared on i action public image descriptor get image descriptor return image iaction imagedescriptor getimagedescriptor public i menu creator get menu creator the default drop down menu value is only used to mark this action requested style so do not return it for backward compatibility reasons if value val drop down menu return null if value instanceof i menu creator return i menu creator value return null imenucreator getmenucreator val_drop_down_menu imenucreator imenucreator public int get style infer the style from the value field if value val push btn value null return as push button if value val toggle btn on value val toggle btn off return as check box if value val radio btn on value val radio btn off return as radio button if value instanceof i menu creator return as drop down menu we should never get to this line return as push button getstyle val_push_btn as_push_button val_toggle_btn_on val_toggle_btn_off as_check_box val_radio_btn_on val_radio_btn_off as_radio_button imenucreator as_drop_down_menu as_push_button method declared on i action public string get text return text iaction gettext method declared on i action public string get tool tip text return tool tip text iaction gettooltiptext tooltiptext initializes the internal key code table private static void init key codes key codes new hash map 40 key codes put backspace new integer 8 non nls 1 key codes put tab new integer 9 non nls 1 key codes put return new integer 13 non nls 1 key codes put enter new integer 13 non nls 1 key codes put escape new integer 27 non nls 1 key codes put esc new integer 27 non nls 1 key codes put delete new integer 127 non nls 1 key codes put space new integer non nls 1 key codes put arrow up new integer swt arrow up non nls 1 key codes put arrow down new integer swt arrow down non nls 1 key codes put arrow left new integer swt arrow left non nls 1 key codes put arrow right new integer swt arrow right non nls 1 key codes put page up new integer swt page up non nls 1 key codes put page down new integer swt page down non nls 1 key codes put home new integer swt home non nls 1 key codes put end new integer swt end non nls 1 key codes put insert new integer swt insert non nls 1 key codes put f1 new integer swt f1 non nls 1 key codes put f2 new integer swt f2 non nls 1 key codes put f3 new integer swt f3 non nls 1 key codes put f4 new integer swt f4 non nls 1 key codes put f5 new integer swt f5 non nls 1 key codes put f6 new integer swt f6 non nls 1 key codes put f7 new integer swt f7 non nls 1 key codes put f8 new integer swt f8 non nls 1 key codes put f9 new integer swt f9 non nls 1 key codes put f10 new integer swt f10 non nls 1 key codes put f11 new integer swt f11 non nls 1 key codes put f12 new integer swt f12 non nls 1 initkeycodes keycodes hashmap keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes arrow_up arrow_up keycodes arrow_down arrow_down keycodes arrow_left arrow_left keycodes arrow_right arrow_right keycodes page_up page_up keycodes page_down page_down keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes initializes the localized internal key code table private static void init localized key codes localized key codes new hash map 40 localized key codes put j face resources get string backspace to upper case new integer 8 non nls 1 localized key codes put j face resources get string tab to upper case new integer 9 non nls 1 localized key codes put j face resources get string return to upper case new integer 13 non nls 1 localized key codes put j face resources get string enter to upper case new integer 13 non nls 1 localized key codes put j face resources get string escape to upper case new integer 27 non nls 1 localized key codes put j face resources get string esc to upper case new integer 27 non nls 1 localized key codes put j face resources get string delete to upper case new integer 127 non nls 1 localized key codes put j face resources get string space to upper case new integer non nls 1 localized key codes put j face resources get string arrow up to upper case new integer swt arrow up non nls 1 localized key codes put j face resources get string arrow down to upper case new integer swt arrow down non nls 1 localized key codes put j face resources get string arrow left to upper case new integer swt arrow left non nls 1 localized key codes put j face resources get string arrow right to upper case new integer swt arrow right non nls 1 localized key codes put j face resources get string page up to upper case new integer swt page up non nls 1 localized key codes put j face resources get string page down to upper case new integer swt page down non nls 1 localized key codes put j face resources get string home to upper case new integer swt home non nls 1 localized key codes put j face resources get string end to upper case new integer swt end non nls 1 localized key codes put j face resources get string insert to upper case new integer swt insert non nls 1 localized key codes put j face resources get string f1 to upper case new integer swt f1 non nls 1 localized key codes put j face resources get string f2 to upper case new integer swt f2 non nls 1 localized key codes put j face resources get string f3 to upper case new integer swt f3 non nls 1 localized key codes put j face resources get string f4 to upper case new integer swt f4 non nls 1 localized key codes put j face resources get string f5 to upper case new integer swt f5 non nls 1 localized key codes put j face resources get string f6 to upper case new integer swt f6 non nls 1 localized key codes put j face resources get string f7 to upper case new integer swt f7 non nls 1 localized key codes put j face resources get string f8 to upper case new integer swt f8 non nls 1 localized key codes put j face resources get string f9 to upper case new integer swt f9 non nls 1 localized key codes put j face resources get string f10 to upper case new integer swt f10 non nls 1 localized key codes put j face resources get string f11 to upper case new integer swt f11 non nls 1 localized key codes put j face resources get string f12 to upper case new integer swt f12 non nls 1 initlocalizedkeycodes localizedkeycodes hashmap localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring arrow_up touppercase arrow_up localizedkeycodes jfaceresources getstring arrow_down touppercase arrow_down localizedkeycodes jfaceresources getstring arrow_left touppercase arrow_left localizedkeycodes jfaceresources getstring arrow_right touppercase arrow_right localizedkeycodes jfaceresources getstring page_up touppercase page_up localizedkeycodes jfaceresources getstring page_down touppercase page_down localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase initializes the internal key string table private static void init key strings key strings new hash map 40 key strings put new integer 8 j face resources get string backspace non nls 1 key strings put new integer 9 j face resources get string tab non nls 1 key strings put new integer 13 j face resources get string return non nls 1 key strings put new integer 13 j face resources get string enter non nls 1 key strings put new integer 27 j face resources get string escape non nls 1 key strings put new integer 27 j face resources get string esc non nls 1 key strings put new integer 127 j face resources get string delete non nls 1 key strings put new integer j face resources get string space non nls 1 key strings put new integer swt arrow up j face resources get string arrow up non nls 1 key strings put new integer swt arrow down j face resources get string arrow down non nls 1 key strings put new integer swt arrow left j face resources get string arrow left non nls 1 key strings put new integer swt arrow right j face resources get string arrow right non nls 1 key strings put new integer swt page up j face resources get string page up non nls 1 key strings put new integer swt page down j face resources get string page down non nls 1 key strings put new integer swt home j face resources get string home non nls 1 key strings put new integer swt end j face resources get string end non nls 1 key strings put new integer swt insert j face resources get string insert non nls 1 key strings put new integer swt f1 j face resources get string f1 non nls 1 key strings put new integer swt f2 j face resources get string f2 non nls 1 key strings put new integer swt f3 j face resources get string f3 non nls 1 key strings put new integer swt f4 j face resources get string f4 non nls 1 key strings put new integer swt f5 j face resources get string f5 non nls 1 key strings put new integer swt f6 j face resources get string f6 non nls 1 key strings put new integer swt f7 j face resources get string f7 non nls 1 key strings put new integer swt f8 j face resources get string f8 non nls 1 key strings put new integer swt f9 j face resources get string f9 non nls 1 key strings put new integer swt f10 j face resources get string f10 non nls 1 key strings put new integer swt f11 j face resources get string f11 non nls 1 key strings put new integer swt f12 j face resources get string f12 non nls 1 initkeystrings keystrings hashmap keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings arrow_up jfaceresources getstring arrow_up keystrings arrow_down jfaceresources getstring arrow_down keystrings arrow_left jfaceresources getstring arrow_left keystrings arrow_right jfaceresources getstring arrow_right keystrings page_up jfaceresources getstring page_up keystrings page_down jfaceresources getstring page_down keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring method declared on i action public boolean is checked return value val toggle btn on value val radio btn on iaction ischecked val_toggle_btn_on val_radio_btn_on method declared on i action public boolean is enabled return enabled iaction isenabled method declared on i action public boolean is handled return true iaction ishandled convenience method for removing any optional accelerator text from the given string the accelerator text appears at the end of the text and is separated from the main part by a single tab character code t code param text the text return the text sans accelerator public static string remove accelerator text string text int index text last index of t if index 1 index text last index of if index 0 return text substring 0 index return text removeacceleratortext lastindexof lastindexof convenience method for removing any mnemonics from the given string for example code remove mnemonics open code will return code open code param text the text return the text sans mnemonics since 3 0 public static string remove mnemonics string text int index text index of if index 1 return text int len text length string buffer sb new string buffer len int last index 0 while index 1 ignore at the end if index len 1 break handle the case if text char at index 1 index dbcs languages use x format if index 0 text char at index 1 text length index 3 text char at index 2 sb append text substring last index index 1 index 3 else sb append text substring last index index skip the index last index index index text index of index if last index len sb append text substring last index len return sb to string removemnemonics removemnemonics indexof stringbuffer stringbuffer lastindex charat charat charat lastindex lastindex lastindex indexof lastindex lastindex tostring method declared on i action public void remove property change listener i property change listener listener listeners remove listener iaction removepropertychangelistener ipropertychangelistener the default implementation of this code i action code method does nothing subclasses should override this method if they do not need information from the triggering event or override code run with event event code if they do public void run do nothing iaction runwithevent the default implementation of this code i action code method ignores the event argument and simply calls code run code subclasses should override this method if they need information from the triggering event or override code run code if not param event the swt event which triggered this action being run since 2 0 public void run with event event event run iaction runwithevent method declared on i action public void set action definition id string id action definition id id iaction setactiondefinitionid actiondefinitionid public void set checked boolean checked object new value null for backward compatibility if the style is not set yet then convert it to a toggle button if value null value val toggle btn on value val toggle btn off new value checked val toggle btn on val toggle btn off else if value val radio btn on value val radio btn off new value checked val radio btn on val radio btn off else some other style already so do nothing return if new value value value new value if checked fire property change checked boolean false boolean true else fire property change checked boolean true boolean false setchecked newvalue val_toggle_btn_on val_toggle_btn_off newvalue val_toggle_btn_on val_toggle_btn_off val_radio_btn_on val_radio_btn_off newvalue val_radio_btn_on val_radio_btn_off newvalue newvalue firepropertychange firepropertychange public void set description string text if description null text null description null text null description null text null text equals description string old description description description text fire property change description old description description setdescription olddescription firepropertychange olddescription public void set disabled image descriptor image descriptor new image if disabled image new image image descriptor old image disabled image disabled image new image fire property change image old image new image setdisabledimagedescriptor imagedescriptor newimage disabledimage newimage imagedescriptor oldimage disabledimage disabledimage newimage firepropertychange oldimage newimage public void set enabled boolean enabled if enabled this enabled boolean old val this enabled boolean true boolean false boolean new val enabled boolean true boolean false this enabled enabled fire property change enabled old val new val setenabled oldval newval firepropertychange oldval newval method declared on i action public void set help listener help listener listener help listener listener iaction sethelplistener helplistener helplistener public void set hover image descriptor image descriptor new image if hover image new image image descriptor old image hover image hover image new image fire property change image old image new image sethoverimagedescriptor imagedescriptor newimage hoverimage newimage imagedescriptor oldimage hoverimage hoverimage newimage firepropertychange oldimage newimage method declared on i action public void set id string id this id id iaction setid public void set image descriptor image descriptor new image if image new image image descriptor old image image image new image fire property change image old image new image setimagedescriptor imagedescriptor newimage newimage imagedescriptor oldimage newimage firepropertychange oldimage newimage sets the menu creator for this action p note that if this method is called it overrides the check status p param creator the menu creator or code null code if none public void set menu creator i menu creator creator for backward compatibility if the style is not set yet then convert it to a drop down menu if value null value creator return if value instanceof i menu creator value creator null val drop down menu creator setmenucreator imenucreator imenucreator val_drop_down_menu sets the text for this action p fires a property change event for the code text code property if the text actually changes as a consequence p p the accelerator is identified by the last index of a tab character if there are no tab characters then it is identified by the last index of a character if neither then there is no accelerator text note that if you want to insert a character into the text but no accelerator you can simply insert a or a tab at the end of the text p param text the text or code null code if none public void set text string text string old text this text int old accel this accelerator this text text if text null string accelerator text extract accelerator text text if accelerator text null int new accelerator convert localized accelerator accelerator text be sure to not wipe out the accelerator if nothing found if new accelerator 0 set accelerator new accelerator if this accelerator old accel old text null this text null old text equals this text fire property change text old text this text settext oldtext oldaccel acceleratortext extractacceleratortext acceleratortext newaccelerator convertlocalizedaccelerator acceleratortext newaccelerator setaccelerator newaccelerator oldaccel oldtext oldtext firepropertychange oldtext sets the tool tip text for this action p fires a property change event for the code tool tip text code property if the tool tip text actually changes as a consequence p param tool tip text the tool tip text or code null code if none public void set tool tip text string tool tip text string old tool tip text this tool tip text if old tool tip text null tool tip text null old tool tip text equals tool tip text this tool tip text tool tip text fire property change tool tip text old tool tip text tool tip text tool_tip_text tooltiptext settooltiptext tooltiptext oldtooltiptext tooltiptext oldtooltiptext tooltiptext oldtooltiptext tooltiptext tooltiptext tooltiptext firepropertychange tool_tip_text oldtooltiptext tooltiptext see i action set accelerator int public void set accelerator int keycode this accelerator keycode iaction setaccelerator setaccelerator reports the outcome of the running of this action via the link i action result property param success code true code if the action succeeded and code false code if the action failed or was not completed see i action result since 3 0 public final void notify result boolean success avoid boolean value of boolean to allow compilation against jcl foundation bug 80059 fire property change result null success boolean true boolean false iaction iaction notifyresult valueof firepropertychange private static final i menu creator val drop down menu new i menu creator public void dispose do nothing imenucreator val_drop_down_menu imenucreator public menu get menu control parent do nothing return null getmenu public menu get menu menu parent do nothing return null getmenu creates a new action with no text and no image p configure the action later using the set methods p protected action do nothing creates a new action with the given text and no image calls the zero arg constructor then code set text code param text the string used as the text for the action or code null code if there is no text see set text protected action string text this set text text settext settext settext creates a new action with the given text and image calls the zero arg constructor then code set text code and code set image descriptor code param text the action s text or code null code if there is no text param image the action s image or code null code if there is no image see set text see set image descriptor protected action string text image descriptor image this text set image descriptor image settext setimagedescriptor settext setimagedescriptor imagedescriptor setimagedescriptor creates a new action with the given text and style param text the action s text or code null code if there is no text param style one of code as push button code code as check box code code as drop down menu code code as radio button code and code as unspecified code protected action string text int style this text switch style case as push button value val push btn break case as check box value val toggle btn off break case as drop down menu value val drop down menu break case as radio button value val radio btn off break as_push_button as_check_box as_drop_down_menu as_radio_button as_unspecified as_push_button val_push_btn as_check_box val_toggle_btn_off as_drop_down_menu val_drop_down_menu as_radio_button val_radio_btn_off method declared on i action public void add property change listener i property change listener listener listeners add listener iaction addpropertychangelistener ipropertychangelistener parses the given accelerator text and converts it to an accelerator key code support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml param accelerator text the accelerator text localized to the current locale return the swt key code or 0 if there is no accelerator private static int convert localized accelerator string accelerator text int accelerator 0 string tokenizer stok new string tokenizer accelerator text non nls 1 int key code 1 boolean has more tokens stok has more tokens while has more tokens string token stok next token has more tokens stok has more tokens every token except the last must be one of the modifiers ctrl shift alt or command if has more tokens int modifier find localized modifier token if modifier 0 accelerator modifier else leave if there are none return 0 else key code find localized key code token if key code 1 accelerator key code return accelerator setaccelerator acceleratortext convertlocalizedaccelerator acceleratortext stringtokenizer stringtokenizer acceleratortext keycode hasmoretokens hasmoretokens hasmoretokens nexttoken hasmoretokens hasmoretokens hasmoretokens findlocalizedmodifier keycode findlocalizedkeycode keycode keycode parses the given accelerator text and converts it to an accelerator key code param accelerator text the accelerator text return the swt key code or 0 if there is no accelerator public static int convert accelerator string accelerator text int accelerator 0 string tokenizer stok new string tokenizer accelerator text non nls 1 int key code 1 boolean has more tokens stok has more tokens while has more tokens string token stok next token has more tokens stok has more tokens every token except the last must be one of the modifiers ctrl shift alt or command if has more tokens int modifier find modifier token if modifier 0 accelerator modifier else leave if there are none return 0 else key code find key code token if key code 1 accelerator key code return accelerator acceleratortext convertaccelerator acceleratortext stringtokenizer stringtokenizer acceleratortext keycode hasmoretokens hasmoretokens hasmoretokens nexttoken hasmoretokens hasmoretokens hasmoretokens findmodifier keycode findkeycode keycode keycode converts an accelerator key code to a string representation param key code the key code to be translated return a string representation of the key code public static string convert accelerator int key code string modifier get modifier string key code string full key if modifier equals non nls 1 full key find key string key code else full key modifier find key string key code non nls 1 return full key keycode convertaccelerator keycode getmodifierstring keycode fullkey fullkey findkeystring keycode fullkey findkeystring keycode fullkey private static string get modifier string int key code string mod string non nls 1 if key code swt ctrl 0 mod string find modifier string key code swt ctrl if key code swt alt 0 if mod string equals non nls 1 mod string find modifier string key code swt alt else mod string mod string find modifier string key code swt alt non nls 1 if key code swt shift 0 if mod string equals non nls 1 mod string find modifier string key code swt shift else mod string mod string find modifier string key code swt shift non nls 1 if key code swt command 0 if mod string equals non nls 1 mod string find modifier string key code swt command else mod string mod string find modifier string key code swt command non nls 1 return mod string getmodifierstring keycode modstring keycode modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode modstring extracts the accelerator text from the given text returns code null code if there is no accelerator text and the empty string if there is no text after the accelerator delimeter tab or param text the text for the action return the accelerator text or code null code private static string extract accelerator text string text int index text last index of t if index 1 index text last index of if index 0 return text substring index 1 return null extractacceleratortext lastindexof lastindexof maps a standard keyboard key name to an swt key code key names are converted to upper case before comparison if the key name is a single letter for example s its character code is returned p the following key names are known case is ignored ul li code backspace code li li code tab code li li code return code li li code enter code li li code esc code li li code escape code li li code delete code li li code space code li li code arrow up code code arrow down code code arrow left code and code arrow right code li li code page up code and code page down code li li code home code li li code end code li li code insert code li li code f1 code code f2 code through code f12 code li ul p param token the key name return the swt key code code 1 code if no match was found see swt public static int find key code string token if key codes null init key codes token token to upper case integer i integer key codes get token if i null return i int value if token length 1 return token char at 0 return 1 arrow_up arrow_down arrow_left arrow_right page_up page_down findkeycode keycodes initkeycodes touppercase keycodes intvalue charat find the supplied code for a localized key as find key code but localized to the current locale support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml param token the localized key name return the swt key code code 1 code if no match was found see find key code private static int find localized key code string token if localized key codes null init localized key codes token token to upper case integer i integer localized key codes get token if i null return i int value if token length 1 return token char at 0 return 1 findkeycode setaccelerator findkeycode findlocalizedkeycode localizedkeycodes initlocalizedkeycodes touppercase localizedkeycodes intvalue charat maps an swt key code to a standard keyboard key name the key code is stripped of modifiers swt ctrl swt alt swt shift and swt command if the key code is not an swt code for example if it a key code for the key s a string containing a character representation of the key code is returned param key code the key code to be translated return the string representation of the key code see swt since 2 0 public static string find key string int key code if key strings null init key strings int i key code swt ctrl swt alt swt shift swt command integer integer new integer i string result string key strings get integer if result null return result result new string new char char i return result keycode findkeystring keycode keystrings initkeystrings keycode keystrings maps standard keyboard modifier key names to the corresponding swt modifier bit the following modifier key names are recognized case is ignored code ctrl code code shift code code alt code and code command code the given modifier key name is converted to upper case before comparison param token the modifier key name return the swt modifier bit or code 0 code if no match was found see swt public static int find modifier string token token token to upper case if token equals ctrl non nls 1 return swt ctrl if token equals shift non nls 1 return swt shift if token equals alt non nls 1 return swt alt if token equals command non nls 1 return swt command return 0 findmodifier touppercase maps the localized modifier names to a code in the same manner as find modifier support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml see find modifier private static int find localized modifier string token if localized ctrl null init localized modifiers token token to upper case if token equals localized ctrl non nls 1 return swt ctrl if token equals localized shift non nls 1 return swt shift if token equals localized alt non nls 1 return swt alt if token equals localized command non nls 1 return swt command return 0 findmodifier setaccelerator findmodifier findlocalizedmodifier localized_ctrl initlocalizedmodifiers touppercase localized_ctrl localized_shift localized_alt localized_command initialize the list of localized modifiers private static void init localized modifiers localized ctrl j face resources get string ctrl to upper case non nls 1 localized shift j face resources get string shift to upper case non nls 1 localized alt j face resources get string alt to upper case non nls 1 localized command j face resources get string command to upper case non nls 1 initlocalizedmodifiers localized_ctrl jfaceresources getstring touppercase localized_shift jfaceresources getstring touppercase localized_alt jfaceresources getstring touppercase localized_command jfaceresources getstring touppercase returns a string representation of an swt modifier bit swt ctrl swt alt swt shift and swt command returns code null code if the key code is not an swt modifier bit param key code the swt modifier bit to be translated return the string representation of the swt modifier bit or code null code if the key code was not an swt modifier bit see swt since 2 0 public static string find modifier string int key code if key code swt ctrl return j face resources get string ctrl non nls 1 if key code swt alt return j face resources get string alt non nls 1 if key code swt shift return j face resources get string shift non nls 1 if key code swt command return j face resources get string command non nls 1 return null keycode findmodifierstring keycode keycode jfaceresources getstring keycode jfaceresources getstring keycode jfaceresources getstring keycode jfaceresources getstring notifies any property change listeners that a property has changed only listeners registered at the time this method is called are notified this method avoids creating an event object if there are no listeners registered but calls code fire property change property change event code if there are param property name the name of the property that has changed param old value the old value of the property or code null code if none param new value the new value of the property or code null code if none see i property change listener property change protected void fire property change string property name object old value object new value if listeners is empty fire property change new property change event this property name old value new value firepropertychange propertychangeevent propertyname oldvalue newvalue ipropertychangelistener propertychange firepropertychange propertyname oldvalue newvalue isempty firepropertychange propertychangeevent propertyname oldvalue newvalue notifies any property change listeners that a property has changed only listeners registered at the time this method is called are notified param event the property change event see i property change listener property change protected void fire property change property change event event object list this listeners get listeners for int i 0 i list length i i property change listener list i property change event ipropertychangelistener propertychange firepropertychange propertychangeevent getlisteners ipropertychangelistener propertychange method declared on i action public int get accelerator return accelerator iaction getaccelerator public string get action definition id return action definition id getactiondefinitionid actiondefinitionid public string get description if description null return description return get tool tip text getdescription gettooltiptext method declared on i action public image descriptor get disabled image descriptor return disabled image iaction imagedescriptor getdisabledimagedescriptor disabledimage method declared on i action public help listener get help listener return help listener iaction helplistener gethelplistener helplistener method declared on i action public image descriptor get hover image descriptor return hover image iaction imagedescriptor gethoverimagedescriptor hoverimage method declared on i action public string get id return id iaction getid method declared on i action public image descriptor get image descriptor return image iaction imagedescriptor getimagedescriptor public i menu creator get menu creator the default drop down menu value is only used to mark this action requested style so do not return it for backward compatibility reasons if value val drop down menu return null if value instanceof i menu creator return i menu creator value return null imenucreator getmenucreator val_drop_down_menu imenucreator imenucreator public int get style infer the style from the value field if value val push btn value null return as push button if value val toggle btn on value val toggle btn off return as check box if value val radio btn on value val radio btn off return as radio button if value instanceof i menu creator return as drop down menu we should never get to this line return as push button getstyle val_push_btn as_push_button val_toggle_btn_on val_toggle_btn_off as_check_box val_radio_btn_on val_radio_btn_off as_radio_button imenucreator as_drop_down_menu as_push_button method declared on i action public string get text return text iaction gettext method declared on i action public string get tool tip text return tool tip text iaction gettooltiptext tooltiptext initializes the internal key code table private static void init key codes key codes new hash map 40 key codes put backspace new integer 8 non nls 1 key codes put tab new integer 9 non nls 1 key codes put return new integer 13 non nls 1 key codes put enter new integer 13 non nls 1 key codes put escape new integer 27 non nls 1 key codes put esc new integer 27 non nls 1 key codes put delete new integer 127 non nls 1 key codes put space new integer non nls 1 key codes put arrow up new integer swt arrow up non nls 1 key codes put arrow down new integer swt arrow down non nls 1 key codes put arrow left new integer swt arrow left non nls 1 key codes put arrow right new integer swt arrow right non nls 1 key codes put page up new integer swt page up non nls 1 key codes put page down new integer swt page down non nls 1 key codes put home new integer swt home non nls 1 key codes put end new integer swt end non nls 1 key codes put insert new integer swt insert non nls 1 key codes put f1 new integer swt f1 non nls 1 key codes put f2 new integer swt f2 non nls 1 key codes put f3 new integer swt f3 non nls 1 key codes put f4 new integer swt f4 non nls 1 key codes put f5 new integer swt f5 non nls 1 key codes put f6 new integer swt f6 non nls 1 key codes put f7 new integer swt f7 non nls 1 key codes put f8 new integer swt f8 non nls 1 key codes put f9 new integer swt f9 non nls 1 key codes put f10 new integer swt f10 non nls 1 key codes put f11 new integer swt f11 non nls 1 key codes put f12 new integer swt f12 non nls 1 initkeycodes keycodes hashmap keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes arrow_up arrow_up keycodes arrow_down arrow_down keycodes arrow_left arrow_left keycodes arrow_right arrow_right keycodes page_up page_up keycodes page_down page_down keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes initializes the localized internal key code table private static void init localized key codes localized key codes new hash map 40 localized key codes put j face resources get string backspace to upper case new integer 8 non nls 1 localized key codes put j face resources get string tab to upper case new integer 9 non nls 1 localized key codes put j face resources get string return to upper case new integer 13 non nls 1 localized key codes put j face resources get string enter to upper case new integer 13 non nls 1 localized key codes put j face resources get string escape to upper case new integer 27 non nls 1 localized key codes put j face resources get string esc to upper case new integer 27 non nls 1 localized key codes put j face resources get string delete to upper case new integer 127 non nls 1 localized key codes put j face resources get string space to upper case new integer non nls 1 localized key codes put j face resources get string arrow up to upper case new integer swt arrow up non nls 1 localized key codes put j face resources get string arrow down to upper case new integer swt arrow down non nls 1 localized key codes put j face resources get string arrow left to upper case new integer swt arrow left non nls 1 localized key codes put j face resources get string arrow right to upper case new integer swt arrow right non nls 1 localized key codes put j face resources get string page up to upper case new integer swt page up non nls 1 localized key codes put j face resources get string page down to upper case new integer swt page down non nls 1 localized key codes put j face resources get string home to upper case new integer swt home non nls 1 localized key codes put j face resources get string end to upper case new integer swt end non nls 1 localized key codes put j face resources get string insert to upper case new integer swt insert non nls 1 localized key codes put j face resources get string f1 to upper case new integer swt f1 non nls 1 localized key codes put j face resources get string f2 to upper case new integer swt f2 non nls 1 localized key codes put j face resources get string f3 to upper case new integer swt f3 non nls 1 localized key codes put j face resources get string f4 to upper case new integer swt f4 non nls 1 localized key codes put j face resources get string f5 to upper case new integer swt f5 non nls 1 localized key codes put j face resources get string f6 to upper case new integer swt f6 non nls 1 localized key codes put j face resources get string f7 to upper case new integer swt f7 non nls 1 localized key codes put j face resources get string f8 to upper case new integer swt f8 non nls 1 localized key codes put j face resources get string f9 to upper case new integer swt f9 non nls 1 localized key codes put j face resources get string f10 to upper case new integer swt f10 non nls 1 localized key codes put j face resources get string f11 to upper case new integer swt f11 non nls 1 localized key codes put j face resources get string f12 to upper case new integer swt f12 non nls 1 initlocalizedkeycodes localizedkeycodes hashmap localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring arrow_up touppercase arrow_up localizedkeycodes jfaceresources getstring arrow_down touppercase arrow_down localizedkeycodes jfaceresources getstring arrow_left touppercase arrow_left localizedkeycodes jfaceresources getstring arrow_right touppercase arrow_right localizedkeycodes jfaceresources getstring page_up touppercase page_up localizedkeycodes jfaceresources getstring page_down touppercase page_down localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase initializes the internal key string table private static void init key strings key strings new hash map 40 key strings put new integer 8 j face resources get string backspace non nls 1 key strings put new integer 9 j face resources get string tab non nls 1 key strings put new integer 13 j face resources get string return non nls 1 key strings put new integer 13 j face resources get string enter non nls 1 key strings put new integer 27 j face resources get string escape non nls 1 key strings put new integer 27 j face resources get string esc non nls 1 key strings put new integer 127 j face resources get string delete non nls 1 key strings put new integer j face resources get string space non nls 1 key strings put new integer swt arrow up j face resources get string arrow up non nls 1 key strings put new integer swt arrow down j face resources get string arrow down non nls 1 key strings put new integer swt arrow left j face resources get string arrow left non nls 1 key strings put new integer swt arrow right j face resources get string arrow right non nls 1 key strings put new integer swt page up j face resources get string page up non nls 1 key strings put new integer swt page down j face resources get string page down non nls 1 key strings put new integer swt home j face resources get string home non nls 1 key strings put new integer swt end j face resources get string end non nls 1 key strings put new integer swt insert j face resources get string insert non nls 1 key strings put new integer swt f1 j face resources get string f1 non nls 1 key strings put new integer swt f2 j face resources get string f2 non nls 1 key strings put new integer swt f3 j face resources get string f3 non nls 1 key strings put new integer swt f4 j face resources get string f4 non nls 1 key strings put new integer swt f5 j face resources get string f5 non nls 1 key strings put new integer swt f6 j face resources get string f6 non nls 1 key strings put new integer swt f7 j face resources get string f7 non nls 1 key strings put new integer swt f8 j face resources get string f8 non nls 1 key strings put new integer swt f9 j face resources get string f9 non nls 1 key strings put new integer swt f10 j face resources get string f10 non nls 1 key strings put new integer swt f11 j face resources get string f11 non nls 1 key strings put new integer swt f12 j face resources get string f12 non nls 1 initkeystrings keystrings hashmap keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings arrow_up jfaceresources getstring arrow_up keystrings arrow_down jfaceresources getstring arrow_down keystrings arrow_left jfaceresources getstring arrow_left keystrings arrow_right jfaceresources getstring arrow_right keystrings page_up jfaceresources getstring page_up keystrings page_down jfaceresources getstring page_down keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring method declared on i action public boolean is checked return value val toggle btn on value val radio btn on iaction ischecked val_toggle_btn_on val_radio_btn_on method declared on i action public boolean is enabled return enabled iaction isenabled method declared on i action public boolean is handled return true iaction ishandled convenience method for removing any optional accelerator text from the given string the accelerator text appears at the end of the text and is separated from the main part by a single tab character code t code param text the text return the text sans accelerator public static string remove accelerator text string text int index text last index of t if index 1 index text last index of if index 0 return text substring 0 index return text removeacceleratortext lastindexof lastindexof convenience method for removing any mnemonics from the given string for example code remove mnemonics open code will return code open code param text the text return the text sans mnemonics since 3 0 public static string remove mnemonics string text int index text index of if index 1 return text int len text length string buffer sb new string buffer len int last index 0 while index 1 ignore at the end if index len 1 break handle the case if text char at index 1 index dbcs languages use x format if index 0 text char at index 1 text length index 3 text char at index 2 sb append text substring last index index 1 index 3 else sb append text substring last index index skip the index last index index index text index of index if last index len sb append text substring last index len return sb to string removemnemonics removemnemonics indexof stringbuffer stringbuffer lastindex charat charat charat lastindex lastindex lastindex indexof lastindex lastindex tostring method declared on i action public void remove property change listener i property change listener listener listeners remove listener iaction removepropertychangelistener ipropertychangelistener the default implementation of this code i action code method does nothing subclasses should override this method if they do not need information from the triggering event or override code run with event event code if they do public void run do nothing iaction runwithevent the default implementation of this code i action code method ignores the event argument and simply calls code run code subclasses should override this method if they need information from the triggering event or override code run code if not param event the swt event which triggered this action being run since 2 0 public void run with event event event run iaction runwithevent method declared on i action public void set action definition id string id action definition id id iaction setactiondefinitionid actiondefinitionid public void set checked boolean checked object new value null for backward compatibility if the style is not set yet then convert it to a toggle button if value null value val toggle btn on value val toggle btn off new value checked val toggle btn on val toggle btn off else if value val radio btn on value val radio btn off new value checked val radio btn on val radio btn off else some other style already so do nothing return if new value value value new value if checked fire property change checked boolean false boolean true else fire property change checked boolean true boolean false setchecked newvalue val_toggle_btn_on val_toggle_btn_off newvalue val_toggle_btn_on val_toggle_btn_off val_radio_btn_on val_radio_btn_off newvalue val_radio_btn_on val_radio_btn_off newvalue newvalue firepropertychange firepropertychange public void set description string text if description null text null description null text null description null text null text equals description string old description description description text fire property change description old description description setdescription olddescription firepropertychange olddescription public void set disabled image descriptor image descriptor new image if disabled image new image image descriptor old image disabled image disabled image new image fire property change image old image new image setdisabledimagedescriptor imagedescriptor newimage disabledimage newimage imagedescriptor oldimage disabledimage disabledimage newimage firepropertychange oldimage newimage public void set enabled boolean enabled if enabled this enabled boolean old val this enabled boolean true boolean false boolean new val enabled boolean true boolean false this enabled enabled fire property change enabled old val new val setenabled oldval newval firepropertychange oldval newval method declared on i action public void set help listener help listener listener help listener listener iaction sethelplistener helplistener helplistener public void set hover image descriptor image descriptor new image if hover image new image image descriptor old image hover image hover image new image fire property change image old image new image sethoverimagedescriptor imagedescriptor newimage hoverimage newimage imagedescriptor oldimage hoverimage hoverimage newimage firepropertychange oldimage newimage method declared on i action public void set id string id this id id iaction setid public void set image descriptor image descriptor new image if image new image image descriptor old image image image new image fire property change image old image new image setimagedescriptor imagedescriptor newimage newimage imagedescriptor oldimage newimage firepropertychange oldimage newimage sets the menu creator for this action p note that if this method is called it overrides the check status p param creator the menu creator or code null code if none public void set menu creator i menu creator creator for backward compatibility if the style is not set yet then convert it to a drop down menu if value null value creator return if value instanceof i menu creator value creator null val drop down menu creator setmenucreator imenucreator imenucreator val_drop_down_menu sets the text for this action p fires a property change event for the code text code property if the text actually changes as a consequence p p the accelerator is identified by the last index of a tab character if there are no tab characters then it is identified by the last index of a character if neither then there is no accelerator text note that if you want to insert a character into the text but no accelerator you can simply insert a or a tab at the end of the text p param text the text or code null code if none public void set text string text string old text this text int old accel this accelerator this text text if text null string accelerator text extract accelerator text text if accelerator text null int new accelerator convert localized accelerator accelerator text be sure to not wipe out the accelerator if nothing found if new accelerator 0 set accelerator new accelerator if this accelerator old accel old text null this text null old text equals this text fire property change text old text this text settext oldtext oldaccel acceleratortext extractacceleratortext acceleratortext newaccelerator convertlocalizedaccelerator acceleratortext newaccelerator setaccelerator newaccelerator oldaccel oldtext oldtext firepropertychange oldtext sets the tool tip text for this action p fires a property change event for the code tool tip text code property if the tool tip text actually changes as a consequence p param tool tip text the tool tip text or code null code if none public void set tool tip text string tool tip text string old tool tip text this tool tip text if old tool tip text null tool tip text null old tool tip text equals tool tip text this tool tip text tool tip text fire property change tool tip text old tool tip text tool tip text tool_tip_text tooltiptext settooltiptext tooltiptext oldtooltiptext tooltiptext oldtooltiptext tooltiptext oldtooltiptext tooltiptext tooltiptext tooltiptext firepropertychange tool_tip_text oldtooltiptext tooltiptext see i action set accelerator int public void set accelerator int keycode this accelerator keycode iaction setaccelerator setaccelerator reports the outcome of the running of this action via the link i action result property param success code true code if the action succeeded and code false code if the action failed or was not completed see i action result since 3 0 public final void notify result boolean success avoid boolean value of boolean to allow compilation against jcl foundation bug 80059 fire property change result null success boolean true boolean false iaction iaction notifyresult valueof firepropertychange private static final i menu creator val drop down menu new i menu creator public void dispose do nothing imenucreator val_drop_down_menu imenucreator public menu get menu control parent do nothing return null getmenu public menu get menu menu parent do nothing return null getmenu creates a new action with no text and no image p configure the action later using the set methods p protected action do nothing creates a new action with the given text and no image calls the zero arg constructor then code set text code param text the string used as the text for the action or code null code if there is no text see set text protected action string text this set text text settext settext settext creates a new action with the given text and image calls the zero arg constructor then code set text code and code set image descriptor code param text the action s text or code null code if there is no text param image the action s image or code null code if there is no image see set text see set image descriptor protected action string text image descriptor image this text set image descriptor image settext setimagedescriptor settext setimagedescriptor imagedescriptor setimagedescriptor creates a new action with the given text and style param text the action s text or code null code if there is no text param style one of code as push button code code as check box code code as drop down menu code code as radio button code and code as unspecified code protected action string text int style this text switch style case as push button value val push btn break case as check box value val toggle btn off break case as drop down menu value val drop down menu break case as radio button value val radio btn off break as_push_button as_check_box as_drop_down_menu as_radio_button as_unspecified as_push_button val_push_btn as_check_box val_toggle_btn_off as_drop_down_menu val_drop_down_menu as_radio_button val_radio_btn_off method declared on i action public void add property change listener i property change listener listener listeners add listener iaction addpropertychangelistener ipropertychangelistener parses the given accelerator text and converts it to an accelerator key code support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml param accelerator text the accelerator text localized to the current locale return the swt key code or 0 if there is no accelerator private static int convert localized accelerator string accelerator text int accelerator 0 string tokenizer stok new string tokenizer accelerator text non nls 1 int key code 1 boolean has more tokens stok has more tokens while has more tokens string token stok next token has more tokens stok has more tokens every token except the last must be one of the modifiers ctrl shift alt or command if has more tokens int modifier find localized modifier token if modifier 0 accelerator modifier else leave if there are none return 0 else key code find localized key code token if key code 1 accelerator key code return accelerator setaccelerator acceleratortext convertlocalizedaccelerator acceleratortext stringtokenizer stringtokenizer acceleratortext keycode hasmoretokens hasmoretokens hasmoretokens nexttoken hasmoretokens hasmoretokens hasmoretokens findlocalizedmodifier keycode findlocalizedkeycode keycode keycode parses the given accelerator text and converts it to an accelerator key code param accelerator text the accelerator text return the swt key code or 0 if there is no accelerator public static int convert accelerator string accelerator text int accelerator 0 string tokenizer stok new string tokenizer accelerator text non nls 1 int key code 1 boolean has more tokens stok has more tokens while has more tokens string token stok next token has more tokens stok has more tokens every token except the last must be one of the modifiers ctrl shift alt or command if has more tokens int modifier find modifier token if modifier 0 accelerator modifier else leave if there are none return 0 else key code find key code token if key code 1 accelerator key code return accelerator acceleratortext convertaccelerator acceleratortext stringtokenizer stringtokenizer acceleratortext keycode hasmoretokens hasmoretokens hasmoretokens nexttoken hasmoretokens hasmoretokens hasmoretokens findmodifier keycode findkeycode keycode keycode converts an accelerator key code to a string representation param key code the key code to be translated return a string representation of the key code public static string convert accelerator int key code string modifier get modifier string key code string full key if modifier equals non nls 1 full key find key string key code else full key modifier find key string key code non nls 1 return full key keycode convertaccelerator keycode getmodifierstring keycode fullkey fullkey findkeystring keycode fullkey findkeystring keycode fullkey private static string get modifier string int key code string mod string non nls 1 if key code swt ctrl 0 mod string find modifier string key code swt ctrl if key code swt alt 0 if mod string equals non nls 1 mod string find modifier string key code swt alt else mod string mod string find modifier string key code swt alt non nls 1 if key code swt shift 0 if mod string equals non nls 1 mod string find modifier string key code swt shift else mod string mod string find modifier string key code swt shift non nls 1 if key code swt command 0 if mod string equals non nls 1 mod string find modifier string key code swt command else mod string mod string find modifier string key code swt command non nls 1 return mod string getmodifierstring keycode modstring keycode modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode modstring extracts the accelerator text from the given text returns code null code if there is no accelerator text and the empty string if there is no text after the accelerator delimeter tab or param text the text for the action return the accelerator text or code null code private static string extract accelerator text string text int index text last index of t if index 1 index text last index of if index 0 return text substring index 1 return null extractacceleratortext lastindexof lastindexof maps a standard keyboard key name to an swt key code key names are converted to upper case before comparison if the key name is a single letter for example s its character code is returned p the following key names are known case is ignored ul li code backspace code li li code tab code li li code return code li li code enter code li li code esc code li li code escape code li li code delete code li li code space code li li code arrow up code code arrow down code code arrow left code and code arrow right code li li code page up code and code page down code li li code home code li li code end code li li code insert code li li code f1 code code f2 code through code f12 code li ul p param token the key name return the swt key code code 1 code if no match was found see swt public static int find key code string token if key codes null init key codes token token to upper case integer i integer key codes get token if i null return i int value if token length 1 return token char at 0 return 1 arrow_up arrow_down arrow_left arrow_right page_up page_down findkeycode keycodes initkeycodes touppercase keycodes intvalue charat find the supplied code for a localized key as find key code but localized to the current locale support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml param token the localized key name return the swt key code code 1 code if no match was found see find key code private static int find localized key code string token if localized key codes null init localized key codes token token to upper case integer i integer localized key codes get token if i null return i int value if token length 1 return token char at 0 return 1 findkeycode setaccelerator findkeycode findlocalizedkeycode localizedkeycodes initlocalizedkeycodes touppercase localizedkeycodes intvalue charat maps an swt key code to a standard keyboard key name the key code is stripped of modifiers swt ctrl swt alt swt shift and swt command if the key code is not an swt code for example if it a key code for the key s a string containing a character representation of the key code is returned param key code the key code to be translated return the string representation of the key code see swt since 2 0 public static string find key string int key code if key strings null init key strings int i key code swt ctrl swt alt swt shift swt command integer integer new integer i string result string key strings get integer if result null return result result new string new char char i return result keycode findkeystring keycode keystrings initkeystrings keycode keystrings maps standard keyboard modifier key names to the corresponding swt modifier bit the following modifier key names are recognized case is ignored code ctrl code code shift code code alt code and code command code the given modifier key name is converted to upper case before comparison param token the modifier key name return the swt modifier bit or code 0 code if no match was found see swt public static int find modifier string token token token to upper case if token equals ctrl non nls 1 return swt ctrl if token equals shift non nls 1 return swt shift if token equals alt non nls 1 return swt alt if token equals command non nls 1 return swt command return 0 findmodifier touppercase maps the localized modifier names to a code in the same manner as find modifier support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml see find modifier private static int find localized modifier string token if localized ctrl null init localized modifiers token token to upper case if token equals localized ctrl non nls 1 return swt ctrl if token equals localized shift non nls 1 return swt shift if token equals localized alt non nls 1 return swt alt if token equals localized command non nls 1 return swt command return 0 findmodifier setaccelerator findmodifier findlocalizedmodifier localized_ctrl initlocalizedmodifiers touppercase localized_ctrl localized_shift localized_alt localized_command initialize the list of localized modifiers private static void init localized modifiers localized ctrl j face resources get string ctrl to upper case non nls 1 localized shift j face resources get string shift to upper case non nls 1 localized alt j face resources get string alt to upper case non nls 1 localized command j face resources get string command to upper case non nls 1 initlocalizedmodifiers localized_ctrl jfaceresources getstring touppercase localized_shift jfaceresources getstring touppercase localized_alt jfaceresources getstring touppercase localized_command jfaceresources getstring touppercase returns a string representation of an swt modifier bit swt ctrl swt alt swt shift and swt command returns code null code if the key code is not an swt modifier bit param key code the swt modifier bit to be translated return the string representation of the swt modifier bit or code null code if the key code was not an swt modifier bit see swt since 2 0 public static string find modifier string int key code if key code swt ctrl return j face resources get string ctrl non nls 1 if key code swt alt return j face resources get string alt non nls 1 if key code swt shift return j face resources get string shift non nls 1 if key code swt command return j face resources get string command non nls 1 return null keycode findmodifierstring keycode keycode jfaceresources getstring keycode jfaceresources getstring keycode jfaceresources getstring keycode jfaceresources getstring notifies any property change listeners that a property has changed only listeners registered at the time this method is called are notified this method avoids creating an event object if there are no listeners registered but calls code fire property change property change event code if there are param property name the name of the property that has changed param old value the old value of the property or code null code if none param new value the new value of the property or code null code if none see i property change listener property change protected void fire property change string property name object old value object new value if listeners is empty fire property change new property change event this property name old value new value firepropertychange propertychangeevent propertyname oldvalue newvalue ipropertychangelistener propertychange firepropertychange propertyname oldvalue newvalue isempty firepropertychange propertychangeevent propertyname oldvalue newvalue notifies any property change listeners that a property has changed only listeners registered at the time this method is called are notified param event the property change event see i property change listener property change protected void fire property change property change event event object list this listeners get listeners for int i 0 i list length i i property change listener list i property change event ipropertychangelistener propertychange firepropertychange propertychangeevent getlisteners ipropertychangelistener propertychange method declared on i action public int get accelerator return accelerator iaction getaccelerator public string get action definition id return action definition id getactiondefinitionid actiondefinitionid public string get description if description null return description return get tool tip text getdescription gettooltiptext method declared on i action public image descriptor get disabled image descriptor return disabled image iaction imagedescriptor getdisabledimagedescriptor disabledimage method declared on i action public help listener get help listener return help listener iaction helplistener gethelplistener helplistener method declared on i action public image descriptor get hover image descriptor return hover image iaction imagedescriptor gethoverimagedescriptor hoverimage method declared on i action public string get id return id iaction getid method declared on i action public image descriptor get image descriptor return image iaction imagedescriptor getimagedescriptor public i menu creator get menu creator the default drop down menu value is only used to mark this action requested style so do not return it for backward compatibility reasons if value val drop down menu return null if value instanceof i menu creator return i menu creator value return null imenucreator getmenucreator val_drop_down_menu imenucreator imenucreator public int get style infer the style from the value field if value val push btn value null return as push button if value val toggle btn on value val toggle btn off return as check box if value val radio btn on value val radio btn off return as radio button if value instanceof i menu creator return as drop down menu we should never get to this line return as push button getstyle val_push_btn as_push_button val_toggle_btn_on val_toggle_btn_off as_check_box val_radio_btn_on val_radio_btn_off as_radio_button imenucreator as_drop_down_menu as_push_button method declared on i action public string get text return text iaction gettext method declared on i action public string get tool tip text return tool tip text iaction gettooltiptext tooltiptext initializes the internal key code table private static void init key codes key codes new hash map 40 key codes put backspace new integer 8 non nls 1 key codes put tab new integer 9 non nls 1 key codes put return new integer 13 non nls 1 key codes put enter new integer 13 non nls 1 key codes put escape new integer 27 non nls 1 key codes put esc new integer 27 non nls 1 key codes put delete new integer 127 non nls 1 key codes put space new integer non nls 1 key codes put arrow up new integer swt arrow up non nls 1 key codes put arrow down new integer swt arrow down non nls 1 key codes put arrow left new integer swt arrow left non nls 1 key codes put arrow right new integer swt arrow right non nls 1 key codes put page up new integer swt page up non nls 1 key codes put page down new integer swt page down non nls 1 key codes put home new integer swt home non nls 1 key codes put end new integer swt end non nls 1 key codes put insert new integer swt insert non nls 1 key codes put f1 new integer swt f1 non nls 1 key codes put f2 new integer swt f2 non nls 1 key codes put f3 new integer swt f3 non nls 1 key codes put f4 new integer swt f4 non nls 1 key codes put f5 new integer swt f5 non nls 1 key codes put f6 new integer swt f6 non nls 1 key codes put f7 new integer swt f7 non nls 1 key codes put f8 new integer swt f8 non nls 1 key codes put f9 new integer swt f9 non nls 1 key codes put f10 new integer swt f10 non nls 1 key codes put f11 new integer swt f11 non nls 1 key codes put f12 new integer swt f12 non nls 1 initkeycodes keycodes hashmap keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes arrow_up arrow_up keycodes arrow_down arrow_down keycodes arrow_left arrow_left keycodes arrow_right arrow_right keycodes page_up page_up keycodes page_down page_down keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes initializes the localized internal key code table private static void init localized key codes localized key codes new hash map 40 localized key codes put j face resources get string backspace to upper case new integer 8 non nls 1 localized key codes put j face resources get string tab to upper case new integer 9 non nls 1 localized key codes put j face resources get string return to upper case new integer 13 non nls 1 localized key codes put j face resources get string enter to upper case new integer 13 non nls 1 localized key codes put j face resources get string escape to upper case new integer 27 non nls 1 localized key codes put j face resources get string esc to upper case new integer 27 non nls 1 localized key codes put j face resources get string delete to upper case new integer 127 non nls 1 localized key codes put j face resources get string space to upper case new integer non nls 1 localized key codes put j face resources get string arrow up to upper case new integer swt arrow up non nls 1 localized key codes put j face resources get string arrow down to upper case new integer swt arrow down non nls 1 localized key codes put j face resources get string arrow left to upper case new integer swt arrow left non nls 1 localized key codes put j face resources get string arrow right to upper case new integer swt arrow right non nls 1 localized key codes put j face resources get string page up to upper case new integer swt page up non nls 1 localized key codes put j face resources get string page down to upper case new integer swt page down non nls 1 localized key codes put j face resources get string home to upper case new integer swt home non nls 1 localized key codes put j face resources get string end to upper case new integer swt end non nls 1 localized key codes put j face resources get string insert to upper case new integer swt insert non nls 1 localized key codes put j face resources get string f1 to upper case new integer swt f1 non nls 1 localized key codes put j face resources get string f2 to upper case new integer swt f2 non nls 1 localized key codes put j face resources get string f3 to upper case new integer swt f3 non nls 1 localized key codes put j face resources get string f4 to upper case new integer swt f4 non nls 1 localized key codes put j face resources get string f5 to upper case new integer swt f5 non nls 1 localized key codes put j face resources get string f6 to upper case new integer swt f6 non nls 1 localized key codes put j face resources get string f7 to upper case new integer swt f7 non nls 1 localized key codes put j face resources get string f8 to upper case new integer swt f8 non nls 1 localized key codes put j face resources get string f9 to upper case new integer swt f9 non nls 1 localized key codes put j face resources get string f10 to upper case new integer swt f10 non nls 1 localized key codes put j face resources get string f11 to upper case new integer swt f11 non nls 1 localized key codes put j face resources get string f12 to upper case new integer swt f12 non nls 1 initlocalizedkeycodes localizedkeycodes hashmap localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring arrow_up touppercase arrow_up localizedkeycodes jfaceresources getstring arrow_down touppercase arrow_down localizedkeycodes jfaceresources getstring arrow_left touppercase arrow_left localizedkeycodes jfaceresources getstring arrow_right touppercase arrow_right localizedkeycodes jfaceresources getstring page_up touppercase page_up localizedkeycodes jfaceresources getstring page_down touppercase page_down localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase initializes the internal key string table private static void init key strings key strings new hash map 40 key strings put new integer 8 j face resources get string backspace non nls 1 key strings put new integer 9 j face resources get string tab non nls 1 key strings put new integer 13 j face resources get string return non nls 1 key strings put new integer 13 j face resources get string enter non nls 1 key strings put new integer 27 j face resources get string escape non nls 1 key strings put new integer 27 j face resources get string esc non nls 1 key strings put new integer 127 j face resources get string delete non nls 1 key strings put new integer j face resources get string space non nls 1 key strings put new integer swt arrow up j face resources get string arrow up non nls 1 key strings put new integer swt arrow down j face resources get string arrow down non nls 1 key strings put new integer swt arrow left j face resources get string arrow left non nls 1 key strings put new integer swt arrow right j face resources get string arrow right non nls 1 key strings put new integer swt page up j face resources get string page up non nls 1 key strings put new integer swt page down j face resources get string page down non nls 1 key strings put new integer swt home j face resources get string home non nls 1 key strings put new integer swt end j face resources get string end non nls 1 key strings put new integer swt insert j face resources get string insert non nls 1 key strings put new integer swt f1 j face resources get string f1 non nls 1 key strings put new integer swt f2 j face resources get string f2 non nls 1 key strings put new integer swt f3 j face resources get string f3 non nls 1 key strings put new integer swt f4 j face resources get string f4 non nls 1 key strings put new integer swt f5 j face resources get string f5 non nls 1 key strings put new integer swt f6 j face resources get string f6 non nls 1 key strings put new integer swt f7 j face resources get string f7 non nls 1 key strings put new integer swt f8 j face resources get string f8 non nls 1 key strings put new integer swt f9 j face resources get string f9 non nls 1 key strings put new integer swt f10 j face resources get string f10 non nls 1 key strings put new integer swt f11 j face resources get string f11 non nls 1 key strings put new integer swt f12 j face resources get string f12 non nls 1 initkeystrings keystrings hashmap keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings arrow_up jfaceresources getstring arrow_up keystrings arrow_down jfaceresources getstring arrow_down keystrings arrow_left jfaceresources getstring arrow_left keystrings arrow_right jfaceresources getstring arrow_right keystrings page_up jfaceresources getstring page_up keystrings page_down jfaceresources getstring page_down keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring method declared on i action public boolean is checked return value val toggle btn on value val radio btn on iaction ischecked val_toggle_btn_on val_radio_btn_on method declared on i action public boolean is enabled return enabled iaction isenabled method declared on i action public boolean is handled return true iaction ishandled convenience method for removing any optional accelerator text from the given string the accelerator text appears at the end of the text and is separated from the main part by a single tab character code t code param text the text return the text sans accelerator public static string remove accelerator text string text int index text last index of t if index 1 index text last index of if index 0 return text substring 0 index return text removeacceleratortext lastindexof lastindexof convenience method for removing any mnemonics from the given string for example code remove mnemonics open code will return code open code param text the text return the text sans mnemonics since 3 0 public static string remove mnemonics string text int index text index of if index 1 return text int len text length string buffer sb new string buffer len int last index 0 while index 1 ignore at the end if index len 1 break handle the case if text char at index 1 index dbcs languages use x format if index 0 text char at index 1 text length index 3 text char at index 2 sb append text substring last index index 1 index 3 else sb append text substring last index index skip the index last index index index text index of index if last index len sb append text substring last index len return sb to string removemnemonics removemnemonics indexof stringbuffer stringbuffer lastindex charat charat charat lastindex lastindex lastindex indexof lastindex lastindex tostring method declared on i action public void remove property change listener i property change listener listener listeners remove listener iaction removepropertychangelistener ipropertychangelistener the default implementation of this code i action code method does nothing subclasses should override this method if they do not need information from the triggering event or override code run with event event code if they do public void run do nothing iaction runwithevent the default implementation of this code i action code method ignores the event argument and simply calls code run code subclasses should override this method if they need information from the triggering event or override code run code if not param event the swt event which triggered this action being run since 2 0 public void run with event event event run iaction runwithevent method declared on i action public void set action definition id string id action definition id id iaction setactiondefinitionid actiondefinitionid public void set checked boolean checked object new value null for backward compatibility if the style is not set yet then convert it to a toggle button if value null value val toggle btn on value val toggle btn off new value checked val toggle btn on val toggle btn off else if value val radio btn on value val radio btn off new value checked val radio btn on val radio btn off else some other style already so do nothing return if new value value value new value if checked fire property change checked boolean false boolean true else fire property change checked boolean true boolean false setchecked newvalue val_toggle_btn_on val_toggle_btn_off newvalue val_toggle_btn_on val_toggle_btn_off val_radio_btn_on val_radio_btn_off newvalue val_radio_btn_on val_radio_btn_off newvalue newvalue firepropertychange firepropertychange public void set description string text if description null text null description null text null description null text null text equals description string old description description description text fire property change description old description description setdescription olddescription firepropertychange olddescription public void set disabled image descriptor image descriptor new image if disabled image new image image descriptor old image disabled image disabled image new image fire property change image old image new image setdisabledimagedescriptor imagedescriptor newimage disabledimage newimage imagedescriptor oldimage disabledimage disabledimage newimage firepropertychange oldimage newimage public void set enabled boolean enabled if enabled this enabled boolean old val this enabled boolean true boolean false boolean new val enabled boolean true boolean false this enabled enabled fire property change enabled old val new val setenabled oldval newval firepropertychange oldval newval method declared on i action public void set help listener help listener listener help listener listener iaction sethelplistener helplistener helplistener public void set hover image descriptor image descriptor new image if hover image new image image descriptor old image hover image hover image new image fire property change image old image new image sethoverimagedescriptor imagedescriptor newimage hoverimage newimage imagedescriptor oldimage hoverimage hoverimage newimage firepropertychange oldimage newimage method declared on i action public void set id string id this id id iaction setid public void set image descriptor image descriptor new image if image new image image descriptor old image image image new image fire property change image old image new image setimagedescriptor imagedescriptor newimage newimage imagedescriptor oldimage newimage firepropertychange oldimage newimage sets the menu creator for this action p note that if this method is called it overrides the check status p param creator the menu creator or code null code if none public void set menu creator i menu creator creator for backward compatibility if the style is not set yet then convert it to a drop down menu if value null value creator return if value instanceof i menu creator value creator null val drop down menu creator setmenucreator imenucreator imenucreator val_drop_down_menu sets the text for this action p fires a property change event for the code text code property if the text actually changes as a consequence p p the accelerator is identified by the last index of a tab character if there are no tab characters then it is identified by the last index of a character if neither then there is no accelerator text note that if you want to insert a character into the text but no accelerator you can simply insert a or a tab at the end of the text p param text the text or code null code if none public void set text string text string old text this text int old accel this accelerator this text text if text null string accelerator text extract accelerator text text if accelerator text null int new accelerator convert localized accelerator accelerator text be sure to not wipe out the accelerator if nothing found if new accelerator 0 set accelerator new accelerator if this accelerator old accel old text null this text null old text equals this text fire property change text old text this text settext oldtext oldaccel acceleratortext extractacceleratortext acceleratortext newaccelerator convertlocalizedaccelerator acceleratortext newaccelerator setaccelerator newaccelerator oldaccel oldtext oldtext firepropertychange oldtext sets the tool tip text for this action p fires a property change event for the code tool tip text code property if the tool tip text actually changes as a consequence p param tool tip text the tool tip text or code null code if none public void set tool tip text string tool tip text string old tool tip text this tool tip text if old tool tip text null tool tip text null old tool tip text equals tool tip text this tool tip text tool tip text fire property change tool tip text old tool tip text tool tip text tool_tip_text tooltiptext settooltiptext tooltiptext oldtooltiptext tooltiptext oldtooltiptext tooltiptext oldtooltiptext tooltiptext tooltiptext tooltiptext firepropertychange tool_tip_text oldtooltiptext tooltiptext see i action set accelerator int public void set accelerator int keycode this accelerator keycode iaction setaccelerator setaccelerator reports the outcome of the running of this action via the link i action result property param success code true code if the action succeeded and code false code if the action failed or was not completed see i action result since 3 0 public final void notify result boolean success avoid boolean value of boolean to allow compilation against jcl foundation bug 80059 fire property change result null success boolean true boolean false iaction iaction notifyresult valueof firepropertychange private static final i menu creator val drop down menu new i menu creator public void dispose do nothing imenucreator val_drop_down_menu imenucreator public menu get menu control parent do nothing return null getmenu public menu get menu menu parent do nothing return null getmenu creates a new action with no text and no image p configure the action later using the set methods p protected action do nothing creates a new action with the given text and no image calls the zero arg constructor then code set text code param text the string used as the text for the action or code null code if there is no text see set text protected action string text this set text text settext settext settext creates a new action with the given text and image calls the zero arg constructor then code set text code and code set image descriptor code param text the action s text or code null code if there is no text param image the action s image or code null code if there is no image see set text see set image descriptor protected action string text image descriptor image this text set image descriptor image settext setimagedescriptor settext setimagedescriptor imagedescriptor setimagedescriptor creates a new action with the given text and style param text the action s text or code null code if there is no text param style one of code as push button code code as check box code code as drop down menu code code as radio button code and code as unspecified code protected action string text int style this text switch style case as push button value val push btn break case as check box value val toggle btn off break case as drop down menu value val drop down menu break case as radio button value val radio btn off break as_push_button as_check_box as_drop_down_menu as_radio_button as_unspecified as_push_button val_push_btn as_check_box val_toggle_btn_off as_drop_down_menu val_drop_down_menu as_radio_button val_radio_btn_off method declared on i action public void add property change listener i property change listener listener listeners add listener iaction addpropertychangelistener ipropertychangelistener parses the given accelerator text and converts it to an accelerator key code support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml param accelerator text the accelerator text localized to the current locale return the swt key code or 0 if there is no accelerator private static int convert localized accelerator string accelerator text int accelerator 0 string tokenizer stok new string tokenizer accelerator text non nls 1 int key code 1 boolean has more tokens stok has more tokens while has more tokens string token stok next token has more tokens stok has more tokens every token except the last must be one of the modifiers ctrl shift alt or command if has more tokens int modifier find localized modifier token if modifier 0 accelerator modifier else leave if there are none return 0 else key code find localized key code token if key code 1 accelerator key code return accelerator setaccelerator acceleratortext convertlocalizedaccelerator acceleratortext stringtokenizer stringtokenizer acceleratortext keycode hasmoretokens hasmoretokens hasmoretokens nexttoken hasmoretokens hasmoretokens hasmoretokens findlocalizedmodifier keycode findlocalizedkeycode keycode keycode parses the given accelerator text and converts it to an accelerator key code param accelerator text the accelerator text return the swt key code or 0 if there is no accelerator public static int convert accelerator string accelerator text int accelerator 0 string tokenizer stok new string tokenizer accelerator text non nls 1 int key code 1 boolean has more tokens stok has more tokens while has more tokens string token stok next token has more tokens stok has more tokens every token except the last must be one of the modifiers ctrl shift alt or command if has more tokens int modifier find modifier token if modifier 0 accelerator modifier else leave if there are none return 0 else key code find key code token if key code 1 accelerator key code return accelerator acceleratortext convertaccelerator acceleratortext stringtokenizer stringtokenizer acceleratortext keycode hasmoretokens hasmoretokens hasmoretokens nexttoken hasmoretokens hasmoretokens hasmoretokens findmodifier keycode findkeycode keycode keycode converts an accelerator key code to a string representation param key code the key code to be translated return a string representation of the key code public static string convert accelerator int key code string modifier get modifier string key code string full key if modifier equals non nls 1 full key find key string key code else full key modifier find key string key code non nls 1 return full key keycode convertaccelerator keycode getmodifierstring keycode fullkey fullkey findkeystring keycode fullkey findkeystring keycode fullkey private static string get modifier string int key code string mod string non nls 1 if key code swt ctrl 0 mod string find modifier string key code swt ctrl if key code swt alt 0 if mod string equals non nls 1 mod string find modifier string key code swt alt else mod string mod string find modifier string key code swt alt non nls 1 if key code swt shift 0 if mod string equals non nls 1 mod string find modifier string key code swt shift else mod string mod string find modifier string key code swt shift non nls 1 if key code swt command 0 if mod string equals non nls 1 mod string find modifier string key code swt command else mod string mod string find modifier string key code swt command non nls 1 return mod string getmodifierstring keycode modstring keycode modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode modstring extracts the accelerator text from the given text returns code null code if there is no accelerator text and the empty string if there is no text after the accelerator delimeter tab or param text the text for the action return the accelerator text or code null code private static string extract accelerator text string text int index text last index of t if index 1 index text last index of if index 0 return text substring index 1 return null extractacceleratortext lastindexof lastindexof maps a standard keyboard key name to an swt key code key names are converted to upper case before comparison if the key name is a single letter for example s its character code is returned p the following key names are known case is ignored ul li code backspace code li li code tab code li li code return code li li code enter code li li code esc code li li code escape code li li code delete code li li code space code li li code arrow up code code arrow down code code arrow left code and code arrow right code li li code page up code and code page down code li li code home code li li code end code li li code insert code li li code f1 code code f2 code through code f12 code li ul p param token the key name return the swt key code code 1 code if no match was found see swt public static int find key code string token if key codes null init key codes token token to upper case integer i integer key codes get token if i null return i int value if token length 1 return token char at 0 return 1 arrow_up arrow_down arrow_left arrow_right page_up page_down findkeycode keycodes initkeycodes touppercase keycodes intvalue charat find the supplied code for a localized key as find key code but localized to the current locale support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml param token the localized key name return the swt key code code 1 code if no match was found see find key code private static int find localized key code string token if localized key codes null init localized key codes token token to upper case integer i integer localized key codes get token if i null return i int value if token length 1 return token char at 0 return 1 findkeycode setaccelerator findkeycode findlocalizedkeycode localizedkeycodes initlocalizedkeycodes touppercase localizedkeycodes intvalue charat maps an swt key code to a standard keyboard key name the key code is stripped of modifiers swt ctrl swt alt swt shift and swt command if the key code is not an swt code for example if it a key code for the key s a string containing a character representation of the key code is returned param key code the key code to be translated return the string representation of the key code see swt since 2 0 public static string find key string int key code if key strings null init key strings int i key code swt ctrl swt alt swt shift swt command integer integer new integer i string result string key strings get integer if result null return result result new string new char char i return result keycode findkeystring keycode keystrings initkeystrings keycode keystrings maps standard keyboard modifier key names to the corresponding swt modifier bit the following modifier key names are recognized case is ignored code ctrl code code shift code code alt code and code command code the given modifier key name is converted to upper case before comparison param token the modifier key name return the swt modifier bit or code 0 code if no match was found see swt public static int find modifier string token token token to upper case if token equals ctrl non nls 1 return swt ctrl if token equals shift non nls 1 return swt shift if token equals alt non nls 1 return swt alt if token equals command non nls 1 return swt command return 0 findmodifier touppercase maps the localized modifier names to a code in the same manner as find modifier support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml see find modifier private static int find localized modifier string token if localized ctrl null init localized modifiers token token to upper case if token equals localized ctrl non nls 1 return swt ctrl if token equals localized shift non nls 1 return swt shift if token equals localized alt non nls 1 return swt alt if token equals localized command non nls 1 return swt command return 0 findmodifier setaccelerator findmodifier findlocalizedmodifier localized_ctrl initlocalizedmodifiers touppercase localized_ctrl localized_shift localized_alt localized_command initialize the list of localized modifiers private static void init localized modifiers localized ctrl j face resources get string ctrl to upper case non nls 1 localized shift j face resources get string shift to upper case non nls 1 localized alt j face resources get string alt to upper case non nls 1 localized command j face resources get string command to upper case non nls 1 initlocalizedmodifiers localized_ctrl jfaceresources getstring touppercase localized_shift jfaceresources getstring touppercase localized_alt jfaceresources getstring touppercase localized_command jfaceresources getstring touppercase returns a string representation of an swt modifier bit swt ctrl swt alt swt shift and swt command returns code null code if the key code is not an swt modifier bit param key code the swt modifier bit to be translated return the string representation of the swt modifier bit or code null code if the key code was not an swt modifier bit see swt since 2 0 public static string find modifier string int key code if key code swt ctrl return j face resources get string ctrl non nls 1 if key code swt alt return j face resources get string alt non nls 1 if key code swt shift return j face resources get string shift non nls 1 if key code swt command return j face resources get string command non nls 1 return null keycode findmodifierstring keycode keycode jfaceresources getstring keycode jfaceresources getstring keycode jfaceresources getstring keycode jfaceresources getstring notifies any property change listeners that a property has changed only listeners registered at the time this method is called are notified this method avoids creating an event object if there are no listeners registered but calls code fire property change property change event code if there are param property name the name of the property that has changed param old value the old value of the property or code null code if none param new value the new value of the property or code null code if none see i property change listener property change protected void fire property change string property name object old value object new value if listeners is empty fire property change new property change event this property name old value new value firepropertychange propertychangeevent propertyname oldvalue newvalue ipropertychangelistener propertychange firepropertychange propertyname oldvalue newvalue isempty firepropertychange propertychangeevent propertyname oldvalue newvalue notifies any property change listeners that a property has changed only listeners registered at the time this method is called are notified param event the property change event see i property change listener property change protected void fire property change property change event event object list this listeners get listeners for int i 0 i list length i i property change listener list i property change event ipropertychangelistener propertychange firepropertychange propertychangeevent getlisteners ipropertychangelistener propertychange method declared on i action public int get accelerator return accelerator iaction getaccelerator public string get action definition id return action definition id getactiondefinitionid actiondefinitionid public string get description if description null return description return get tool tip text getdescription gettooltiptext method declared on i action public image descriptor get disabled image descriptor return disabled image iaction imagedescriptor getdisabledimagedescriptor disabledimage method declared on i action public help listener get help listener return help listener iaction helplistener gethelplistener helplistener method declared on i action public image descriptor get hover image descriptor return hover image iaction imagedescriptor gethoverimagedescriptor hoverimage method declared on i action public string get id return id iaction getid method declared on i action public image descriptor get image descriptor return image iaction imagedescriptor getimagedescriptor public i menu creator get menu creator the default drop down menu value is only used to mark this action requested style so do not return it for backward compatibility reasons if value val drop down menu return null if value instanceof i menu creator return i menu creator value return null imenucreator getmenucreator val_drop_down_menu imenucreator imenucreator public int get style infer the style from the value field if value val push btn value null return as push button if value val toggle btn on value val toggle btn off return as check box if value val radio btn on value val radio btn off return as radio button if value instanceof i menu creator return as drop down menu we should never get to this line return as push button getstyle val_push_btn as_push_button val_toggle_btn_on val_toggle_btn_off as_check_box val_radio_btn_on val_radio_btn_off as_radio_button imenucreator as_drop_down_menu as_push_button method declared on i action public string get text return text iaction gettext method declared on i action public string get tool tip text return tool tip text iaction gettooltiptext tooltiptext initializes the internal key code table private static void init key codes key codes new hash map 40 key codes put backspace new integer 8 non nls 1 key codes put tab new integer 9 non nls 1 key codes put return new integer 13 non nls 1 key codes put enter new integer 13 non nls 1 key codes put escape new integer 27 non nls 1 key codes put esc new integer 27 non nls 1 key codes put delete new integer 127 non nls 1 key codes put space new integer non nls 1 key codes put arrow up new integer swt arrow up non nls 1 key codes put arrow down new integer swt arrow down non nls 1 key codes put arrow left new integer swt arrow left non nls 1 key codes put arrow right new integer swt arrow right non nls 1 key codes put page up new integer swt page up non nls 1 key codes put page down new integer swt page down non nls 1 key codes put home new integer swt home non nls 1 key codes put end new integer swt end non nls 1 key codes put insert new integer swt insert non nls 1 key codes put f1 new integer swt f1 non nls 1 key codes put f2 new integer swt f2 non nls 1 key codes put f3 new integer swt f3 non nls 1 key codes put f4 new integer swt f4 non nls 1 key codes put f5 new integer swt f5 non nls 1 key codes put f6 new integer swt f6 non nls 1 key codes put f7 new integer swt f7 non nls 1 key codes put f8 new integer swt f8 non nls 1 key codes put f9 new integer swt f9 non nls 1 key codes put f10 new integer swt f10 non nls 1 key codes put f11 new integer swt f11 non nls 1 key codes put f12 new integer swt f12 non nls 1 initkeycodes keycodes hashmap keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes arrow_up arrow_up keycodes arrow_down arrow_down keycodes arrow_left arrow_left keycodes arrow_right arrow_right keycodes page_up page_up keycodes page_down page_down keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes initializes the localized internal key code table private static void init localized key codes localized key codes new hash map 40 localized key codes put j face resources get string backspace to upper case new integer 8 non nls 1 localized key codes put j face resources get string tab to upper case new integer 9 non nls 1 localized key codes put j face resources get string return to upper case new integer 13 non nls 1 localized key codes put j face resources get string enter to upper case new integer 13 non nls 1 localized key codes put j face resources get string escape to upper case new integer 27 non nls 1 localized key codes put j face resources get string esc to upper case new integer 27 non nls 1 localized key codes put j face resources get string delete to upper case new integer 127 non nls 1 localized key codes put j face resources get string space to upper case new integer non nls 1 localized key codes put j face resources get string arrow up to upper case new integer swt arrow up non nls 1 localized key codes put j face resources get string arrow down to upper case new integer swt arrow down non nls 1 localized key codes put j face resources get string arrow left to upper case new integer swt arrow left non nls 1 localized key codes put j face resources get string arrow right to upper case new integer swt arrow right non nls 1 localized key codes put j face resources get string page up to upper case new integer swt page up non nls 1 localized key codes put j face resources get string page down to upper case new integer swt page down non nls 1 localized key codes put j face resources get string home to upper case new integer swt home non nls 1 localized key codes put j face resources get string end to upper case new integer swt end non nls 1 localized key codes put j face resources get string insert to upper case new integer swt insert non nls 1 localized key codes put j face resources get string f1 to upper case new integer swt f1 non nls 1 localized key codes put j face resources get string f2 to upper case new integer swt f2 non nls 1 localized key codes put j face resources get string f3 to upper case new integer swt f3 non nls 1 localized key codes put j face resources get string f4 to upper case new integer swt f4 non nls 1 localized key codes put j face resources get string f5 to upper case new integer swt f5 non nls 1 localized key codes put j face resources get string f6 to upper case new integer swt f6 non nls 1 localized key codes put j face resources get string f7 to upper case new integer swt f7 non nls 1 localized key codes put j face resources get string f8 to upper case new integer swt f8 non nls 1 localized key codes put j face resources get string f9 to upper case new integer swt f9 non nls 1 localized key codes put j face resources get string f10 to upper case new integer swt f10 non nls 1 localized key codes put j face resources get string f11 to upper case new integer swt f11 non nls 1 localized key codes put j face resources get string f12 to upper case new integer swt f12 non nls 1 initlocalizedkeycodes localizedkeycodes hashmap localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring arrow_up touppercase arrow_up localizedkeycodes jfaceresources getstring arrow_down touppercase arrow_down localizedkeycodes jfaceresources getstring arrow_left touppercase arrow_left localizedkeycodes jfaceresources getstring arrow_right touppercase arrow_right localizedkeycodes jfaceresources getstring page_up touppercase page_up localizedkeycodes jfaceresources getstring page_down touppercase page_down localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase initializes the internal key string table private static void init key strings key strings new hash map 40 key strings put new integer 8 j face resources get string backspace non nls 1 key strings put new integer 9 j face resources get string tab non nls 1 key strings put new integer 13 j face resources get string return non nls 1 key strings put new integer 13 j face resources get string enter non nls 1 key strings put new integer 27 j face resources get string escape non nls 1 key strings put new integer 27 j face resources get string esc non nls 1 key strings put new integer 127 j face resources get string delete non nls 1 key strings put new integer j face resources get string space non nls 1 key strings put new integer swt arrow up j face resources get string arrow up non nls 1 key strings put new integer swt arrow down j face resources get string arrow down non nls 1 key strings put new integer swt arrow left j face resources get string arrow left non nls 1 key strings put new integer swt arrow right j face resources get string arrow right non nls 1 key strings put new integer swt page up j face resources get string page up non nls 1 key strings put new integer swt page down j face resources get string page down non nls 1 key strings put new integer swt home j face resources get string home non nls 1 key strings put new integer swt end j face resources get string end non nls 1 key strings put new integer swt insert j face resources get string insert non nls 1 key strings put new integer swt f1 j face resources get string f1 non nls 1 key strings put new integer swt f2 j face resources get string f2 non nls 1 key strings put new integer swt f3 j face resources get string f3 non nls 1 key strings put new integer swt f4 j face resources get string f4 non nls 1 key strings put new integer swt f5 j face resources get string f5 non nls 1 key strings put new integer swt f6 j face resources get string f6 non nls 1 key strings put new integer swt f7 j face resources get string f7 non nls 1 key strings put new integer swt f8 j face resources get string f8 non nls 1 key strings put new integer swt f9 j face resources get string f9 non nls 1 key strings put new integer swt f10 j face resources get string f10 non nls 1 key strings put new integer swt f11 j face resources get string f11 non nls 1 key strings put new integer swt f12 j face resources get string f12 non nls 1 initkeystrings keystrings hashmap keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings arrow_up jfaceresources getstring arrow_up keystrings arrow_down jfaceresources getstring arrow_down keystrings arrow_left jfaceresources getstring arrow_left keystrings arrow_right jfaceresources getstring arrow_right keystrings page_up jfaceresources getstring page_up keystrings page_down jfaceresources getstring page_down keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring method declared on i action public boolean is checked return value val toggle btn on value val radio btn on iaction ischecked val_toggle_btn_on val_radio_btn_on method declared on i action public boolean is enabled return enabled iaction isenabled method declared on i action public boolean is handled return true iaction ishandled convenience method for removing any optional accelerator text from the given string the accelerator text appears at the end of the text and is separated from the main part by a single tab character code t code param text the text return the text sans accelerator public static string remove accelerator text string text int index text last index of t if index 1 index text last index of if index 0 return text substring 0 index return text removeacceleratortext lastindexof lastindexof convenience method for removing any mnemonics from the given string for example code remove mnemonics open code will return code open code param text the text return the text sans mnemonics since 3 0 public static string remove mnemonics string text int index text index of if index 1 return text int len text length string buffer sb new string buffer len int last index 0 while index 1 ignore at the end if index len 1 break handle the case if text char at index 1 index dbcs languages use x format if index 0 text char at index 1 text length index 3 text char at index 2 sb append text substring last index index 1 index 3 else sb append text substring last index index skip the index last index index index text index of index if last index len sb append text substring last index len return sb to string removemnemonics removemnemonics indexof stringbuffer stringbuffer lastindex charat charat charat lastindex lastindex lastindex indexof lastindex lastindex tostring method declared on i action public void remove property change listener i property change listener listener listeners remove listener iaction removepropertychangelistener ipropertychangelistener the default implementation of this code i action code method does nothing subclasses should override this method if they do not need information from the triggering event or override code run with event event code if they do public void run do nothing iaction runwithevent the default implementation of this code i action code method ignores the event argument and simply calls code run code subclasses should override this method if they need information from the triggering event or override code run code if not param event the swt event which triggered this action being run since 2 0 public void run with event event event run iaction runwithevent method declared on i action public void set action definition id string id action definition id id iaction setactiondefinitionid actiondefinitionid public void set checked boolean checked object new value null for backward compatibility if the style is not set yet then convert it to a toggle button if value null value val toggle btn on value val toggle btn off new value checked val toggle btn on val toggle btn off else if value val radio btn on value val radio btn off new value checked val radio btn on val radio btn off else some other style already so do nothing return if new value value value new value if checked fire property change checked boolean false boolean true else fire property change checked boolean true boolean false setchecked newvalue val_toggle_btn_on val_toggle_btn_off newvalue val_toggle_btn_on val_toggle_btn_off val_radio_btn_on val_radio_btn_off newvalue val_radio_btn_on val_radio_btn_off newvalue newvalue firepropertychange firepropertychange public void set description string text if description null text null description null text null description null text null text equals description string old description description description text fire property change description old description description setdescription olddescription firepropertychange olddescription public void set disabled image descriptor image descriptor new image if disabled image new image image descriptor old image disabled image disabled image new image fire property change image old image new image setdisabledimagedescriptor imagedescriptor newimage disabledimage newimage imagedescriptor oldimage disabledimage disabledimage newimage firepropertychange oldimage newimage public void set enabled boolean enabled if enabled this enabled boolean old val this enabled boolean true boolean false boolean new val enabled boolean true boolean false this enabled enabled fire property change enabled old val new val setenabled oldval newval firepropertychange oldval newval method declared on i action public void set help listener help listener listener help listener listener iaction sethelplistener helplistener helplistener public void set hover image descriptor image descriptor new image if hover image new image image descriptor old image hover image hover image new image fire property change image old image new image sethoverimagedescriptor imagedescriptor newimage hoverimage newimage imagedescriptor oldimage hoverimage hoverimage newimage firepropertychange oldimage newimage method declared on i action public void set id string id this id id iaction setid public void set image descriptor image descriptor new image if image new image image descriptor old image image image new image fire property change image old image new image setimagedescriptor imagedescriptor newimage newimage imagedescriptor oldimage newimage firepropertychange oldimage newimage sets the menu creator for this action p note that if this method is called it overrides the check status p param creator the menu creator or code null code if none public void set menu creator i menu creator creator for backward compatibility if the style is not set yet then convert it to a drop down menu if value null value creator return if value instanceof i menu creator value creator null val drop down menu creator setmenucreator imenucreator imenucreator val_drop_down_menu sets the text for this action p fires a property change event for the code text code property if the text actually changes as a consequence p p the accelerator is identified by the last index of a tab character if there are no tab characters then it is identified by the last index of a character if neither then there is no accelerator text note that if you want to insert a character into the text but no accelerator you can simply insert a or a tab at the end of the text p param text the text or code null code if none public void set text string text string old text this text int old accel this accelerator this text text if text null string accelerator text extract accelerator text text if accelerator text null int new accelerator convert localized accelerator accelerator text be sure to not wipe out the accelerator if nothing found if new accelerator 0 set accelerator new accelerator if this accelerator old accel old text null this text null old text equals this text fire property change text old text this text settext oldtext oldaccel acceleratortext extractacceleratortext acceleratortext newaccelerator convertlocalizedaccelerator acceleratortext newaccelerator setaccelerator newaccelerator oldaccel oldtext oldtext firepropertychange oldtext sets the tool tip text for this action p fires a property change event for the code tool tip text code property if the tool tip text actually changes as a consequence p param tool tip text the tool tip text or code null code if none public void set tool tip text string tool tip text string old tool tip text this tool tip text if old tool tip text null tool tip text null old tool tip text equals tool tip text this tool tip text tool tip text fire property change tool tip text old tool tip text tool tip text tool_tip_text tooltiptext settooltiptext tooltiptext oldtooltiptext tooltiptext oldtooltiptext tooltiptext oldtooltiptext tooltiptext tooltiptext tooltiptext firepropertychange tool_tip_text oldtooltiptext tooltiptext see i action set accelerator int public void set accelerator int keycode this accelerator keycode iaction setaccelerator setaccelerator reports the outcome of the running of this action via the link i action result property param success code true code if the action succeeded and code false code if the action failed or was not completed see i action result since 3 0 public final void notify result boolean success avoid boolean value of boolean to allow compilation against jcl foundation bug 80059 fire property change result null success boolean true boolean false iaction iaction notifyresult valueof firepropertychange private static final i menu creator val drop down menu new i menu creator public void dispose do nothing imenucreator val_drop_down_menu imenucreator public menu get menu control parent do nothing return null getmenu public menu get menu menu parent do nothing return null getmenu creates a new action with no text and no image p configure the action later using the set methods p protected action do nothing creates a new action with the given text and no image calls the zero arg constructor then code set text code param text the string used as the text for the action or code null code if there is no text see set text protected action string text this set text text settext settext settext creates a new action with the given text and image calls the zero arg constructor then code set text code and code set image descriptor code param text the action s text or code null code if there is no text param image the action s image or code null code if there is no image see set text see set image descriptor protected action string text image descriptor image this text set image descriptor image settext setimagedescriptor settext setimagedescriptor imagedescriptor setimagedescriptor creates a new action with the given text and style param text the action s text or code null code if there is no text param style one of code as push button code code as check box code code as drop down menu code code as radio button code and code as unspecified code protected action string text int style this text switch style case as push button value val push btn break case as check box value val toggle btn off break case as drop down menu value val drop down menu break case as radio button value val radio btn off break as_push_button as_check_box as_drop_down_menu as_radio_button as_unspecified as_push_button val_push_btn as_check_box val_toggle_btn_off as_drop_down_menu val_drop_down_menu as_radio_button val_radio_btn_off method declared on i action public void add property change listener i property change listener listener listeners add listener iaction addpropertychangelistener ipropertychangelistener parses the given accelerator text and converts it to an accelerator key code support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml param accelerator text the accelerator text localized to the current locale return the swt key code or 0 if there is no accelerator private static int convert localized accelerator string accelerator text int accelerator 0 string tokenizer stok new string tokenizer accelerator text non nls 1 int key code 1 boolean has more tokens stok has more tokens while has more tokens string token stok next token has more tokens stok has more tokens every token except the last must be one of the modifiers ctrl shift alt or command if has more tokens int modifier find localized modifier token if modifier 0 accelerator modifier else leave if there are none return 0 else key code find localized key code token if key code 1 accelerator key code return accelerator setaccelerator acceleratortext convertlocalizedaccelerator acceleratortext stringtokenizer stringtokenizer acceleratortext keycode hasmoretokens hasmoretokens hasmoretokens nexttoken hasmoretokens hasmoretokens hasmoretokens findlocalizedmodifier keycode findlocalizedkeycode keycode keycode parses the given accelerator text and converts it to an accelerator key code param accelerator text the accelerator text return the swt key code or 0 if there is no accelerator public static int convert accelerator string accelerator text int accelerator 0 string tokenizer stok new string tokenizer accelerator text non nls 1 int key code 1 boolean has more tokens stok has more tokens while has more tokens string token stok next token has more tokens stok has more tokens every token except the last must be one of the modifiers ctrl shift alt or command if has more tokens int modifier find modifier token if modifier 0 accelerator modifier else leave if there are none return 0 else key code find key code token if key code 1 accelerator key code return accelerator acceleratortext convertaccelerator acceleratortext stringtokenizer stringtokenizer acceleratortext keycode hasmoretokens hasmoretokens hasmoretokens nexttoken hasmoretokens hasmoretokens hasmoretokens findmodifier keycode findkeycode keycode keycode converts an accelerator key code to a string representation param key code the key code to be translated return a string representation of the key code public static string convert accelerator int key code string modifier get modifier string key code string full key if modifier equals non nls 1 full key find key string key code else full key modifier find key string key code non nls 1 return full key keycode convertaccelerator keycode getmodifierstring keycode fullkey fullkey findkeystring keycode fullkey findkeystring keycode fullkey private static string get modifier string int key code string mod string non nls 1 if key code swt ctrl 0 mod string find modifier string key code swt ctrl if key code swt alt 0 if mod string equals non nls 1 mod string find modifier string key code swt alt else mod string mod string find modifier string key code swt alt non nls 1 if key code swt shift 0 if mod string equals non nls 1 mod string find modifier string key code swt shift else mod string mod string find modifier string key code swt shift non nls 1 if key code swt command 0 if mod string equals non nls 1 mod string find modifier string key code swt command else mod string mod string find modifier string key code swt command non nls 1 return mod string getmodifierstring keycode modstring keycode modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode modstring extracts the accelerator text from the given text returns code null code if there is no accelerator text and the empty string if there is no text after the accelerator delimeter tab or param text the text for the action return the accelerator text or code null code private static string extract accelerator text string text int index text last index of t if index 1 index text last index of if index 0 return text substring index 1 return null extractacceleratortext lastindexof lastindexof maps a standard keyboard key name to an swt key code key names are converted to upper case before comparison if the key name is a single letter for example s its character code is returned p the following key names are known case is ignored ul li code backspace code li li code tab code li li code return code li li code enter code li li code esc code li li code escape code li li code delete code li li code space code li li code arrow up code code arrow down code code arrow left code and code arrow right code li li code page up code and code page down code li li code home code li li code end code li li code insert code li li code f1 code code f2 code through code f12 code li ul p param token the key name return the swt key code code 1 code if no match was found see swt public static int find key code string token if key codes null init key codes token token to upper case integer i integer key codes get token if i null return i int value if token length 1 return token char at 0 return 1 arrow_up arrow_down arrow_left arrow_right page_up page_down findkeycode keycodes initkeycodes touppercase keycodes intvalue charat find the supplied code for a localized key as find key code but localized to the current locale support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml param token the localized key name return the swt key code code 1 code if no match was found see find key code private static int find localized key code string token if localized key codes null init localized key codes token token to upper case integer i integer localized key codes get token if i null return i int value if token length 1 return token char at 0 return 1 findkeycode setaccelerator findkeycode findlocalizedkeycode localizedkeycodes initlocalizedkeycodes touppercase localizedkeycodes intvalue charat maps an swt key code to a standard keyboard key name the key code is stripped of modifiers swt ctrl swt alt swt shift and swt command if the key code is not an swt code for example if it a key code for the key s a string containing a character representation of the key code is returned param key code the key code to be translated return the string representation of the key code see swt since 2 0 public static string find key string int key code if key strings null init key strings int i key code swt ctrl swt alt swt shift swt command integer integer new integer i string result string key strings get integer if result null return result result new string new char char i return result keycode findkeystring keycode keystrings initkeystrings keycode keystrings maps standard keyboard modifier key names to the corresponding swt modifier bit the following modifier key names are recognized case is ignored code ctrl code code shift code code alt code and code command code the given modifier key name is converted to upper case before comparison param token the modifier key name return the swt modifier bit or code 0 code if no match was found see swt public static int find modifier string token token token to upper case if token equals ctrl non nls 1 return swt ctrl if token equals shift non nls 1 return swt shift if token equals alt non nls 1 return swt alt if token equals command non nls 1 return swt command return 0 findmodifier touppercase maps the localized modifier names to a code in the same manner as find modifier support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml see find modifier private static int find localized modifier string token if localized ctrl null init localized modifiers token token to upper case if token equals localized ctrl non nls 1 return swt ctrl if token equals localized shift non nls 1 return swt shift if token equals localized alt non nls 1 return swt alt if token equals localized command non nls 1 return swt command return 0 findmodifier setaccelerator findmodifier findlocalizedmodifier localized_ctrl initlocalizedmodifiers touppercase localized_ctrl localized_shift localized_alt localized_command initialize the list of localized modifiers private static void init localized modifiers localized ctrl j face resources get string ctrl to upper case non nls 1 localized shift j face resources get string shift to upper case non nls 1 localized alt j face resources get string alt to upper case non nls 1 localized command j face resources get string command to upper case non nls 1 initlocalizedmodifiers localized_ctrl jfaceresources getstring touppercase localized_shift jfaceresources getstring touppercase localized_alt jfaceresources getstring touppercase localized_command jfaceresources getstring touppercase returns a string representation of an swt modifier bit swt ctrl swt alt swt shift and swt command returns code null code if the key code is not an swt modifier bit param key code the swt modifier bit to be translated return the string representation of the swt modifier bit or code null code if the key code was not an swt modifier bit see swt since 2 0 public static string find modifier string int key code if key code swt ctrl return j face resources get string ctrl non nls 1 if key code swt alt return j face resources get string alt non nls 1 if key code swt shift return j face resources get string shift non nls 1 if key code swt command return j face resources get string command non nls 1 return null keycode findmodifierstring keycode keycode jfaceresources getstring keycode jfaceresources getstring keycode jfaceresources getstring keycode jfaceresources getstring notifies any property change listeners that a property has changed only listeners registered at the time this method is called are notified this method avoids creating an event object if there are no listeners registered but calls code fire property change property change event code if there are param property name the name of the property that has changed param old value the old value of the property or code null code if none param new value the new value of the property or code null code if none see i property change listener property change protected void fire property change string property name object old value object new value if listeners is empty fire property change new property change event this property name old value new value firepropertychange propertychangeevent propertyname oldvalue newvalue ipropertychangelistener propertychange firepropertychange propertyname oldvalue newvalue isempty firepropertychange propertychangeevent propertyname oldvalue newvalue notifies any property change listeners that a property has changed only listeners registered at the time this method is called are notified param event the property change event see i property change listener property change protected void fire property change property change event event object list this listeners get listeners for int i 0 i list length i i property change listener list i property change event ipropertychangelistener propertychange firepropertychange propertychangeevent getlisteners ipropertychangelistener propertychange method declared on i action public int get accelerator return accelerator iaction getaccelerator public string get action definition id return action definition id getactiondefinitionid actiondefinitionid public string get description if description null return description return get tool tip text getdescription gettooltiptext method declared on i action public image descriptor get disabled image descriptor return disabled image iaction imagedescriptor getdisabledimagedescriptor disabledimage method declared on i action public help listener get help listener return help listener iaction helplistener gethelplistener helplistener method declared on i action public image descriptor get hover image descriptor return hover image iaction imagedescriptor gethoverimagedescriptor hoverimage method declared on i action public string get id return id iaction getid method declared on i action public image descriptor get image descriptor return image iaction imagedescriptor getimagedescriptor public i menu creator get menu creator the default drop down menu value is only used to mark this action requested style so do not return it for backward compatibility reasons if value val drop down menu return null if value instanceof i menu creator return i menu creator value return null imenucreator getmenucreator val_drop_down_menu imenucreator imenucreator public int get style infer the style from the value field if value val push btn value null return as push button if value val toggle btn on value val toggle btn off return as check box if value val radio btn on value val radio btn off return as radio button if value instanceof i menu creator return as drop down menu we should never get to this line return as push button getstyle val_push_btn as_push_button val_toggle_btn_on val_toggle_btn_off as_check_box val_radio_btn_on val_radio_btn_off as_radio_button imenucreator as_drop_down_menu as_push_button method declared on i action public string get text return text iaction gettext method declared on i action public string get tool tip text return tool tip text iaction gettooltiptext tooltiptext initializes the internal key code table private static void init key codes key codes new hash map 40 key codes put backspace new integer 8 non nls 1 key codes put tab new integer 9 non nls 1 key codes put return new integer 13 non nls 1 key codes put enter new integer 13 non nls 1 key codes put escape new integer 27 non nls 1 key codes put esc new integer 27 non nls 1 key codes put delete new integer 127 non nls 1 key codes put space new integer non nls 1 key codes put arrow up new integer swt arrow up non nls 1 key codes put arrow down new integer swt arrow down non nls 1 key codes put arrow left new integer swt arrow left non nls 1 key codes put arrow right new integer swt arrow right non nls 1 key codes put page up new integer swt page up non nls 1 key codes put page down new integer swt page down non nls 1 key codes put home new integer swt home non nls 1 key codes put end new integer swt end non nls 1 key codes put insert new integer swt insert non nls 1 key codes put f1 new integer swt f1 non nls 1 key codes put f2 new integer swt f2 non nls 1 key codes put f3 new integer swt f3 non nls 1 key codes put f4 new integer swt f4 non nls 1 key codes put f5 new integer swt f5 non nls 1 key codes put f6 new integer swt f6 non nls 1 key codes put f7 new integer swt f7 non nls 1 key codes put f8 new integer swt f8 non nls 1 key codes put f9 new integer swt f9 non nls 1 key codes put f10 new integer swt f10 non nls 1 key codes put f11 new integer swt f11 non nls 1 key codes put f12 new integer swt f12 non nls 1 initkeycodes keycodes hashmap keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes arrow_up arrow_up keycodes arrow_down arrow_down keycodes arrow_left arrow_left keycodes arrow_right arrow_right keycodes page_up page_up keycodes page_down page_down keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes initializes the localized internal key code table private static void init localized key codes localized key codes new hash map 40 localized key codes put j face resources get string backspace to upper case new integer 8 non nls 1 localized key codes put j face resources get string tab to upper case new integer 9 non nls 1 localized key codes put j face resources get string return to upper case new integer 13 non nls 1 localized key codes put j face resources get string enter to upper case new integer 13 non nls 1 localized key codes put j face resources get string escape to upper case new integer 27 non nls 1 localized key codes put j face resources get string esc to upper case new integer 27 non nls 1 localized key codes put j face resources get string delete to upper case new integer 127 non nls 1 localized key codes put j face resources get string space to upper case new integer non nls 1 localized key codes put j face resources get string arrow up to upper case new integer swt arrow up non nls 1 localized key codes put j face resources get string arrow down to upper case new integer swt arrow down non nls 1 localized key codes put j face resources get string arrow left to upper case new integer swt arrow left non nls 1 localized key codes put j face resources get string arrow right to upper case new integer swt arrow right non nls 1 localized key codes put j face resources get string page up to upper case new integer swt page up non nls 1 localized key codes put j face resources get string page down to upper case new integer swt page down non nls 1 localized key codes put j face resources get string home to upper case new integer swt home non nls 1 localized key codes put j face resources get string end to upper case new integer swt end non nls 1 localized key codes put j face resources get string insert to upper case new integer swt insert non nls 1 localized key codes put j face resources get string f1 to upper case new integer swt f1 non nls 1 localized key codes put j face resources get string f2 to upper case new integer swt f2 non nls 1 localized key codes put j face resources get string f3 to upper case new integer swt f3 non nls 1 localized key codes put j face resources get string f4 to upper case new integer swt f4 non nls 1 localized key codes put j face resources get string f5 to upper case new integer swt f5 non nls 1 localized key codes put j face resources get string f6 to upper case new integer swt f6 non nls 1 localized key codes put j face resources get string f7 to upper case new integer swt f7 non nls 1 localized key codes put j face resources get string f8 to upper case new integer swt f8 non nls 1 localized key codes put j face resources get string f9 to upper case new integer swt f9 non nls 1 localized key codes put j face resources get string f10 to upper case new integer swt f10 non nls 1 localized key codes put j face resources get string f11 to upper case new integer swt f11 non nls 1 localized key codes put j face resources get string f12 to upper case new integer swt f12 non nls 1 initlocalizedkeycodes localizedkeycodes hashmap localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring arrow_up touppercase arrow_up localizedkeycodes jfaceresources getstring arrow_down touppercase arrow_down localizedkeycodes jfaceresources getstring arrow_left touppercase arrow_left localizedkeycodes jfaceresources getstring arrow_right touppercase arrow_right localizedkeycodes jfaceresources getstring page_up touppercase page_up localizedkeycodes jfaceresources getstring page_down touppercase page_down localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase initializes the internal key string table private static void init key strings key strings new hash map 40 key strings put new integer 8 j face resources get string backspace non nls 1 key strings put new integer 9 j face resources get string tab non nls 1 key strings put new integer 13 j face resources get string return non nls 1 key strings put new integer 13 j face resources get string enter non nls 1 key strings put new integer 27 j face resources get string escape non nls 1 key strings put new integer 27 j face resources get string esc non nls 1 key strings put new integer 127 j face resources get string delete non nls 1 key strings put new integer j face resources get string space non nls 1 key strings put new integer swt arrow up j face resources get string arrow up non nls 1 key strings put new integer swt arrow down j face resources get string arrow down non nls 1 key strings put new integer swt arrow left j face resources get string arrow left non nls 1 key strings put new integer swt arrow right j face resources get string arrow right non nls 1 key strings put new integer swt page up j face resources get string page up non nls 1 key strings put new integer swt page down j face resources get string page down non nls 1 key strings put new integer swt home j face resources get string home non nls 1 key strings put new integer swt end j face resources get string end non nls 1 key strings put new integer swt insert j face resources get string insert non nls 1 key strings put new integer swt f1 j face resources get string f1 non nls 1 key strings put new integer swt f2 j face resources get string f2 non nls 1 key strings put new integer swt f3 j face resources get string f3 non nls 1 key strings put new integer swt f4 j face resources get string f4 non nls 1 key strings put new integer swt f5 j face resources get string f5 non nls 1 key strings put new integer swt f6 j face resources get string f6 non nls 1 key strings put new integer swt f7 j face resources get string f7 non nls 1 key strings put new integer swt f8 j face resources get string f8 non nls 1 key strings put new integer swt f9 j face resources get string f9 non nls 1 key strings put new integer swt f10 j face resources get string f10 non nls 1 key strings put new integer swt f11 j face resources get string f11 non nls 1 key strings put new integer swt f12 j face resources get string f12 non nls 1 initkeystrings keystrings hashmap keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings arrow_up jfaceresources getstring arrow_up keystrings arrow_down jfaceresources getstring arrow_down keystrings arrow_left jfaceresources getstring arrow_left keystrings arrow_right jfaceresources getstring arrow_right keystrings page_up jfaceresources getstring page_up keystrings page_down jfaceresources getstring page_down keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring method declared on i action public boolean is checked return value val toggle btn on value val radio btn on iaction ischecked val_toggle_btn_on val_radio_btn_on method declared on i action public boolean is enabled return enabled iaction isenabled method declared on i action public boolean is handled return true iaction ishandled convenience method for removing any optional accelerator text from the given string the accelerator text appears at the end of the text and is separated from the main part by a single tab character code t code param text the text return the text sans accelerator public static string remove accelerator text string text int index text last index of t if index 1 index text last index of if index 0 return text substring 0 index return text removeacceleratortext lastindexof lastindexof convenience method for removing any mnemonics from the given string for example code remove mnemonics open code will return code open code param text the text return the text sans mnemonics since 3 0 public static string remove mnemonics string text int index text index of if index 1 return text int len text length string buffer sb new string buffer len int last index 0 while index 1 ignore at the end if index len 1 break handle the case if text char at index 1 index dbcs languages use x format if index 0 text char at index 1 text length index 3 text char at index 2 sb append text substring last index index 1 index 3 else sb append text substring last index index skip the index last index index index text index of index if last index len sb append text substring last index len return sb to string removemnemonics removemnemonics indexof stringbuffer stringbuffer lastindex charat charat charat lastindex lastindex lastindex indexof lastindex lastindex tostring method declared on i action public void remove property change listener i property change listener listener listeners remove listener iaction removepropertychangelistener ipropertychangelistener the default implementation of this code i action code method does nothing subclasses should override this method if they do not need information from the triggering event or override code run with event event code if they do public void run do nothing iaction runwithevent the default implementation of this code i action code method ignores the event argument and simply calls code run code subclasses should override this method if they need information from the triggering event or override code run code if not param event the swt event which triggered this action being run since 2 0 public void run with event event event run iaction runwithevent method declared on i action public void set action definition id string id action definition id id iaction setactiondefinitionid actiondefinitionid public void set checked boolean checked object new value null for backward compatibility if the style is not set yet then convert it to a toggle button if value null value val toggle btn on value val toggle btn off new value checked val toggle btn on val toggle btn off else if value val radio btn on value val radio btn off new value checked val radio btn on val radio btn off else some other style already so do nothing return if new value value value new value if checked fire property change checked boolean false boolean true else fire property change checked boolean true boolean false setchecked newvalue val_toggle_btn_on val_toggle_btn_off newvalue val_toggle_btn_on val_toggle_btn_off val_radio_btn_on val_radio_btn_off newvalue val_radio_btn_on val_radio_btn_off newvalue newvalue firepropertychange firepropertychange public void set description string text if description null text null description null text null description null text null text equals description string old description description description text fire property change description old description description setdescription olddescription firepropertychange olddescription public void set disabled image descriptor image descriptor new image if disabled image new image image descriptor old image disabled image disabled image new image fire property change image old image new image setdisabledimagedescriptor imagedescriptor newimage disabledimage newimage imagedescriptor oldimage disabledimage disabledimage newimage firepropertychange oldimage newimage public void set enabled boolean enabled if enabled this enabled boolean old val this enabled boolean true boolean false boolean new val enabled boolean true boolean false this enabled enabled fire property change enabled old val new val setenabled oldval newval firepropertychange oldval newval method declared on i action public void set help listener help listener listener help listener listener iaction sethelplistener helplistener helplistener public void set hover image descriptor image descriptor new image if hover image new image image descriptor old image hover image hover image new image fire property change image old image new image sethoverimagedescriptor imagedescriptor newimage hoverimage newimage imagedescriptor oldimage hoverimage hoverimage newimage firepropertychange oldimage newimage method declared on i action public void set id string id this id id iaction setid public void set image descriptor image descriptor new image if image new image image descriptor old image image image new image fire property change image old image new image setimagedescriptor imagedescriptor newimage newimage imagedescriptor oldimage newimage firepropertychange oldimage newimage sets the menu creator for this action p note that if this method is called it overrides the check status p param creator the menu creator or code null code if none public void set menu creator i menu creator creator for backward compatibility if the style is not set yet then convert it to a drop down menu if value null value creator return if value instanceof i menu creator value creator null val drop down menu creator setmenucreator imenucreator imenucreator val_drop_down_menu sets the text for this action p fires a property change event for the code text code property if the text actually changes as a consequence p p the accelerator is identified by the last index of a tab character if there are no tab characters then it is identified by the last index of a character if neither then there is no accelerator text note that if you want to insert a character into the text but no accelerator you can simply insert a or a tab at the end of the text p param text the text or code null code if none public void set text string text string old text this text int old accel this accelerator this text text if text null string accelerator text extract accelerator text text if accelerator text null int new accelerator convert localized accelerator accelerator text be sure to not wipe out the accelerator if nothing found if new accelerator 0 set accelerator new accelerator if this accelerator old accel old text null this text null old text equals this text fire property change text old text this text settext oldtext oldaccel acceleratortext extractacceleratortext acceleratortext newaccelerator convertlocalizedaccelerator acceleratortext newaccelerator setaccelerator newaccelerator oldaccel oldtext oldtext firepropertychange oldtext sets the tool tip text for this action p fires a property change event for the code tool tip text code property if the tool tip text actually changes as a consequence p param tool tip text the tool tip text or code null code if none public void set tool tip text string tool tip text string old tool tip text this tool tip text if old tool tip text null tool tip text null old tool tip text equals tool tip text this tool tip text tool tip text fire property change tool tip text old tool tip text tool tip text tool_tip_text tooltiptext settooltiptext tooltiptext oldtooltiptext tooltiptext oldtooltiptext tooltiptext oldtooltiptext tooltiptext tooltiptext tooltiptext firepropertychange tool_tip_text oldtooltiptext tooltiptext see i action set accelerator int public void set accelerator int keycode this accelerator keycode iaction setaccelerator setaccelerator reports the outcome of the running of this action via the link i action result property param success code true code if the action succeeded and code false code if the action failed or was not completed see i action result since 3 0 public final void notify result boolean success avoid boolean value of boolean to allow compilation against jcl foundation bug 80059 fire property change result null success boolean true boolean false iaction iaction notifyresult valueof firepropertychange private static final i menu creator val drop down menu new i menu creator public void dispose do nothing imenucreator val_drop_down_menu imenucreator public menu get menu control parent do nothing return null getmenu public menu get menu menu parent do nothing return null getmenu creates a new action with no text and no image p configure the action later using the set methods p protected action do nothing creates a new action with the given text and no image calls the zero arg constructor then code set text code param text the string used as the text for the action or code null code if there is no text see set text protected action string text this set text text settext settext settext creates a new action with the given text and image calls the zero arg constructor then code set text code and code set image descriptor code param text the action s text or code null code if there is no text param image the action s image or code null code if there is no image see set text see set image descriptor protected action string text image descriptor image this text set image descriptor image settext setimagedescriptor settext setimagedescriptor imagedescriptor setimagedescriptor creates a new action with the given text and style param text the action s text or code null code if there is no text param style one of code as push button code code as check box code code as drop down menu code code as radio button code and code as unspecified code protected action string text int style this text switch style case as push button value val push btn break case as check box value val toggle btn off break case as drop down menu value val drop down menu break case as radio button value val radio btn off break as_push_button as_check_box as_drop_down_menu as_radio_button as_unspecified as_push_button val_push_btn as_check_box val_toggle_btn_off as_drop_down_menu val_drop_down_menu as_radio_button val_radio_btn_off method declared on i action public void add property change listener i property change listener listener listeners add listener iaction addpropertychangelistener ipropertychangelistener parses the given accelerator text and converts it to an accelerator key code support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml param accelerator text the accelerator text localized to the current locale return the swt key code or 0 if there is no accelerator private static int convert localized accelerator string accelerator text int accelerator 0 string tokenizer stok new string tokenizer accelerator text non nls 1 int key code 1 boolean has more tokens stok has more tokens while has more tokens string token stok next token has more tokens stok has more tokens every token except the last must be one of the modifiers ctrl shift alt or command if has more tokens int modifier find localized modifier token if modifier 0 accelerator modifier else leave if there are none return 0 else key code find localized key code token if key code 1 accelerator key code return accelerator setaccelerator acceleratortext convertlocalizedaccelerator acceleratortext stringtokenizer stringtokenizer acceleratortext keycode hasmoretokens hasmoretokens hasmoretokens nexttoken hasmoretokens hasmoretokens hasmoretokens findlocalizedmodifier keycode findlocalizedkeycode keycode keycode parses the given accelerator text and converts it to an accelerator key code param accelerator text the accelerator text return the swt key code or 0 if there is no accelerator public static int convert accelerator string accelerator text int accelerator 0 string tokenizer stok new string tokenizer accelerator text non nls 1 int key code 1 boolean has more tokens stok has more tokens while has more tokens string token stok next token has more tokens stok has more tokens every token except the last must be one of the modifiers ctrl shift alt or command if has more tokens int modifier find modifier token if modifier 0 accelerator modifier else leave if there are none return 0 else key code find key code token if key code 1 accelerator key code return accelerator acceleratortext convertaccelerator acceleratortext stringtokenizer stringtokenizer acceleratortext keycode hasmoretokens hasmoretokens hasmoretokens nexttoken hasmoretokens hasmoretokens hasmoretokens findmodifier keycode findkeycode keycode keycode converts an accelerator key code to a string representation param key code the key code to be translated return a string representation of the key code public static string convert accelerator int key code string modifier get modifier string key code string full key if modifier equals non nls 1 full key find key string key code else full key modifier find key string key code non nls 1 return full key keycode convertaccelerator keycode getmodifierstring keycode fullkey fullkey findkeystring keycode fullkey findkeystring keycode fullkey private static string get modifier string int key code string mod string non nls 1 if key code swt ctrl 0 mod string find modifier string key code swt ctrl if key code swt alt 0 if mod string equals non nls 1 mod string find modifier string key code swt alt else mod string mod string find modifier string key code swt alt non nls 1 if key code swt shift 0 if mod string equals non nls 1 mod string find modifier string key code swt shift else mod string mod string find modifier string key code swt shift non nls 1 if key code swt command 0 if mod string equals non nls 1 mod string find modifier string key code swt command else mod string mod string find modifier string key code swt command non nls 1 return mod string getmodifierstring keycode modstring keycode modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode modstring extracts the accelerator text from the given text returns code null code if there is no accelerator text and the empty string if there is no text after the accelerator delimeter tab or param text the text for the action return the accelerator text or code null code private static string extract accelerator text string text int index text last index of t if index 1 index text last index of if index 0 return text substring index 1 return null extractacceleratortext lastindexof lastindexof maps a standard keyboard key name to an swt key code key names are converted to upper case before comparison if the key name is a single letter for example s its character code is returned p the following key names are known case is ignored ul li code backspace code li li code tab code li li code return code li li code enter code li li code esc code li li code escape code li li code delete code li li code space code li li code arrow up code code arrow down code code arrow left code and code arrow right code li li code page up code and code page down code li li code home code li li code end code li li code insert code li li code f1 code code f2 code through code f12 code li ul p param token the key name return the swt key code code 1 code if no match was found see swt public static int find key code string token if key codes null init key codes token token to upper case integer i integer key codes get token if i null return i int value if token length 1 return token char at 0 return 1 arrow_up arrow_down arrow_left arrow_right page_up page_down findkeycode keycodes initkeycodes touppercase keycodes intvalue charat find the supplied code for a localized key as find key code but localized to the current locale support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml param token the localized key name return the swt key code code 1 code if no match was found see find key code private static int find localized key code string token if localized key codes null init localized key codes token token to upper case integer i integer localized key codes get token if i null return i int value if token length 1 return token char at 0 return 1 findkeycode setaccelerator findkeycode findlocalizedkeycode localizedkeycodes initlocalizedkeycodes touppercase localizedkeycodes intvalue charat maps an swt key code to a standard keyboard key name the key code is stripped of modifiers swt ctrl swt alt swt shift and swt command if the key code is not an swt code for example if it a key code for the key s a string containing a character representation of the key code is returned param key code the key code to be translated return the string representation of the key code see swt since 2 0 public static string find key string int key code if key strings null init key strings int i key code swt ctrl swt alt swt shift swt command integer integer new integer i string result string key strings get integer if result null return result result new string new char char i return result keycode findkeystring keycode keystrings initkeystrings keycode keystrings maps standard keyboard modifier key names to the corresponding swt modifier bit the following modifier key names are recognized case is ignored code ctrl code code shift code code alt code and code command code the given modifier key name is converted to upper case before comparison param token the modifier key name return the swt modifier bit or code 0 code if no match was found see swt public static int find modifier string token token token to upper case if token equals ctrl non nls 1 return swt ctrl if token equals shift non nls 1 return swt shift if token equals alt non nls 1 return swt alt if token equals command non nls 1 return swt command return 0 findmodifier touppercase maps the localized modifier names to a code in the same manner as find modifier support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml see find modifier private static int find localized modifier string token if localized ctrl null init localized modifiers token token to upper case if token equals localized ctrl non nls 1 return swt ctrl if token equals localized shift non nls 1 return swt shift if token equals localized alt non nls 1 return swt alt if token equals localized command non nls 1 return swt command return 0 findmodifier setaccelerator findmodifier findlocalizedmodifier localized_ctrl initlocalizedmodifiers touppercase localized_ctrl localized_shift localized_alt localized_command initialize the list of localized modifiers private static void init localized modifiers localized ctrl j face resources get string ctrl to upper case non nls 1 localized shift j face resources get string shift to upper case non nls 1 localized alt j face resources get string alt to upper case non nls 1 localized command j face resources get string command to upper case non nls 1 initlocalizedmodifiers localized_ctrl jfaceresources getstring touppercase localized_shift jfaceresources getstring touppercase localized_alt jfaceresources getstring touppercase localized_command jfaceresources getstring touppercase returns a string representation of an swt modifier bit swt ctrl swt alt swt shift and swt command returns code null code if the key code is not an swt modifier bit param key code the swt modifier bit to be translated return the string representation of the swt modifier bit or code null code if the key code was not an swt modifier bit see swt since 2 0 public static string find modifier string int key code if key code swt ctrl return j face resources get string ctrl non nls 1 if key code swt alt return j face resources get string alt non nls 1 if key code swt shift return j face resources get string shift non nls 1 if key code swt command return j face resources get string command non nls 1 return null keycode findmodifierstring keycode keycode jfaceresources getstring keycode jfaceresources getstring keycode jfaceresources getstring keycode jfaceresources getstring notifies any property change listeners that a property has changed only listeners registered at the time this method is called are notified this method avoids creating an event object if there are no listeners registered but calls code fire property change property change event code if there are param property name the name of the property that has changed param old value the old value of the property or code null code if none param new value the new value of the property or code null code if none see i property change listener property change protected void fire property change string property name object old value object new value if listeners is empty fire property change new property change event this property name old value new value firepropertychange propertychangeevent propertyname oldvalue newvalue ipropertychangelistener propertychange firepropertychange propertyname oldvalue newvalue isempty firepropertychange propertychangeevent propertyname oldvalue newvalue notifies any property change listeners that a property has changed only listeners registered at the time this method is called are notified param event the property change event see i property change listener property change protected void fire property change property change event event object list this listeners get listeners for int i 0 i list length i i property change listener list i property change event ipropertychangelistener propertychange firepropertychange propertychangeevent getlisteners ipropertychangelistener propertychange method declared on i action public int get accelerator return accelerator iaction getaccelerator public string get action definition id return action definition id getactiondefinitionid actiondefinitionid public string get description if description null return description return get tool tip text getdescription gettooltiptext method declared on i action public image descriptor get disabled image descriptor return disabled image iaction imagedescriptor getdisabledimagedescriptor disabledimage method declared on i action public help listener get help listener return help listener iaction helplistener gethelplistener helplistener method declared on i action public image descriptor get hover image descriptor return hover image iaction imagedescriptor gethoverimagedescriptor hoverimage method declared on i action public string get id return id iaction getid method declared on i action public image descriptor get image descriptor return image iaction imagedescriptor getimagedescriptor public i menu creator get menu creator the default drop down menu value is only used to mark this action requested style so do not return it for backward compatibility reasons if value val drop down menu return null if value instanceof i menu creator return i menu creator value return null imenucreator getmenucreator val_drop_down_menu imenucreator imenucreator public int get style infer the style from the value field if value val push btn value null return as push button if value val toggle btn on value val toggle btn off return as check box if value val radio btn on value val radio btn off return as radio button if value instanceof i menu creator return as drop down menu we should never get to this line return as push button getstyle val_push_btn as_push_button val_toggle_btn_on val_toggle_btn_off as_check_box val_radio_btn_on val_radio_btn_off as_radio_button imenucreator as_drop_down_menu as_push_button method declared on i action public string get text return text iaction gettext method declared on i action public string get tool tip text return tool tip text iaction gettooltiptext tooltiptext initializes the internal key code table private static void init key codes key codes new hash map 40 key codes put backspace new integer 8 non nls 1 key codes put tab new integer 9 non nls 1 key codes put return new integer 13 non nls 1 key codes put enter new integer 13 non nls 1 key codes put escape new integer 27 non nls 1 key codes put esc new integer 27 non nls 1 key codes put delete new integer 127 non nls 1 key codes put space new integer non nls 1 key codes put arrow up new integer swt arrow up non nls 1 key codes put arrow down new integer swt arrow down non nls 1 key codes put arrow left new integer swt arrow left non nls 1 key codes put arrow right new integer swt arrow right non nls 1 key codes put page up new integer swt page up non nls 1 key codes put page down new integer swt page down non nls 1 key codes put home new integer swt home non nls 1 key codes put end new integer swt end non nls 1 key codes put insert new integer swt insert non nls 1 key codes put f1 new integer swt f1 non nls 1 key codes put f2 new integer swt f2 non nls 1 key codes put f3 new integer swt f3 non nls 1 key codes put f4 new integer swt f4 non nls 1 key codes put f5 new integer swt f5 non nls 1 key codes put f6 new integer swt f6 non nls 1 key codes put f7 new integer swt f7 non nls 1 key codes put f8 new integer swt f8 non nls 1 key codes put f9 new integer swt f9 non nls 1 key codes put f10 new integer swt f10 non nls 1 key codes put f11 new integer swt f11 non nls 1 key codes put f12 new integer swt f12 non nls 1 initkeycodes keycodes hashmap keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes arrow_up arrow_up keycodes arrow_down arrow_down keycodes arrow_left arrow_left keycodes arrow_right arrow_right keycodes page_up page_up keycodes page_down page_down keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes initializes the localized internal key code table private static void init localized key codes localized key codes new hash map 40 localized key codes put j face resources get string backspace to upper case new integer 8 non nls 1 localized key codes put j face resources get string tab to upper case new integer 9 non nls 1 localized key codes put j face resources get string return to upper case new integer 13 non nls 1 localized key codes put j face resources get string enter to upper case new integer 13 non nls 1 localized key codes put j face resources get string escape to upper case new integer 27 non nls 1 localized key codes put j face resources get string esc to upper case new integer 27 non nls 1 localized key codes put j face resources get string delete to upper case new integer 127 non nls 1 localized key codes put j face resources get string space to upper case new integer non nls 1 localized key codes put j face resources get string arrow up to upper case new integer swt arrow up non nls 1 localized key codes put j face resources get string arrow down to upper case new integer swt arrow down non nls 1 localized key codes put j face resources get string arrow left to upper case new integer swt arrow left non nls 1 localized key codes put j face resources get string arrow right to upper case new integer swt arrow right non nls 1 localized key codes put j face resources get string page up to upper case new integer swt page up non nls 1 localized key codes put j face resources get string page down to upper case new integer swt page down non nls 1 localized key codes put j face resources get string home to upper case new integer swt home non nls 1 localized key codes put j face resources get string end to upper case new integer swt end non nls 1 localized key codes put j face resources get string insert to upper case new integer swt insert non nls 1 localized key codes put j face resources get string f1 to upper case new integer swt f1 non nls 1 localized key codes put j face resources get string f2 to upper case new integer swt f2 non nls 1 localized key codes put j face resources get string f3 to upper case new integer swt f3 non nls 1 localized key codes put j face resources get string f4 to upper case new integer swt f4 non nls 1 localized key codes put j face resources get string f5 to upper case new integer swt f5 non nls 1 localized key codes put j face resources get string f6 to upper case new integer swt f6 non nls 1 localized key codes put j face resources get string f7 to upper case new integer swt f7 non nls 1 localized key codes put j face resources get string f8 to upper case new integer swt f8 non nls 1 localized key codes put j face resources get string f9 to upper case new integer swt f9 non nls 1 localized key codes put j face resources get string f10 to upper case new integer swt f10 non nls 1 localized key codes put j face resources get string f11 to upper case new integer swt f11 non nls 1 localized key codes put j face resources get string f12 to upper case new integer swt f12 non nls 1 initlocalizedkeycodes localizedkeycodes hashmap localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring arrow_up touppercase arrow_up localizedkeycodes jfaceresources getstring arrow_down touppercase arrow_down localizedkeycodes jfaceresources getstring arrow_left touppercase arrow_left localizedkeycodes jfaceresources getstring arrow_right touppercase arrow_right localizedkeycodes jfaceresources getstring page_up touppercase page_up localizedkeycodes jfaceresources getstring page_down touppercase page_down localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase initializes the internal key string table private static void init key strings key strings new hash map 40 key strings put new integer 8 j face resources get string backspace non nls 1 key strings put new integer 9 j face resources get string tab non nls 1 key strings put new integer 13 j face resources get string return non nls 1 key strings put new integer 13 j face resources get string enter non nls 1 key strings put new integer 27 j face resources get string escape non nls 1 key strings put new integer 27 j face resources get string esc non nls 1 key strings put new integer 127 j face resources get string delete non nls 1 key strings put new integer j face resources get string space non nls 1 key strings put new integer swt arrow up j face resources get string arrow up non nls 1 key strings put new integer swt arrow down j face resources get string arrow down non nls 1 key strings put new integer swt arrow left j face resources get string arrow left non nls 1 key strings put new integer swt arrow right j face resources get string arrow right non nls 1 key strings put new integer swt page up j face resources get string page up non nls 1 key strings put new integer swt page down j face resources get string page down non nls 1 key strings put new integer swt home j face resources get string home non nls 1 key strings put new integer swt end j face resources get string end non nls 1 key strings put new integer swt insert j face resources get string insert non nls 1 key strings put new integer swt f1 j face resources get string f1 non nls 1 key strings put new integer swt f2 j face resources get string f2 non nls 1 key strings put new integer swt f3 j face resources get string f3 non nls 1 key strings put new integer swt f4 j face resources get string f4 non nls 1 key strings put new integer swt f5 j face resources get string f5 non nls 1 key strings put new integer swt f6 j face resources get string f6 non nls 1 key strings put new integer swt f7 j face resources get string f7 non nls 1 key strings put new integer swt f8 j face resources get string f8 non nls 1 key strings put new integer swt f9 j face resources get string f9 non nls 1 key strings put new integer swt f10 j face resources get string f10 non nls 1 key strings put new integer swt f11 j face resources get string f11 non nls 1 key strings put new integer swt f12 j face resources get string f12 non nls 1 initkeystrings keystrings hashmap keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings arrow_up jfaceresources getstring arrow_up keystrings arrow_down jfaceresources getstring arrow_down keystrings arrow_left jfaceresources getstring arrow_left keystrings arrow_right jfaceresources getstring arrow_right keystrings page_up jfaceresources getstring page_up keystrings page_down jfaceresources getstring page_down keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring method declared on i action public boolean is checked return value val toggle btn on value val radio btn on iaction ischecked val_toggle_btn_on val_radio_btn_on method declared on i action public boolean is enabled return enabled iaction isenabled method declared on i action public boolean is handled return true iaction ishandled convenience method for removing any optional accelerator text from the given string the accelerator text appears at the end of the text and is separated from the main part by a single tab character code t code param text the text return the text sans accelerator public static string remove accelerator text string text int index text last index of t if index 1 index text last index of if index 0 return text substring 0 index return text removeacceleratortext lastindexof lastindexof convenience method for removing any mnemonics from the given string for example code remove mnemonics open code will return code open code param text the text return the text sans mnemonics since 3 0 public static string remove mnemonics string text int index text index of if index 1 return text int len text length string buffer sb new string buffer len int last index 0 while index 1 ignore at the end if index len 1 break handle the case if text char at index 1 index dbcs languages use x format if index 0 text char at index 1 text length index 3 text char at index 2 sb append text substring last index index 1 index 3 else sb append text substring last index index skip the index last index index index text index of index if last index len sb append text substring last index len return sb to string removemnemonics removemnemonics indexof stringbuffer stringbuffer lastindex charat charat charat lastindex lastindex lastindex indexof lastindex lastindex tostring method declared on i action public void remove property change listener i property change listener listener listeners remove listener iaction removepropertychangelistener ipropertychangelistener the default implementation of this code i action code method does nothing subclasses should override this method if they do not need information from the triggering event or override code run with event event code if they do public void run do nothing iaction runwithevent the default implementation of this code i action code method ignores the event argument and simply calls code run code subclasses should override this method if they need information from the triggering event or override code run code if not param event the swt event which triggered this action being run since 2 0 public void run with event event event run iaction runwithevent method declared on i action public void set action definition id string id action definition id id iaction setactiondefinitionid actiondefinitionid public void set checked boolean checked object new value null for backward compatibility if the style is not set yet then convert it to a toggle button if value null value val toggle btn on value val toggle btn off new value checked val toggle btn on val toggle btn off else if value val radio btn on value val radio btn off new value checked val radio btn on val radio btn off else some other style already so do nothing return if new value value value new value if checked fire property change checked boolean false boolean true else fire property change checked boolean true boolean false setchecked newvalue val_toggle_btn_on val_toggle_btn_off newvalue val_toggle_btn_on val_toggle_btn_off val_radio_btn_on val_radio_btn_off newvalue val_radio_btn_on val_radio_btn_off newvalue newvalue firepropertychange firepropertychange public void set description string text if description null text null description null text null description null text null text equals description string old description description description text fire property change description old description description setdescription olddescription firepropertychange olddescription public void set disabled image descriptor image descriptor new image if disabled image new image image descriptor old image disabled image disabled image new image fire property change image old image new image setdisabledimagedescriptor imagedescriptor newimage disabledimage newimage imagedescriptor oldimage disabledimage disabledimage newimage firepropertychange oldimage newimage public void set enabled boolean enabled if enabled this enabled boolean old val this enabled boolean true boolean false boolean new val enabled boolean true boolean false this enabled enabled fire property change enabled old val new val setenabled oldval newval firepropertychange oldval newval method declared on i action public void set help listener help listener listener help listener listener iaction sethelplistener helplistener helplistener public void set hover image descriptor image descriptor new image if hover image new image image descriptor old image hover image hover image new image fire property change image old image new image sethoverimagedescriptor imagedescriptor newimage hoverimage newimage imagedescriptor oldimage hoverimage hoverimage newimage firepropertychange oldimage newimage method declared on i action public void set id string id this id id iaction setid public void set image descriptor image descriptor new image if image new image image descriptor old image image image new image fire property change image old image new image setimagedescriptor imagedescriptor newimage newimage imagedescriptor oldimage newimage firepropertychange oldimage newimage sets the menu creator for this action p note that if this method is called it overrides the check status p param creator the menu creator or code null code if none public void set menu creator i menu creator creator for backward compatibility if the style is not set yet then convert it to a drop down menu if value null value creator return if value instanceof i menu creator value creator null val drop down menu creator setmenucreator imenucreator imenucreator val_drop_down_menu sets the text for this action p fires a property change event for the code text code property if the text actually changes as a consequence p p the accelerator is identified by the last index of a tab character if there are no tab characters then it is identified by the last index of a character if neither then there is no accelerator text note that if you want to insert a character into the text but no accelerator you can simply insert a or a tab at the end of the text p param text the text or code null code if none public void set text string text string old text this text int old accel this accelerator this text text if text null string accelerator text extract accelerator text text if accelerator text null int new accelerator convert localized accelerator accelerator text be sure to not wipe out the accelerator if nothing found if new accelerator 0 set accelerator new accelerator if this accelerator old accel old text null this text null old text equals this text fire property change text old text this text settext oldtext oldaccel acceleratortext extractacceleratortext acceleratortext newaccelerator convertlocalizedaccelerator acceleratortext newaccelerator setaccelerator newaccelerator oldaccel oldtext oldtext firepropertychange oldtext sets the tool tip text for this action p fires a property change event for the code tool tip text code property if the tool tip text actually changes as a consequence p param tool tip text the tool tip text or code null code if none public void set tool tip text string tool tip text string old tool tip text this tool tip text if old tool tip text null tool tip text null old tool tip text equals tool tip text this tool tip text tool tip text fire property change tool tip text old tool tip text tool tip text tool_tip_text tooltiptext settooltiptext tooltiptext oldtooltiptext tooltiptext oldtooltiptext tooltiptext oldtooltiptext tooltiptext tooltiptext tooltiptext firepropertychange tool_tip_text oldtooltiptext tooltiptext see i action set accelerator int public void set accelerator int keycode this accelerator keycode iaction setaccelerator setaccelerator reports the outcome of the running of this action via the link i action result property param success code true code if the action succeeded and code false code if the action failed or was not completed see i action result since 3 0 public final void notify result boolean success avoid boolean value of boolean to allow compilation against jcl foundation bug 80059 fire property change result null success boolean true boolean false iaction iaction notifyresult valueof firepropertychange private static final i menu creator val drop down menu new i menu creator public void dispose do nothing imenucreator val_drop_down_menu imenucreator public menu get menu control parent do nothing return null getmenu public menu get menu menu parent do nothing return null getmenu creates a new action with no text and no image p configure the action later using the set methods p protected action do nothing creates a new action with the given text and no image calls the zero arg constructor then code set text code param text the string used as the text for the action or code null code if there is no text see set text protected action string text this set text text settext settext settext creates a new action with the given text and image calls the zero arg constructor then code set text code and code set image descriptor code param text the action s text or code null code if there is no text param image the action s image or code null code if there is no image see set text see set image descriptor protected action string text image descriptor image this text set image descriptor image settext setimagedescriptor settext setimagedescriptor imagedescriptor setimagedescriptor creates a new action with the given text and style param text the action s text or code null code if there is no text param style one of code as push button code code as check box code code as drop down menu code code as radio button code and code as unspecified code protected action string text int style this text switch style case as push button value val push btn break case as check box value val toggle btn off break case as drop down menu value val drop down menu break case as radio button value val radio btn off break as_push_button as_check_box as_drop_down_menu as_radio_button as_unspecified as_push_button val_push_btn as_check_box val_toggle_btn_off as_drop_down_menu val_drop_down_menu as_radio_button val_radio_btn_off method declared on i action public void add property change listener i property change listener listener listeners add listener iaction addpropertychangelistener ipropertychangelistener parses the given accelerator text and converts it to an accelerator key code support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml param accelerator text the accelerator text localized to the current locale return the swt key code or 0 if there is no accelerator private static int convert localized accelerator string accelerator text int accelerator 0 string tokenizer stok new string tokenizer accelerator text non nls 1 int key code 1 boolean has more tokens stok has more tokens while has more tokens string token stok next token has more tokens stok has more tokens every token except the last must be one of the modifiers ctrl shift alt or command if has more tokens int modifier find localized modifier token if modifier 0 accelerator modifier else leave if there are none return 0 else key code find localized key code token if key code 1 accelerator key code return accelerator setaccelerator acceleratortext convertlocalizedaccelerator acceleratortext stringtokenizer stringtokenizer acceleratortext keycode hasmoretokens hasmoretokens hasmoretokens nexttoken hasmoretokens hasmoretokens hasmoretokens findlocalizedmodifier keycode findlocalizedkeycode keycode keycode parses the given accelerator text and converts it to an accelerator key code param accelerator text the accelerator text return the swt key code or 0 if there is no accelerator public static int convert accelerator string accelerator text int accelerator 0 string tokenizer stok new string tokenizer accelerator text non nls 1 int key code 1 boolean has more tokens stok has more tokens while has more tokens string token stok next token has more tokens stok has more tokens every token except the last must be one of the modifiers ctrl shift alt or command if has more tokens int modifier find modifier token if modifier 0 accelerator modifier else leave if there are none return 0 else key code find key code token if key code 1 accelerator key code return accelerator acceleratortext convertaccelerator acceleratortext stringtokenizer stringtokenizer acceleratortext keycode hasmoretokens hasmoretokens hasmoretokens nexttoken hasmoretokens hasmoretokens hasmoretokens findmodifier keycode findkeycode keycode keycode converts an accelerator key code to a string representation param key code the key code to be translated return a string representation of the key code public static string convert accelerator int key code string modifier get modifier string key code string full key if modifier equals non nls 1 full key find key string key code else full key modifier find key string key code non nls 1 return full key keycode convertaccelerator keycode getmodifierstring keycode fullkey fullkey findkeystring keycode fullkey findkeystring keycode fullkey private static string get modifier string int key code string mod string non nls 1 if key code swt ctrl 0 mod string find modifier string key code swt ctrl if key code swt alt 0 if mod string equals non nls 1 mod string find modifier string key code swt alt else mod string mod string find modifier string key code swt alt non nls 1 if key code swt shift 0 if mod string equals non nls 1 mod string find modifier string key code swt shift else mod string mod string find modifier string key code swt shift non nls 1 if key code swt command 0 if mod string equals non nls 1 mod string find modifier string key code swt command else mod string mod string find modifier string key code swt command non nls 1 return mod string getmodifierstring keycode modstring keycode modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode modstring extracts the accelerator text from the given text returns code null code if there is no accelerator text and the empty string if there is no text after the accelerator delimeter tab or param text the text for the action return the accelerator text or code null code private static string extract accelerator text string text int index text last index of t if index 1 index text last index of if index 0 return text substring index 1 return null extractacceleratortext lastindexof lastindexof maps a standard keyboard key name to an swt key code key names are converted to upper case before comparison if the key name is a single letter for example s its character code is returned p the following key names are known case is ignored ul li code backspace code li li code tab code li li code return code li li code enter code li li code esc code li li code escape code li li code delete code li li code space code li li code arrow up code code arrow down code code arrow left code and code arrow right code li li code page up code and code page down code li li code home code li li code end code li li code insert code li li code f1 code code f2 code through code f12 code li ul p param token the key name return the swt key code code 1 code if no match was found see swt public static int find key code string token if key codes null init key codes token token to upper case integer i integer key codes get token if i null return i int value if token length 1 return token char at 0 return 1 arrow_up arrow_down arrow_left arrow_right page_up page_down findkeycode keycodes initkeycodes touppercase keycodes intvalue charat find the supplied code for a localized key as find key code but localized to the current locale support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml param token the localized key name return the swt key code code 1 code if no match was found see find key code private static int find localized key code string token if localized key codes null init localized key codes token token to upper case integer i integer localized key codes get token if i null return i int value if token length 1 return token char at 0 return 1 findkeycode setaccelerator findkeycode findlocalizedkeycode localizedkeycodes initlocalizedkeycodes touppercase localizedkeycodes intvalue charat maps an swt key code to a standard keyboard key name the key code is stripped of modifiers swt ctrl swt alt swt shift and swt command if the key code is not an swt code for example if it a key code for the key s a string containing a character representation of the key code is returned param key code the key code to be translated return the string representation of the key code see swt since 2 0 public static string find key string int key code if key strings null init key strings int i key code swt ctrl swt alt swt shift swt command integer integer new integer i string result string key strings get integer if result null return result result new string new char char i return result keycode findkeystring keycode keystrings initkeystrings keycode keystrings maps standard keyboard modifier key names to the corresponding swt modifier bit the following modifier key names are recognized case is ignored code ctrl code code shift code code alt code and code command code the given modifier key name is converted to upper case before comparison param token the modifier key name return the swt modifier bit or code 0 code if no match was found see swt public static int find modifier string token token token to upper case if token equals ctrl non nls 1 return swt ctrl if token equals shift non nls 1 return swt shift if token equals alt non nls 1 return swt alt if token equals command non nls 1 return swt command return 0 findmodifier touppercase maps the localized modifier names to a code in the same manner as find modifier support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml see find modifier private static int find localized modifier string token if localized ctrl null init localized modifiers token token to upper case if token equals localized ctrl non nls 1 return swt ctrl if token equals localized shift non nls 1 return swt shift if token equals localized alt non nls 1 return swt alt if token equals localized command non nls 1 return swt command return 0 findmodifier setaccelerator findmodifier findlocalizedmodifier localized_ctrl initlocalizedmodifiers touppercase localized_ctrl localized_shift localized_alt localized_command initialize the list of localized modifiers private static void init localized modifiers localized ctrl j face resources get string ctrl to upper case non nls 1 localized shift j face resources get string shift to upper case non nls 1 localized alt j face resources get string alt to upper case non nls 1 localized command j face resources get string command to upper case non nls 1 initlocalizedmodifiers localized_ctrl jfaceresources getstring touppercase localized_shift jfaceresources getstring touppercase localized_alt jfaceresources getstring touppercase localized_command jfaceresources getstring touppercase returns a string representation of an swt modifier bit swt ctrl swt alt swt shift and swt command returns code null code if the key code is not an swt modifier bit param key code the swt modifier bit to be translated return the string representation of the swt modifier bit or code null code if the key code was not an swt modifier bit see swt since 2 0 public static string find modifier string int key code if key code swt ctrl return j face resources get string ctrl non nls 1 if key code swt alt return j face resources get string alt non nls 1 if key code swt shift return j face resources get string shift non nls 1 if key code swt command return j face resources get string command non nls 1 return null keycode findmodifierstring keycode keycode jfaceresources getstring keycode jfaceresources getstring keycode jfaceresources getstring keycode jfaceresources getstring notifies any property change listeners that a property has changed only listeners registered at the time this method is called are notified this method avoids creating an event object if there are no listeners registered but calls code fire property change property change event code if there are param property name the name of the property that has changed param old value the old value of the property or code null code if none param new value the new value of the property or code null code if none see i property change listener property change protected void fire property change string property name object old value object new value if listeners is empty fire property change new property change event this property name old value new value firepropertychange propertychangeevent propertyname oldvalue newvalue ipropertychangelistener propertychange firepropertychange propertyname oldvalue newvalue isempty firepropertychange propertychangeevent propertyname oldvalue newvalue notifies any property change listeners that a property has changed only listeners registered at the time this method is called are notified param event the property change event see i property change listener property change protected void fire property change property change event event object list this listeners get listeners for int i 0 i list length i i property change listener list i property change event ipropertychangelistener propertychange firepropertychange propertychangeevent getlisteners ipropertychangelistener propertychange method declared on i action public int get accelerator return accelerator iaction getaccelerator public string get action definition id return action definition id getactiondefinitionid actiondefinitionid public string get description if description null return description return get tool tip text getdescription gettooltiptext method declared on i action public image descriptor get disabled image descriptor return disabled image iaction imagedescriptor getdisabledimagedescriptor disabledimage method declared on i action public help listener get help listener return help listener iaction helplistener gethelplistener helplistener method declared on i action public image descriptor get hover image descriptor return hover image iaction imagedescriptor gethoverimagedescriptor hoverimage method declared on i action public string get id return id iaction getid method declared on i action public image descriptor get image descriptor return image iaction imagedescriptor getimagedescriptor public i menu creator get menu creator the default drop down menu value is only used to mark this action requested style so do not return it for backward compatibility reasons if value val drop down menu return null if value instanceof i menu creator return i menu creator value return null imenucreator getmenucreator val_drop_down_menu imenucreator imenucreator public int get style infer the style from the value field if value val push btn value null return as push button if value val toggle btn on value val toggle btn off return as check box if value val radio btn on value val radio btn off return as radio button if value instanceof i menu creator return as drop down menu we should never get to this line return as push button getstyle val_push_btn as_push_button val_toggle_btn_on val_toggle_btn_off as_check_box val_radio_btn_on val_radio_btn_off as_radio_button imenucreator as_drop_down_menu as_push_button method declared on i action public string get text return text iaction gettext method declared on i action public string get tool tip text return tool tip text iaction gettooltiptext tooltiptext initializes the internal key code table private static void init key codes key codes new hash map 40 key codes put backspace new integer 8 non nls 1 key codes put tab new integer 9 non nls 1 key codes put return new integer 13 non nls 1 key codes put enter new integer 13 non nls 1 key codes put escape new integer 27 non nls 1 key codes put esc new integer 27 non nls 1 key codes put delete new integer 127 non nls 1 key codes put space new integer non nls 1 key codes put arrow up new integer swt arrow up non nls 1 key codes put arrow down new integer swt arrow down non nls 1 key codes put arrow left new integer swt arrow left non nls 1 key codes put arrow right new integer swt arrow right non nls 1 key codes put page up new integer swt page up non nls 1 key codes put page down new integer swt page down non nls 1 key codes put home new integer swt home non nls 1 key codes put end new integer swt end non nls 1 key codes put insert new integer swt insert non nls 1 key codes put f1 new integer swt f1 non nls 1 key codes put f2 new integer swt f2 non nls 1 key codes put f3 new integer swt f3 non nls 1 key codes put f4 new integer swt f4 non nls 1 key codes put f5 new integer swt f5 non nls 1 key codes put f6 new integer swt f6 non nls 1 key codes put f7 new integer swt f7 non nls 1 key codes put f8 new integer swt f8 non nls 1 key codes put f9 new integer swt f9 non nls 1 key codes put f10 new integer swt f10 non nls 1 key codes put f11 new integer swt f11 non nls 1 key codes put f12 new integer swt f12 non nls 1 initkeycodes keycodes hashmap keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes arrow_up arrow_up keycodes arrow_down arrow_down keycodes arrow_left arrow_left keycodes arrow_right arrow_right keycodes page_up page_up keycodes page_down page_down keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes initializes the localized internal key code table private static void init localized key codes localized key codes new hash map 40 localized key codes put j face resources get string backspace to upper case new integer 8 non nls 1 localized key codes put j face resources get string tab to upper case new integer 9 non nls 1 localized key codes put j face resources get string return to upper case new integer 13 non nls 1 localized key codes put j face resources get string enter to upper case new integer 13 non nls 1 localized key codes put j face resources get string escape to upper case new integer 27 non nls 1 localized key codes put j face resources get string esc to upper case new integer 27 non nls 1 localized key codes put j face resources get string delete to upper case new integer 127 non nls 1 localized key codes put j face resources get string space to upper case new integer non nls 1 localized key codes put j face resources get string arrow up to upper case new integer swt arrow up non nls 1 localized key codes put j face resources get string arrow down to upper case new integer swt arrow down non nls 1 localized key codes put j face resources get string arrow left to upper case new integer swt arrow left non nls 1 localized key codes put j face resources get string arrow right to upper case new integer swt arrow right non nls 1 localized key codes put j face resources get string page up to upper case new integer swt page up non nls 1 localized key codes put j face resources get string page down to upper case new integer swt page down non nls 1 localized key codes put j face resources get string home to upper case new integer swt home non nls 1 localized key codes put j face resources get string end to upper case new integer swt end non nls 1 localized key codes put j face resources get string insert to upper case new integer swt insert non nls 1 localized key codes put j face resources get string f1 to upper case new integer swt f1 non nls 1 localized key codes put j face resources get string f2 to upper case new integer swt f2 non nls 1 localized key codes put j face resources get string f3 to upper case new integer swt f3 non nls 1 localized key codes put j face resources get string f4 to upper case new integer swt f4 non nls 1 localized key codes put j face resources get string f5 to upper case new integer swt f5 non nls 1 localized key codes put j face resources get string f6 to upper case new integer swt f6 non nls 1 localized key codes put j face resources get string f7 to upper case new integer swt f7 non nls 1 localized key codes put j face resources get string f8 to upper case new integer swt f8 non nls 1 localized key codes put j face resources get string f9 to upper case new integer swt f9 non nls 1 localized key codes put j face resources get string f10 to upper case new integer swt f10 non nls 1 localized key codes put j face resources get string f11 to upper case new integer swt f11 non nls 1 localized key codes put j face resources get string f12 to upper case new integer swt f12 non nls 1 initlocalizedkeycodes localizedkeycodes hashmap localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring arrow_up touppercase arrow_up localizedkeycodes jfaceresources getstring arrow_down touppercase arrow_down localizedkeycodes jfaceresources getstring arrow_left touppercase arrow_left localizedkeycodes jfaceresources getstring arrow_right touppercase arrow_right localizedkeycodes jfaceresources getstring page_up touppercase page_up localizedkeycodes jfaceresources getstring page_down touppercase page_down localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase initializes the internal key string table private static void init key strings key strings new hash map 40 key strings put new integer 8 j face resources get string backspace non nls 1 key strings put new integer 9 j face resources get string tab non nls 1 key strings put new integer 13 j face resources get string return non nls 1 key strings put new integer 13 j face resources get string enter non nls 1 key strings put new integer 27 j face resources get string escape non nls 1 key strings put new integer 27 j face resources get string esc non nls 1 key strings put new integer 127 j face resources get string delete non nls 1 key strings put new integer j face resources get string space non nls 1 key strings put new integer swt arrow up j face resources get string arrow up non nls 1 key strings put new integer swt arrow down j face resources get string arrow down non nls 1 key strings put new integer swt arrow left j face resources get string arrow left non nls 1 key strings put new integer swt arrow right j face resources get string arrow right non nls 1 key strings put new integer swt page up j face resources get string page up non nls 1 key strings put new integer swt page down j face resources get string page down non nls 1 key strings put new integer swt home j face resources get string home non nls 1 key strings put new integer swt end j face resources get string end non nls 1 key strings put new integer swt insert j face resources get string insert non nls 1 key strings put new integer swt f1 j face resources get string f1 non nls 1 key strings put new integer swt f2 j face resources get string f2 non nls 1 key strings put new integer swt f3 j face resources get string f3 non nls 1 key strings put new integer swt f4 j face resources get string f4 non nls 1 key strings put new integer swt f5 j face resources get string f5 non nls 1 key strings put new integer swt f6 j face resources get string f6 non nls 1 key strings put new integer swt f7 j face resources get string f7 non nls 1 key strings put new integer swt f8 j face resources get string f8 non nls 1 key strings put new integer swt f9 j face resources get string f9 non nls 1 key strings put new integer swt f10 j face resources get string f10 non nls 1 key strings put new integer swt f11 j face resources get string f11 non nls 1 key strings put new integer swt f12 j face resources get string f12 non nls 1 initkeystrings keystrings hashmap keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings arrow_up jfaceresources getstring arrow_up keystrings arrow_down jfaceresources getstring arrow_down keystrings arrow_left jfaceresources getstring arrow_left keystrings arrow_right jfaceresources getstring arrow_right keystrings page_up jfaceresources getstring page_up keystrings page_down jfaceresources getstring page_down keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring method declared on i action public boolean is checked return value val toggle btn on value val radio btn on iaction ischecked val_toggle_btn_on val_radio_btn_on method declared on i action public boolean is enabled return enabled iaction isenabled method declared on i action public boolean is handled return true iaction ishandled convenience method for removing any optional accelerator text from the given string the accelerator text appears at the end of the text and is separated from the main part by a single tab character code t code param text the text return the text sans accelerator public static string remove accelerator text string text int index text last index of t if index 1 index text last index of if index 0 return text substring 0 index return text removeacceleratortext lastindexof lastindexof convenience method for removing any mnemonics from the given string for example code remove mnemonics open code will return code open code param text the text return the text sans mnemonics since 3 0 public static string remove mnemonics string text int index text index of if index 1 return text int len text length string buffer sb new string buffer len int last index 0 while index 1 ignore at the end if index len 1 break handle the case if text char at index 1 index dbcs languages use x format if index 0 text char at index 1 text length index 3 text char at index 2 sb append text substring last index index 1 index 3 else sb append text substring last index index skip the index last index index index text index of index if last index len sb append text substring last index len return sb to string removemnemonics removemnemonics indexof stringbuffer stringbuffer lastindex charat charat charat lastindex lastindex lastindex indexof lastindex lastindex tostring method declared on i action public void remove property change listener i property change listener listener listeners remove listener iaction removepropertychangelistener ipropertychangelistener the default implementation of this code i action code method does nothing subclasses should override this method if they do not need information from the triggering event or override code run with event event code if they do public void run do nothing iaction runwithevent the default implementation of this code i action code method ignores the event argument and simply calls code run code subclasses should override this method if they need information from the triggering event or override code run code if not param event the swt event which triggered this action being run since 2 0 public void run with event event event run iaction runwithevent method declared on i action public void set action definition id string id action definition id id iaction setactiondefinitionid actiondefinitionid public void set checked boolean checked object new value null for backward compatibility if the style is not set yet then convert it to a toggle button if value null value val toggle btn on value val toggle btn off new value checked val toggle btn on val toggle btn off else if value val radio btn on value val radio btn off new value checked val radio btn on val radio btn off else some other style already so do nothing return if new value value value new value if checked fire property change checked boolean false boolean true else fire property change checked boolean true boolean false setchecked newvalue val_toggle_btn_on val_toggle_btn_off newvalue val_toggle_btn_on val_toggle_btn_off val_radio_btn_on val_radio_btn_off newvalue val_radio_btn_on val_radio_btn_off newvalue newvalue firepropertychange firepropertychange public void set description string text if description null text null description null text null description null text null text equals description string old description description description text fire property change description old description description setdescription olddescription firepropertychange olddescription public void set disabled image descriptor image descriptor new image if disabled image new image image descriptor old image disabled image disabled image new image fire property change image old image new image setdisabledimagedescriptor imagedescriptor newimage disabledimage newimage imagedescriptor oldimage disabledimage disabledimage newimage firepropertychange oldimage newimage public void set enabled boolean enabled if enabled this enabled boolean old val this enabled boolean true boolean false boolean new val enabled boolean true boolean false this enabled enabled fire property change enabled old val new val setenabled oldval newval firepropertychange oldval newval method declared on i action public void set help listener help listener listener help listener listener iaction sethelplistener helplistener helplistener public void set hover image descriptor image descriptor new image if hover image new image image descriptor old image hover image hover image new image fire property change image old image new image sethoverimagedescriptor imagedescriptor newimage hoverimage newimage imagedescriptor oldimage hoverimage hoverimage newimage firepropertychange oldimage newimage method declared on i action public void set id string id this id id iaction setid public void set image descriptor image descriptor new image if image new image image descriptor old image image image new image fire property change image old image new image setimagedescriptor imagedescriptor newimage newimage imagedescriptor oldimage newimage firepropertychange oldimage newimage sets the menu creator for this action p note that if this method is called it overrides the check status p param creator the menu creator or code null code if none public void set menu creator i menu creator creator for backward compatibility if the style is not set yet then convert it to a drop down menu if value null value creator return if value instanceof i menu creator value creator null val drop down menu creator setmenucreator imenucreator imenucreator val_drop_down_menu sets the text for this action p fires a property change event for the code text code property if the text actually changes as a consequence p p the accelerator is identified by the last index of a tab character if there are no tab characters then it is identified by the last index of a character if neither then there is no accelerator text note that if you want to insert a character into the text but no accelerator you can simply insert a or a tab at the end of the text p param text the text or code null code if none public void set text string text string old text this text int old accel this accelerator this text text if text null string accelerator text extract accelerator text text if accelerator text null int new accelerator convert localized accelerator accelerator text be sure to not wipe out the accelerator if nothing found if new accelerator 0 set accelerator new accelerator if this accelerator old accel old text null this text null old text equals this text fire property change text old text this text settext oldtext oldaccel acceleratortext extractacceleratortext acceleratortext newaccelerator convertlocalizedaccelerator acceleratortext newaccelerator setaccelerator newaccelerator oldaccel oldtext oldtext firepropertychange oldtext sets the tool tip text for this action p fires a property change event for the code tool tip text code property if the tool tip text actually changes as a consequence p param tool tip text the tool tip text or code null code if none public void set tool tip text string tool tip text string old tool tip text this tool tip text if old tool tip text null tool tip text null old tool tip text equals tool tip text this tool tip text tool tip text fire property change tool tip text old tool tip text tool tip text tool_tip_text tooltiptext settooltiptext tooltiptext oldtooltiptext tooltiptext oldtooltiptext tooltiptext oldtooltiptext tooltiptext tooltiptext tooltiptext firepropertychange tool_tip_text oldtooltiptext tooltiptext see i action set accelerator int public void set accelerator int keycode this accelerator keycode iaction setaccelerator setaccelerator reports the outcome of the running of this action via the link i action result property param success code true code if the action succeeded and code false code if the action failed or was not completed see i action result since 3 0 public final void notify result boolean success avoid boolean value of boolean to allow compilation against jcl foundation bug 80059 fire property change result null success boolean true boolean false iaction iaction notifyresult valueof firepropertychange private static final i menu creator val drop down menu new i menu creator public void dispose do nothing imenucreator val_drop_down_menu imenucreator public menu get menu control parent do nothing return null getmenu public menu get menu menu parent do nothing return null getmenu creates a new action with no text and no image p configure the action later using the set methods p protected action do nothing creates a new action with the given text and no image calls the zero arg constructor then code set text code param text the string used as the text for the action or code null code if there is no text see set text protected action string text this set text text settext settext settext creates a new action with the given text and image calls the zero arg constructor then code set text code and code set image descriptor code param text the action s text or code null code if there is no text param image the action s image or code null code if there is no image see set text see set image descriptor protected action string text image descriptor image this text set image descriptor image settext setimagedescriptor settext setimagedescriptor imagedescriptor setimagedescriptor creates a new action with the given text and style param text the action s text or code null code if there is no text param style one of code as push button code code as check box code code as drop down menu code code as radio button code and code as unspecified code protected action string text int style this text switch style case as push button value val push btn break case as check box value val toggle btn off break case as drop down menu value val drop down menu break case as radio button value val radio btn off break as_push_button as_check_box as_drop_down_menu as_radio_button as_unspecified as_push_button val_push_btn as_check_box val_toggle_btn_off as_drop_down_menu val_drop_down_menu as_radio_button val_radio_btn_off method declared on i action public void add property change listener i property change listener listener listeners add listener iaction addpropertychangelistener ipropertychangelistener parses the given accelerator text and converts it to an accelerator key code support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml param accelerator text the accelerator text localized to the current locale return the swt key code or 0 if there is no accelerator private static int convert localized accelerator string accelerator text int accelerator 0 string tokenizer stok new string tokenizer accelerator text non nls 1 int key code 1 boolean has more tokens stok has more tokens while has more tokens string token stok next token has more tokens stok has more tokens every token except the last must be one of the modifiers ctrl shift alt or command if has more tokens int modifier find localized modifier token if modifier 0 accelerator modifier else leave if there are none return 0 else key code find localized key code token if key code 1 accelerator key code return accelerator setaccelerator acceleratortext convertlocalizedaccelerator acceleratortext stringtokenizer stringtokenizer acceleratortext keycode hasmoretokens hasmoretokens hasmoretokens nexttoken hasmoretokens hasmoretokens hasmoretokens findlocalizedmodifier keycode findlocalizedkeycode keycode keycode parses the given accelerator text and converts it to an accelerator key code param accelerator text the accelerator text return the swt key code or 0 if there is no accelerator public static int convert accelerator string accelerator text int accelerator 0 string tokenizer stok new string tokenizer accelerator text non nls 1 int key code 1 boolean has more tokens stok has more tokens while has more tokens string token stok next token has more tokens stok has more tokens every token except the last must be one of the modifiers ctrl shift alt or command if has more tokens int modifier find modifier token if modifier 0 accelerator modifier else leave if there are none return 0 else key code find key code token if key code 1 accelerator key code return accelerator acceleratortext convertaccelerator acceleratortext stringtokenizer stringtokenizer acceleratortext keycode hasmoretokens hasmoretokens hasmoretokens nexttoken hasmoretokens hasmoretokens hasmoretokens findmodifier keycode findkeycode keycode keycode converts an accelerator key code to a string representation param key code the key code to be translated return a string representation of the key code public static string convert accelerator int key code string modifier get modifier string key code string full key if modifier equals non nls 1 full key find key string key code else full key modifier find key string key code non nls 1 return full key keycode convertaccelerator keycode getmodifierstring keycode fullkey fullkey findkeystring keycode fullkey findkeystring keycode fullkey private static string get modifier string int key code string mod string non nls 1 if key code swt ctrl 0 mod string find modifier string key code swt ctrl if key code swt alt 0 if mod string equals non nls 1 mod string find modifier string key code swt alt else mod string mod string find modifier string key code swt alt non nls 1 if key code swt shift 0 if mod string equals non nls 1 mod string find modifier string key code swt shift else mod string mod string find modifier string key code swt shift non nls 1 if key code swt command 0 if mod string equals non nls 1 mod string find modifier string key code swt command else mod string mod string find modifier string key code swt command non nls 1 return mod string getmodifierstring keycode modstring keycode modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode modstring extracts the accelerator text from the given text returns code null code if there is no accelerator text and the empty string if there is no text after the accelerator delimeter tab or param text the text for the action return the accelerator text or code null code private static string extract accelerator text string text int index text last index of t if index 1 index text last index of if index 0 return text substring index 1 return null extractacceleratortext lastindexof lastindexof maps a standard keyboard key name to an swt key code key names are converted to upper case before comparison if the key name is a single letter for example s its character code is returned p the following key names are known case is ignored ul li code backspace code li li code tab code li li code return code li li code enter code li li code esc code li li code escape code li li code delete code li li code space code li li code arrow up code code arrow down code code arrow left code and code arrow right code li li code page up code and code page down code li li code home code li li code end code li li code insert code li li code f1 code code f2 code through code f12 code li ul p param token the key name return the swt key code code 1 code if no match was found see swt public static int find key code string token if key codes null init key codes token token to upper case integer i integer key codes get token if i null return i int value if token length 1 return token char at 0 return 1 arrow_up arrow_down arrow_left arrow_right page_up page_down findkeycode keycodes initkeycodes touppercase keycodes intvalue charat find the supplied code for a localized key as find key code but localized to the current locale support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml param token the localized key name return the swt key code code 1 code if no match was found see find key code private static int find localized key code string token if localized key codes null init localized key codes token token to upper case integer i integer localized key codes get token if i null return i int value if token length 1 return token char at 0 return 1 findkeycode setaccelerator findkeycode findlocalizedkeycode localizedkeycodes initlocalizedkeycodes touppercase localizedkeycodes intvalue charat maps an swt key code to a standard keyboard key name the key code is stripped of modifiers swt ctrl swt alt swt shift and swt command if the key code is not an swt code for example if it a key code for the key s a string containing a character representation of the key code is returned param key code the key code to be translated return the string representation of the key code see swt since 2 0 public static string find key string int key code if key strings null init key strings int i key code swt ctrl swt alt swt shift swt command integer integer new integer i string result string key strings get integer if result null return result result new string new char char i return result keycode findkeystring keycode keystrings initkeystrings keycode keystrings maps standard keyboard modifier key names to the corresponding swt modifier bit the following modifier key names are recognized case is ignored code ctrl code code shift code code alt code and code command code the given modifier key name is converted to upper case before comparison param token the modifier key name return the swt modifier bit or code 0 code if no match was found see swt public static int find modifier string token token token to upper case if token equals ctrl non nls 1 return swt ctrl if token equals shift non nls 1 return swt shift if token equals alt non nls 1 return swt alt if token equals command non nls 1 return swt command return 0 findmodifier touppercase maps the localized modifier names to a code in the same manner as find modifier support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml see find modifier private static int find localized modifier string token if localized ctrl null init localized modifiers token token to upper case if token equals localized ctrl non nls 1 return swt ctrl if token equals localized shift non nls 1 return swt shift if token equals localized alt non nls 1 return swt alt if token equals localized command non nls 1 return swt command return 0 findmodifier setaccelerator findmodifier findlocalizedmodifier localized_ctrl initlocalizedmodifiers touppercase localized_ctrl localized_shift localized_alt localized_command initialize the list of localized modifiers private static void init localized modifiers localized ctrl j face resources get string ctrl to upper case non nls 1 localized shift j face resources get string shift to upper case non nls 1 localized alt j face resources get string alt to upper case non nls 1 localized command j face resources get string command to upper case non nls 1 initlocalizedmodifiers localized_ctrl jfaceresources getstring touppercase localized_shift jfaceresources getstring touppercase localized_alt jfaceresources getstring touppercase localized_command jfaceresources getstring touppercase returns a string representation of an swt modifier bit swt ctrl swt alt swt shift and swt command returns code null code if the key code is not an swt modifier bit param key code the swt modifier bit to be translated return the string representation of the swt modifier bit or code null code if the key code was not an swt modifier bit see swt since 2 0 public static string find modifier string int key code if key code swt ctrl return j face resources get string ctrl non nls 1 if key code swt alt return j face resources get string alt non nls 1 if key code swt shift return j face resources get string shift non nls 1 if key code swt command return j face resources get string command non nls 1 return null keycode findmodifierstring keycode keycode jfaceresources getstring keycode jfaceresources getstring keycode jfaceresources getstring keycode jfaceresources getstring notifies any property change listeners that a property has changed only listeners registered at the time this method is called are notified this method avoids creating an event object if there are no listeners registered but calls code fire property change property change event code if there are param property name the name of the property that has changed param old value the old value of the property or code null code if none param new value the new value of the property or code null code if none see i property change listener property change protected void fire property change string property name object old value object new value if listeners is empty fire property change new property change event this property name old value new value firepropertychange propertychangeevent propertyname oldvalue newvalue ipropertychangelistener propertychange firepropertychange propertyname oldvalue newvalue isempty firepropertychange propertychangeevent propertyname oldvalue newvalue notifies any property change listeners that a property has changed only listeners registered at the time this method is called are notified param event the property change event see i property change listener property change protected void fire property change property change event event object list this listeners get listeners for int i 0 i list length i i property change listener list i property change event ipropertychangelistener propertychange firepropertychange propertychangeevent getlisteners ipropertychangelistener propertychange method declared on i action public int get accelerator return accelerator iaction getaccelerator public string get action definition id return action definition id getactiondefinitionid actiondefinitionid public string get description if description null return description return get tool tip text getdescription gettooltiptext method declared on i action public image descriptor get disabled image descriptor return disabled image iaction imagedescriptor getdisabledimagedescriptor disabledimage method declared on i action public help listener get help listener return help listener iaction helplistener gethelplistener helplistener method declared on i action public image descriptor get hover image descriptor return hover image iaction imagedescriptor gethoverimagedescriptor hoverimage method declared on i action public string get id return id iaction getid method declared on i action public image descriptor get image descriptor return image iaction imagedescriptor getimagedescriptor public i menu creator get menu creator the default drop down menu value is only used to mark this action requested style so do not return it for backward compatibility reasons if value val drop down menu return null if value instanceof i menu creator return i menu creator value return null imenucreator getmenucreator val_drop_down_menu imenucreator imenucreator public int get style infer the style from the value field if value val push btn value null return as push button if value val toggle btn on value val toggle btn off return as check box if value val radio btn on value val radio btn off return as radio button if value instanceof i menu creator return as drop down menu we should never get to this line return as push button getstyle val_push_btn as_push_button val_toggle_btn_on val_toggle_btn_off as_check_box val_radio_btn_on val_radio_btn_off as_radio_button imenucreator as_drop_down_menu as_push_button method declared on i action public string get text return text iaction gettext method declared on i action public string get tool tip text return tool tip text iaction gettooltiptext tooltiptext initializes the internal key code table private static void init key codes key codes new hash map 40 key codes put backspace new integer 8 non nls 1 key codes put tab new integer 9 non nls 1 key codes put return new integer 13 non nls 1 key codes put enter new integer 13 non nls 1 key codes put escape new integer 27 non nls 1 key codes put esc new integer 27 non nls 1 key codes put delete new integer 127 non nls 1 key codes put space new integer non nls 1 key codes put arrow up new integer swt arrow up non nls 1 key codes put arrow down new integer swt arrow down non nls 1 key codes put arrow left new integer swt arrow left non nls 1 key codes put arrow right new integer swt arrow right non nls 1 key codes put page up new integer swt page up non nls 1 key codes put page down new integer swt page down non nls 1 key codes put home new integer swt home non nls 1 key codes put end new integer swt end non nls 1 key codes put insert new integer swt insert non nls 1 key codes put f1 new integer swt f1 non nls 1 key codes put f2 new integer swt f2 non nls 1 key codes put f3 new integer swt f3 non nls 1 key codes put f4 new integer swt f4 non nls 1 key codes put f5 new integer swt f5 non nls 1 key codes put f6 new integer swt f6 non nls 1 key codes put f7 new integer swt f7 non nls 1 key codes put f8 new integer swt f8 non nls 1 key codes put f9 new integer swt f9 non nls 1 key codes put f10 new integer swt f10 non nls 1 key codes put f11 new integer swt f11 non nls 1 key codes put f12 new integer swt f12 non nls 1 initkeycodes keycodes hashmap keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes arrow_up arrow_up keycodes arrow_down arrow_down keycodes arrow_left arrow_left keycodes arrow_right arrow_right keycodes page_up page_up keycodes page_down page_down keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes initializes the localized internal key code table private static void init localized key codes localized key codes new hash map 40 localized key codes put j face resources get string backspace to upper case new integer 8 non nls 1 localized key codes put j face resources get string tab to upper case new integer 9 non nls 1 localized key codes put j face resources get string return to upper case new integer 13 non nls 1 localized key codes put j face resources get string enter to upper case new integer 13 non nls 1 localized key codes put j face resources get string escape to upper case new integer 27 non nls 1 localized key codes put j face resources get string esc to upper case new integer 27 non nls 1 localized key codes put j face resources get string delete to upper case new integer 127 non nls 1 localized key codes put j face resources get string space to upper case new integer non nls 1 localized key codes put j face resources get string arrow up to upper case new integer swt arrow up non nls 1 localized key codes put j face resources get string arrow down to upper case new integer swt arrow down non nls 1 localized key codes put j face resources get string arrow left to upper case new integer swt arrow left non nls 1 localized key codes put j face resources get string arrow right to upper case new integer swt arrow right non nls 1 localized key codes put j face resources get string page up to upper case new integer swt page up non nls 1 localized key codes put j face resources get string page down to upper case new integer swt page down non nls 1 localized key codes put j face resources get string home to upper case new integer swt home non nls 1 localized key codes put j face resources get string end to upper case new integer swt end non nls 1 localized key codes put j face resources get string insert to upper case new integer swt insert non nls 1 localized key codes put j face resources get string f1 to upper case new integer swt f1 non nls 1 localized key codes put j face resources get string f2 to upper case new integer swt f2 non nls 1 localized key codes put j face resources get string f3 to upper case new integer swt f3 non nls 1 localized key codes put j face resources get string f4 to upper case new integer swt f4 non nls 1 localized key codes put j face resources get string f5 to upper case new integer swt f5 non nls 1 localized key codes put j face resources get string f6 to upper case new integer swt f6 non nls 1 localized key codes put j face resources get string f7 to upper case new integer swt f7 non nls 1 localized key codes put j face resources get string f8 to upper case new integer swt f8 non nls 1 localized key codes put j face resources get string f9 to upper case new integer swt f9 non nls 1 localized key codes put j face resources get string f10 to upper case new integer swt f10 non nls 1 localized key codes put j face resources get string f11 to upper case new integer swt f11 non nls 1 localized key codes put j face resources get string f12 to upper case new integer swt f12 non nls 1 initlocalizedkeycodes localizedkeycodes hashmap localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring arrow_up touppercase arrow_up localizedkeycodes jfaceresources getstring arrow_down touppercase arrow_down localizedkeycodes jfaceresources getstring arrow_left touppercase arrow_left localizedkeycodes jfaceresources getstring arrow_right touppercase arrow_right localizedkeycodes jfaceresources getstring page_up touppercase page_up localizedkeycodes jfaceresources getstring page_down touppercase page_down localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase initializes the internal key string table private static void init key strings key strings new hash map 40 key strings put new integer 8 j face resources get string backspace non nls 1 key strings put new integer 9 j face resources get string tab non nls 1 key strings put new integer 13 j face resources get string return non nls 1 key strings put new integer 13 j face resources get string enter non nls 1 key strings put new integer 27 j face resources get string escape non nls 1 key strings put new integer 27 j face resources get string esc non nls 1 key strings put new integer 127 j face resources get string delete non nls 1 key strings put new integer j face resources get string space non nls 1 key strings put new integer swt arrow up j face resources get string arrow up non nls 1 key strings put new integer swt arrow down j face resources get string arrow down non nls 1 key strings put new integer swt arrow left j face resources get string arrow left non nls 1 key strings put new integer swt arrow right j face resources get string arrow right non nls 1 key strings put new integer swt page up j face resources get string page up non nls 1 key strings put new integer swt page down j face resources get string page down non nls 1 key strings put new integer swt home j face resources get string home non nls 1 key strings put new integer swt end j face resources get string end non nls 1 key strings put new integer swt insert j face resources get string insert non nls 1 key strings put new integer swt f1 j face resources get string f1 non nls 1 key strings put new integer swt f2 j face resources get string f2 non nls 1 key strings put new integer swt f3 j face resources get string f3 non nls 1 key strings put new integer swt f4 j face resources get string f4 non nls 1 key strings put new integer swt f5 j face resources get string f5 non nls 1 key strings put new integer swt f6 j face resources get string f6 non nls 1 key strings put new integer swt f7 j face resources get string f7 non nls 1 key strings put new integer swt f8 j face resources get string f8 non nls 1 key strings put new integer swt f9 j face resources get string f9 non nls 1 key strings put new integer swt f10 j face resources get string f10 non nls 1 key strings put new integer swt f11 j face resources get string f11 non nls 1 key strings put new integer swt f12 j face resources get string f12 non nls 1 initkeystrings keystrings hashmap keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings arrow_up jfaceresources getstring arrow_up keystrings arrow_down jfaceresources getstring arrow_down keystrings arrow_left jfaceresources getstring arrow_left keystrings arrow_right jfaceresources getstring arrow_right keystrings page_up jfaceresources getstring page_up keystrings page_down jfaceresources getstring page_down keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring method declared on i action public boolean is checked return value val toggle btn on value val radio btn on iaction ischecked val_toggle_btn_on val_radio_btn_on method declared on i action public boolean is enabled return enabled iaction isenabled method declared on i action public boolean is handled return true iaction ishandled convenience method for removing any optional accelerator text from the given string the accelerator text appears at the end of the text and is separated from the main part by a single tab character code t code param text the text return the text sans accelerator public static string remove accelerator text string text int index text last index of t if index 1 index text last index of if index 0 return text substring 0 index return text removeacceleratortext lastindexof lastindexof convenience method for removing any mnemonics from the given string for example code remove mnemonics open code will return code open code param text the text return the text sans mnemonics since 3 0 public static string remove mnemonics string text int index text index of if index 1 return text int len text length string buffer sb new string buffer len int last index 0 while index 1 ignore at the end if index len 1 break handle the case if text char at index 1 index dbcs languages use x format if index 0 text char at index 1 text length index 3 text char at index 2 sb append text substring last index index 1 index 3 else sb append text substring last index index skip the index last index index index text index of index if last index len sb append text substring last index len return sb to string removemnemonics removemnemonics indexof stringbuffer stringbuffer lastindex charat charat charat lastindex lastindex lastindex indexof lastindex lastindex tostring method declared on i action public void remove property change listener i property change listener listener listeners remove listener iaction removepropertychangelistener ipropertychangelistener the default implementation of this code i action code method does nothing subclasses should override this method if they do not need information from the triggering event or override code run with event event code if they do public void run do nothing iaction runwithevent the default implementation of this code i action code method ignores the event argument and simply calls code run code subclasses should override this method if they need information from the triggering event or override code run code if not param event the swt event which triggered this action being run since 2 0 public void run with event event event run iaction runwithevent method declared on i action public void set action definition id string id action definition id id iaction setactiondefinitionid actiondefinitionid public void set checked boolean checked object new value null for backward compatibility if the style is not set yet then convert it to a toggle button if value null value val toggle btn on value val toggle btn off new value checked val toggle btn on val toggle btn off else if value val radio btn on value val radio btn off new value checked val radio btn on val radio btn off else some other style already so do nothing return if new value value value new value if checked fire property change checked boolean false boolean true else fire property change checked boolean true boolean false setchecked newvalue val_toggle_btn_on val_toggle_btn_off newvalue val_toggle_btn_on val_toggle_btn_off val_radio_btn_on val_radio_btn_off newvalue val_radio_btn_on val_radio_btn_off newvalue newvalue firepropertychange firepropertychange public void set description string text if description null text null description null text null description null text null text equals description string old description description description text fire property change description old description description setdescription olddescription firepropertychange olddescription public void set disabled image descriptor image descriptor new image if disabled image new image image descriptor old image disabled image disabled image new image fire property change image old image new image setdisabledimagedescriptor imagedescriptor newimage disabledimage newimage imagedescriptor oldimage disabledimage disabledimage newimage firepropertychange oldimage newimage public void set enabled boolean enabled if enabled this enabled boolean old val this enabled boolean true boolean false boolean new val enabled boolean true boolean false this enabled enabled fire property change enabled old val new val setenabled oldval newval firepropertychange oldval newval method declared on i action public void set help listener help listener listener help listener listener iaction sethelplistener helplistener helplistener public void set hover image descriptor image descriptor new image if hover image new image image descriptor old image hover image hover image new image fire property change image old image new image sethoverimagedescriptor imagedescriptor newimage hoverimage newimage imagedescriptor oldimage hoverimage hoverimage newimage firepropertychange oldimage newimage method declared on i action public void set id string id this id id iaction setid public void set image descriptor image descriptor new image if image new image image descriptor old image image image new image fire property change image old image new image setimagedescriptor imagedescriptor newimage newimage imagedescriptor oldimage newimage firepropertychange oldimage newimage sets the menu creator for this action p note that if this method is called it overrides the check status p param creator the menu creator or code null code if none public void set menu creator i menu creator creator for backward compatibility if the style is not set yet then convert it to a drop down menu if value null value creator return if value instanceof i menu creator value creator null val drop down menu creator setmenucreator imenucreator imenucreator val_drop_down_menu sets the text for this action p fires a property change event for the code text code property if the text actually changes as a consequence p p the accelerator is identified by the last index of a tab character if there are no tab characters then it is identified by the last index of a character if neither then there is no accelerator text note that if you want to insert a character into the text but no accelerator you can simply insert a or a tab at the end of the text p param text the text or code null code if none public void set text string text string old text this text int old accel this accelerator this text text if text null string accelerator text extract accelerator text text if accelerator text null int new accelerator convert localized accelerator accelerator text be sure to not wipe out the accelerator if nothing found if new accelerator 0 set accelerator new accelerator if this accelerator old accel old text null this text null old text equals this text fire property change text old text this text settext oldtext oldaccel acceleratortext extractacceleratortext acceleratortext newaccelerator convertlocalizedaccelerator acceleratortext newaccelerator setaccelerator newaccelerator oldaccel oldtext oldtext firepropertychange oldtext sets the tool tip text for this action p fires a property change event for the code tool tip text code property if the tool tip text actually changes as a consequence p param tool tip text the tool tip text or code null code if none public void set tool tip text string tool tip text string old tool tip text this tool tip text if old tool tip text null tool tip text null old tool tip text equals tool tip text this tool tip text tool tip text fire property change tool tip text old tool tip text tool tip text tool_tip_text tooltiptext settooltiptext tooltiptext oldtooltiptext tooltiptext oldtooltiptext tooltiptext oldtooltiptext tooltiptext tooltiptext tooltiptext firepropertychange tool_tip_text oldtooltiptext tooltiptext see i action set accelerator int public void set accelerator int keycode this accelerator keycode iaction setaccelerator setaccelerator reports the outcome of the running of this action via the link i action result property param success code true code if the action succeeded and code false code if the action failed or was not completed see i action result since 3 0 public final void notify result boolean success avoid boolean value of boolean to allow compilation against jcl foundation bug 80059 fire property change result null success boolean true boolean false iaction iaction notifyresult valueof firepropertychange private static final i menu creator val drop down menu new i menu creator public void dispose do nothing imenucreator val_drop_down_menu imenucreator public menu get menu control parent do nothing return null getmenu public menu get menu menu parent do nothing return null getmenu creates a new action with no text and no image p configure the action later using the set methods p protected action do nothing creates a new action with the given text and no image calls the zero arg constructor then code set text code param text the string used as the text for the action or code null code if there is no text see set text protected action string text this set text text settext settext settext creates a new action with the given text and image calls the zero arg constructor then code set text code and code set image descriptor code param text the action s text or code null code if there is no text param image the action s image or code null code if there is no image see set text see set image descriptor protected action string text image descriptor image this text set image descriptor image settext setimagedescriptor settext setimagedescriptor imagedescriptor setimagedescriptor creates a new action with the given text and style param text the action s text or code null code if there is no text param style one of code as push button code code as check box code code as drop down menu code code as radio button code and code as unspecified code protected action string text int style this text switch style case as push button value val push btn break case as check box value val toggle btn off break case as drop down menu value val drop down menu break case as radio button value val radio btn off break as_push_button as_check_box as_drop_down_menu as_radio_button as_unspecified as_push_button val_push_btn as_check_box val_toggle_btn_off as_drop_down_menu val_drop_down_menu as_radio_button val_radio_btn_off method declared on i action public void add property change listener i property change listener listener listeners add listener iaction addpropertychangelistener ipropertychangelistener parses the given accelerator text and converts it to an accelerator key code support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml param accelerator text the accelerator text localized to the current locale return the swt key code or 0 if there is no accelerator private static int convert localized accelerator string accelerator text int accelerator 0 string tokenizer stok new string tokenizer accelerator text non nls 1 int key code 1 boolean has more tokens stok has more tokens while has more tokens string token stok next token has more tokens stok has more tokens every token except the last must be one of the modifiers ctrl shift alt or command if has more tokens int modifier find localized modifier token if modifier 0 accelerator modifier else leave if there are none return 0 else key code find localized key code token if key code 1 accelerator key code return accelerator setaccelerator acceleratortext convertlocalizedaccelerator acceleratortext stringtokenizer stringtokenizer acceleratortext keycode hasmoretokens hasmoretokens hasmoretokens nexttoken hasmoretokens hasmoretokens hasmoretokens findlocalizedmodifier keycode findlocalizedkeycode keycode keycode parses the given accelerator text and converts it to an accelerator key code param accelerator text the accelerator text return the swt key code or 0 if there is no accelerator public static int convert accelerator string accelerator text int accelerator 0 string tokenizer stok new string tokenizer accelerator text non nls 1 int key code 1 boolean has more tokens stok has more tokens while has more tokens string token stok next token has more tokens stok has more tokens every token except the last must be one of the modifiers ctrl shift alt or command if has more tokens int modifier find modifier token if modifier 0 accelerator modifier else leave if there are none return 0 else key code find key code token if key code 1 accelerator key code return accelerator acceleratortext convertaccelerator acceleratortext stringtokenizer stringtokenizer acceleratortext keycode hasmoretokens hasmoretokens hasmoretokens nexttoken hasmoretokens hasmoretokens hasmoretokens findmodifier keycode findkeycode keycode keycode converts an accelerator key code to a string representation param key code the key code to be translated return a string representation of the key code public static string convert accelerator int key code string modifier get modifier string key code string full key if modifier equals non nls 1 full key find key string key code else full key modifier find key string key code non nls 1 return full key keycode convertaccelerator keycode getmodifierstring keycode fullkey fullkey findkeystring keycode fullkey findkeystring keycode fullkey private static string get modifier string int key code string mod string non nls 1 if key code swt ctrl 0 mod string find modifier string key code swt ctrl if key code swt alt 0 if mod string equals non nls 1 mod string find modifier string key code swt alt else mod string mod string find modifier string key code swt alt non nls 1 if key code swt shift 0 if mod string equals non nls 1 mod string find modifier string key code swt shift else mod string mod string find modifier string key code swt shift non nls 1 if key code swt command 0 if mod string equals non nls 1 mod string find modifier string key code swt command else mod string mod string find modifier string key code swt command non nls 1 return mod string getmodifierstring keycode modstring keycode modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode modstring extracts the accelerator text from the given text returns code null code if there is no accelerator text and the empty string if there is no text after the accelerator delimeter tab or param text the text for the action return the accelerator text or code null code private static string extract accelerator text string text int index text last index of t if index 1 index text last index of if index 0 return text substring index 1 return null extractacceleratortext lastindexof lastindexof maps a standard keyboard key name to an swt key code key names are converted to upper case before comparison if the key name is a single letter for example s its character code is returned p the following key names are known case is ignored ul li code backspace code li li code tab code li li code return code li li code enter code li li code esc code li li code escape code li li code delete code li li code space code li li code arrow up code code arrow down code code arrow left code and code arrow right code li li code page up code and code page down code li li code home code li li code end code li li code insert code li li code f1 code code f2 code through code f12 code li ul p param token the key name return the swt key code code 1 code if no match was found see swt public static int find key code string token if key codes null init key codes token token to upper case integer i integer key codes get token if i null return i int value if token length 1 return token char at 0 return 1 arrow_up arrow_down arrow_left arrow_right page_up page_down findkeycode keycodes initkeycodes touppercase keycodes intvalue charat find the supplied code for a localized key as find key code but localized to the current locale support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml param token the localized key name return the swt key code code 1 code if no match was found see find key code private static int find localized key code string token if localized key codes null init localized key codes token token to upper case integer i integer localized key codes get token if i null return i int value if token length 1 return token char at 0 return 1 findkeycode setaccelerator findkeycode findlocalizedkeycode localizedkeycodes initlocalizedkeycodes touppercase localizedkeycodes intvalue charat maps an swt key code to a standard keyboard key name the key code is stripped of modifiers swt ctrl swt alt swt shift and swt command if the key code is not an swt code for example if it a key code for the key s a string containing a character representation of the key code is returned param key code the key code to be translated return the string representation of the key code see swt since 2 0 public static string find key string int key code if key strings null init key strings int i key code swt ctrl swt alt swt shift swt command integer integer new integer i string result string key strings get integer if result null return result result new string new char char i return result keycode findkeystring keycode keystrings initkeystrings keycode keystrings maps standard keyboard modifier key names to the corresponding swt modifier bit the following modifier key names are recognized case is ignored code ctrl code code shift code code alt code and code command code the given modifier key name is converted to upper case before comparison param token the modifier key name return the swt modifier bit or code 0 code if no match was found see swt public static int find modifier string token token token to upper case if token equals ctrl non nls 1 return swt ctrl if token equals shift non nls 1 return swt shift if token equals alt non nls 1 return swt alt if token equals command non nls 1 return swt command return 0 findmodifier touppercase maps the localized modifier names to a code in the same manner as find modifier support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml see find modifier private static int find localized modifier string token if localized ctrl null init localized modifiers token token to upper case if token equals localized ctrl non nls 1 return swt ctrl if token equals localized shift non nls 1 return swt shift if token equals localized alt non nls 1 return swt alt if token equals localized command non nls 1 return swt command return 0 findmodifier setaccelerator findmodifier findlocalizedmodifier localized_ctrl initlocalizedmodifiers touppercase localized_ctrl localized_shift localized_alt localized_command initialize the list of localized modifiers private static void init localized modifiers localized ctrl j face resources get string ctrl to upper case non nls 1 localized shift j face resources get string shift to upper case non nls 1 localized alt j face resources get string alt to upper case non nls 1 localized command j face resources get string command to upper case non nls 1 initlocalizedmodifiers localized_ctrl jfaceresources getstring touppercase localized_shift jfaceresources getstring touppercase localized_alt jfaceresources getstring touppercase localized_command jfaceresources getstring touppercase returns a string representation of an swt modifier bit swt ctrl swt alt swt shift and swt command returns code null code if the key code is not an swt modifier bit param key code the swt modifier bit to be translated return the string representation of the swt modifier bit or code null code if the key code was not an swt modifier bit see swt since 2 0 public static string find modifier string int key code if key code swt ctrl return j face resources get string ctrl non nls 1 if key code swt alt return j face resources get string alt non nls 1 if key code swt shift return j face resources get string shift non nls 1 if key code swt command return j face resources get string command non nls 1 return null keycode findmodifierstring keycode keycode jfaceresources getstring keycode jfaceresources getstring keycode jfaceresources getstring keycode jfaceresources getstring notifies any property change listeners that a property has changed only listeners registered at the time this method is called are notified this method avoids creating an event object if there are no listeners registered but calls code fire property change property change event code if there are param property name the name of the property that has changed param old value the old value of the property or code null code if none param new value the new value of the property or code null code if none see i property change listener property change protected void fire property change string property name object old value object new value if listeners is empty fire property change new property change event this property name old value new value firepropertychange propertychangeevent propertyname oldvalue newvalue ipropertychangelistener propertychange firepropertychange propertyname oldvalue newvalue isempty firepropertychange propertychangeevent propertyname oldvalue newvalue notifies any property change listeners that a property has changed only listeners registered at the time this method is called are notified param event the property change event see i property change listener property change protected void fire property change property change event event object list this listeners get listeners for int i 0 i list length i i property change listener list i property change event ipropertychangelistener propertychange firepropertychange propertychangeevent getlisteners ipropertychangelistener propertychange method declared on i action public int get accelerator return accelerator iaction getaccelerator public string get action definition id return action definition id getactiondefinitionid actiondefinitionid public string get description if description null return description return get tool tip text getdescription gettooltiptext method declared on i action public image descriptor get disabled image descriptor return disabled image iaction imagedescriptor getdisabledimagedescriptor disabledimage method declared on i action public help listener get help listener return help listener iaction helplistener gethelplistener helplistener method declared on i action public image descriptor get hover image descriptor return hover image iaction imagedescriptor gethoverimagedescriptor hoverimage method declared on i action public string get id return id iaction getid method declared on i action public image descriptor get image descriptor return image iaction imagedescriptor getimagedescriptor public i menu creator get menu creator the default drop down menu value is only used to mark this action requested style so do not return it for backward compatibility reasons if value val drop down menu return null if value instanceof i menu creator return i menu creator value return null imenucreator getmenucreator val_drop_down_menu imenucreator imenucreator public int get style infer the style from the value field if value val push btn value null return as push button if value val toggle btn on value val toggle btn off return as check box if value val radio btn on value val radio btn off return as radio button if value instanceof i menu creator return as drop down menu we should never get to this line return as push button getstyle val_push_btn as_push_button val_toggle_btn_on val_toggle_btn_off as_check_box val_radio_btn_on val_radio_btn_off as_radio_button imenucreator as_drop_down_menu as_push_button method declared on i action public string get text return text iaction gettext method declared on i action public string get tool tip text return tool tip text iaction gettooltiptext tooltiptext initializes the internal key code table private static void init key codes key codes new hash map 40 key codes put backspace new integer 8 non nls 1 key codes put tab new integer 9 non nls 1 key codes put return new integer 13 non nls 1 key codes put enter new integer 13 non nls 1 key codes put escape new integer 27 non nls 1 key codes put esc new integer 27 non nls 1 key codes put delete new integer 127 non nls 1 key codes put space new integer non nls 1 key codes put arrow up new integer swt arrow up non nls 1 key codes put arrow down new integer swt arrow down non nls 1 key codes put arrow left new integer swt arrow left non nls 1 key codes put arrow right new integer swt arrow right non nls 1 key codes put page up new integer swt page up non nls 1 key codes put page down new integer swt page down non nls 1 key codes put home new integer swt home non nls 1 key codes put end new integer swt end non nls 1 key codes put insert new integer swt insert non nls 1 key codes put f1 new integer swt f1 non nls 1 key codes put f2 new integer swt f2 non nls 1 key codes put f3 new integer swt f3 non nls 1 key codes put f4 new integer swt f4 non nls 1 key codes put f5 new integer swt f5 non nls 1 key codes put f6 new integer swt f6 non nls 1 key codes put f7 new integer swt f7 non nls 1 key codes put f8 new integer swt f8 non nls 1 key codes put f9 new integer swt f9 non nls 1 key codes put f10 new integer swt f10 non nls 1 key codes put f11 new integer swt f11 non nls 1 key codes put f12 new integer swt f12 non nls 1 initkeycodes keycodes hashmap keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes arrow_up arrow_up keycodes arrow_down arrow_down keycodes arrow_left arrow_left keycodes arrow_right arrow_right keycodes page_up page_up keycodes page_down page_down keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes initializes the localized internal key code table private static void init localized key codes localized key codes new hash map 40 localized key codes put j face resources get string backspace to upper case new integer 8 non nls 1 localized key codes put j face resources get string tab to upper case new integer 9 non nls 1 localized key codes put j face resources get string return to upper case new integer 13 non nls 1 localized key codes put j face resources get string enter to upper case new integer 13 non nls 1 localized key codes put j face resources get string escape to upper case new integer 27 non nls 1 localized key codes put j face resources get string esc to upper case new integer 27 non nls 1 localized key codes put j face resources get string delete to upper case new integer 127 non nls 1 localized key codes put j face resources get string space to upper case new integer non nls 1 localized key codes put j face resources get string arrow up to upper case new integer swt arrow up non nls 1 localized key codes put j face resources get string arrow down to upper case new integer swt arrow down non nls 1 localized key codes put j face resources get string arrow left to upper case new integer swt arrow left non nls 1 localized key codes put j face resources get string arrow right to upper case new integer swt arrow right non nls 1 localized key codes put j face resources get string page up to upper case new integer swt page up non nls 1 localized key codes put j face resources get string page down to upper case new integer swt page down non nls 1 localized key codes put j face resources get string home to upper case new integer swt home non nls 1 localized key codes put j face resources get string end to upper case new integer swt end non nls 1 localized key codes put j face resources get string insert to upper case new integer swt insert non nls 1 localized key codes put j face resources get string f1 to upper case new integer swt f1 non nls 1 localized key codes put j face resources get string f2 to upper case new integer swt f2 non nls 1 localized key codes put j face resources get string f3 to upper case new integer swt f3 non nls 1 localized key codes put j face resources get string f4 to upper case new integer swt f4 non nls 1 localized key codes put j face resources get string f5 to upper case new integer swt f5 non nls 1 localized key codes put j face resources get string f6 to upper case new integer swt f6 non nls 1 localized key codes put j face resources get string f7 to upper case new integer swt f7 non nls 1 localized key codes put j face resources get string f8 to upper case new integer swt f8 non nls 1 localized key codes put j face resources get string f9 to upper case new integer swt f9 non nls 1 localized key codes put j face resources get string f10 to upper case new integer swt f10 non nls 1 localized key codes put j face resources get string f11 to upper case new integer swt f11 non nls 1 localized key codes put j face resources get string f12 to upper case new integer swt f12 non nls 1 initlocalizedkeycodes localizedkeycodes hashmap localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring arrow_up touppercase arrow_up localizedkeycodes jfaceresources getstring arrow_down touppercase arrow_down localizedkeycodes jfaceresources getstring arrow_left touppercase arrow_left localizedkeycodes jfaceresources getstring arrow_right touppercase arrow_right localizedkeycodes jfaceresources getstring page_up touppercase page_up localizedkeycodes jfaceresources getstring page_down touppercase page_down localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase initializes the internal key string table private static void init key strings key strings new hash map 40 key strings put new integer 8 j face resources get string backspace non nls 1 key strings put new integer 9 j face resources get string tab non nls 1 key strings put new integer 13 j face resources get string return non nls 1 key strings put new integer 13 j face resources get string enter non nls 1 key strings put new integer 27 j face resources get string escape non nls 1 key strings put new integer 27 j face resources get string esc non nls 1 key strings put new integer 127 j face resources get string delete non nls 1 key strings put new integer j face resources get string space non nls 1 key strings put new integer swt arrow up j face resources get string arrow up non nls 1 key strings put new integer swt arrow down j face resources get string arrow down non nls 1 key strings put new integer swt arrow left j face resources get string arrow left non nls 1 key strings put new integer swt arrow right j face resources get string arrow right non nls 1 key strings put new integer swt page up j face resources get string page up non nls 1 key strings put new integer swt page down j face resources get string page down non nls 1 key strings put new integer swt home j face resources get string home non nls 1 key strings put new integer swt end j face resources get string end non nls 1 key strings put new integer swt insert j face resources get string insert non nls 1 key strings put new integer swt f1 j face resources get string f1 non nls 1 key strings put new integer swt f2 j face resources get string f2 non nls 1 key strings put new integer swt f3 j face resources get string f3 non nls 1 key strings put new integer swt f4 j face resources get string f4 non nls 1 key strings put new integer swt f5 j face resources get string f5 non nls 1 key strings put new integer swt f6 j face resources get string f6 non nls 1 key strings put new integer swt f7 j face resources get string f7 non nls 1 key strings put new integer swt f8 j face resources get string f8 non nls 1 key strings put new integer swt f9 j face resources get string f9 non nls 1 key strings put new integer swt f10 j face resources get string f10 non nls 1 key strings put new integer swt f11 j face resources get string f11 non nls 1 key strings put new integer swt f12 j face resources get string f12 non nls 1 initkeystrings keystrings hashmap keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings arrow_up jfaceresources getstring arrow_up keystrings arrow_down jfaceresources getstring arrow_down keystrings arrow_left jfaceresources getstring arrow_left keystrings arrow_right jfaceresources getstring arrow_right keystrings page_up jfaceresources getstring page_up keystrings page_down jfaceresources getstring page_down keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring method declared on i action public boolean is checked return value val toggle btn on value val radio btn on iaction ischecked val_toggle_btn_on val_radio_btn_on method declared on i action public boolean is enabled return enabled iaction isenabled method declared on i action public boolean is handled return true iaction ishandled convenience method for removing any optional accelerator text from the given string the accelerator text appears at the end of the text and is separated from the main part by a single tab character code t code param text the text return the text sans accelerator public static string remove accelerator text string text int index text last index of t if index 1 index text last index of if index 0 return text substring 0 index return text removeacceleratortext lastindexof lastindexof convenience method for removing any mnemonics from the given string for example code remove mnemonics open code will return code open code param text the text return the text sans mnemonics since 3 0 public static string remove mnemonics string text int index text index of if index 1 return text int len text length string buffer sb new string buffer len int last index 0 while index 1 ignore at the end if index len 1 break handle the case if text char at index 1 index dbcs languages use x format if index 0 text char at index 1 text length index 3 text char at index 2 sb append text substring last index index 1 index 3 else sb append text substring last index index skip the index last index index index text index of index if last index len sb append text substring last index len return sb to string removemnemonics removemnemonics indexof stringbuffer stringbuffer lastindex charat charat charat lastindex lastindex lastindex indexof lastindex lastindex tostring method declared on i action public void remove property change listener i property change listener listener listeners remove listener iaction removepropertychangelistener ipropertychangelistener the default implementation of this code i action code method does nothing subclasses should override this method if they do not need information from the triggering event or override code run with event event code if they do public void run do nothing iaction runwithevent the default implementation of this code i action code method ignores the event argument and simply calls code run code subclasses should override this method if they need information from the triggering event or override code run code if not param event the swt event which triggered this action being run since 2 0 public void run with event event event run iaction runwithevent method declared on i action public void set action definition id string id action definition id id iaction setactiondefinitionid actiondefinitionid public void set checked boolean checked object new value null for backward compatibility if the style is not set yet then convert it to a toggle button if value null value val toggle btn on value val toggle btn off new value checked val toggle btn on val toggle btn off else if value val radio btn on value val radio btn off new value checked val radio btn on val radio btn off else some other style already so do nothing return if new value value value new value if checked fire property change checked boolean false boolean true else fire property change checked boolean true boolean false setchecked newvalue val_toggle_btn_on val_toggle_btn_off newvalue val_toggle_btn_on val_toggle_btn_off val_radio_btn_on val_radio_btn_off newvalue val_radio_btn_on val_radio_btn_off newvalue newvalue firepropertychange firepropertychange public void set description string text if description null text null description null text null description null text null text equals description string old description description description text fire property change description old description description setdescription olddescription firepropertychange olddescription public void set disabled image descriptor image descriptor new image if disabled image new image image descriptor old image disabled image disabled image new image fire property change image old image new image setdisabledimagedescriptor imagedescriptor newimage disabledimage newimage imagedescriptor oldimage disabledimage disabledimage newimage firepropertychange oldimage newimage public void set enabled boolean enabled if enabled this enabled boolean old val this enabled boolean true boolean false boolean new val enabled boolean true boolean false this enabled enabled fire property change enabled old val new val setenabled oldval newval firepropertychange oldval newval method declared on i action public void set help listener help listener listener help listener listener iaction sethelplistener helplistener helplistener public void set hover image descriptor image descriptor new image if hover image new image image descriptor old image hover image hover image new image fire property change image old image new image sethoverimagedescriptor imagedescriptor newimage hoverimage newimage imagedescriptor oldimage hoverimage hoverimage newimage firepropertychange oldimage newimage method declared on i action public void set id string id this id id iaction setid public void set image descriptor image descriptor new image if image new image image descriptor old image image image new image fire property change image old image new image setimagedescriptor imagedescriptor newimage newimage imagedescriptor oldimage newimage firepropertychange oldimage newimage sets the menu creator for this action p note that if this method is called it overrides the check status p param creator the menu creator or code null code if none public void set menu creator i menu creator creator for backward compatibility if the style is not set yet then convert it to a drop down menu if value null value creator return if value instanceof i menu creator value creator null val drop down menu creator setmenucreator imenucreator imenucreator val_drop_down_menu sets the text for this action p fires a property change event for the code text code property if the text actually changes as a consequence p p the accelerator is identified by the last index of a tab character if there are no tab characters then it is identified by the last index of a character if neither then there is no accelerator text note that if you want to insert a character into the text but no accelerator you can simply insert a or a tab at the end of the text p param text the text or code null code if none public void set text string text string old text this text int old accel this accelerator this text text if text null string accelerator text extract accelerator text text if accelerator text null int new accelerator convert localized accelerator accelerator text be sure to not wipe out the accelerator if nothing found if new accelerator 0 set accelerator new accelerator if this accelerator old accel old text null this text null old text equals this text fire property change text old text this text settext oldtext oldaccel acceleratortext extractacceleratortext acceleratortext newaccelerator convertlocalizedaccelerator acceleratortext newaccelerator setaccelerator newaccelerator oldaccel oldtext oldtext firepropertychange oldtext sets the tool tip text for this action p fires a property change event for the code tool tip text code property if the tool tip text actually changes as a consequence p param tool tip text the tool tip text or code null code if none public void set tool tip text string tool tip text string old tool tip text this tool tip text if old tool tip text null tool tip text null old tool tip text equals tool tip text this tool tip text tool tip text fire property change tool tip text old tool tip text tool tip text tool_tip_text tooltiptext settooltiptext tooltiptext oldtooltiptext tooltiptext oldtooltiptext tooltiptext oldtooltiptext tooltiptext tooltiptext tooltiptext firepropertychange tool_tip_text oldtooltiptext tooltiptext see i action set accelerator int public void set accelerator int keycode this accelerator keycode iaction setaccelerator setaccelerator reports the outcome of the running of this action via the link i action result property param success code true code if the action succeeded and code false code if the action failed or was not completed see i action result since 3 0 public final void notify result boolean success avoid boolean value of boolean to allow compilation against jcl foundation bug 80059 fire property change result null success boolean true boolean false iaction iaction notifyresult valueof firepropertychange private static final i menu creator val drop down menu new i menu creator public void dispose do nothing imenucreator val_drop_down_menu imenucreator public menu get menu control parent do nothing return null getmenu public menu get menu menu parent do nothing return null getmenu creates a new action with no text and no image p configure the action later using the set methods p protected action do nothing creates a new action with the given text and no image calls the zero arg constructor then code set text code param text the string used as the text for the action or code null code if there is no text see set text protected action string text this set text text settext settext settext creates a new action with the given text and image calls the zero arg constructor then code set text code and code set image descriptor code param text the action s text or code null code if there is no text param image the action s image or code null code if there is no image see set text see set image descriptor protected action string text image descriptor image this text set image descriptor image settext setimagedescriptor settext setimagedescriptor imagedescriptor setimagedescriptor creates a new action with the given text and style param text the action s text or code null code if there is no text param style one of code as push button code code as check box code code as drop down menu code code as radio button code and code as unspecified code protected action string text int style this text switch style case as push button value val push btn break case as check box value val toggle btn off break case as drop down menu value val drop down menu break case as radio button value val radio btn off break as_push_button as_check_box as_drop_down_menu as_radio_button as_unspecified as_push_button val_push_btn as_check_box val_toggle_btn_off as_drop_down_menu val_drop_down_menu as_radio_button val_radio_btn_off method declared on i action public void add property change listener i property change listener listener listeners add listener iaction addpropertychangelistener ipropertychangelistener parses the given accelerator text and converts it to an accelerator key code support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml param accelerator text the accelerator text localized to the current locale return the swt key code or 0 if there is no accelerator private static int convert localized accelerator string accelerator text int accelerator 0 string tokenizer stok new string tokenizer accelerator text non nls 1 int key code 1 boolean has more tokens stok has more tokens while has more tokens string token stok next token has more tokens stok has more tokens every token except the last must be one of the modifiers ctrl shift alt or command if has more tokens int modifier find localized modifier token if modifier 0 accelerator modifier else leave if there are none return 0 else key code find localized key code token if key code 1 accelerator key code return accelerator setaccelerator acceleratortext convertlocalizedaccelerator acceleratortext stringtokenizer stringtokenizer acceleratortext keycode hasmoretokens hasmoretokens hasmoretokens nexttoken hasmoretokens hasmoretokens hasmoretokens findlocalizedmodifier keycode findlocalizedkeycode keycode keycode parses the given accelerator text and converts it to an accelerator key code param accelerator text the accelerator text return the swt key code or 0 if there is no accelerator public static int convert accelerator string accelerator text int accelerator 0 string tokenizer stok new string tokenizer accelerator text non nls 1 int key code 1 boolean has more tokens stok has more tokens while has more tokens string token stok next token has more tokens stok has more tokens every token except the last must be one of the modifiers ctrl shift alt or command if has more tokens int modifier find modifier token if modifier 0 accelerator modifier else leave if there are none return 0 else key code find key code token if key code 1 accelerator key code return accelerator acceleratortext convertaccelerator acceleratortext stringtokenizer stringtokenizer acceleratortext keycode hasmoretokens hasmoretokens hasmoretokens nexttoken hasmoretokens hasmoretokens hasmoretokens findmodifier keycode findkeycode keycode keycode converts an accelerator key code to a string representation param key code the key code to be translated return a string representation of the key code public static string convert accelerator int key code string modifier get modifier string key code string full key if modifier equals non nls 1 full key find key string key code else full key modifier find key string key code non nls 1 return full key keycode convertaccelerator keycode getmodifierstring keycode fullkey fullkey findkeystring keycode fullkey findkeystring keycode fullkey private static string get modifier string int key code string mod string non nls 1 if key code swt ctrl 0 mod string find modifier string key code swt ctrl if key code swt alt 0 if mod string equals non nls 1 mod string find modifier string key code swt alt else mod string mod string find modifier string key code swt alt non nls 1 if key code swt shift 0 if mod string equals non nls 1 mod string find modifier string key code swt shift else mod string mod string find modifier string key code swt shift non nls 1 if key code swt command 0 if mod string equals non nls 1 mod string find modifier string key code swt command else mod string mod string find modifier string key code swt command non nls 1 return mod string getmodifierstring keycode modstring keycode modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode modstring extracts the accelerator text from the given text returns code null code if there is no accelerator text and the empty string if there is no text after the accelerator delimeter tab or param text the text for the action return the accelerator text or code null code private static string extract accelerator text string text int index text last index of t if index 1 index text last index of if index 0 return text substring index 1 return null extractacceleratortext lastindexof lastindexof maps a standard keyboard key name to an swt key code key names are converted to upper case before comparison if the key name is a single letter for example s its character code is returned p the following key names are known case is ignored ul li code backspace code li li code tab code li li code return code li li code enter code li li code esc code li li code escape code li li code delete code li li code space code li li code arrow up code code arrow down code code arrow left code and code arrow right code li li code page up code and code page down code li li code home code li li code end code li li code insert code li li code f1 code code f2 code through code f12 code li ul p param token the key name return the swt key code code 1 code if no match was found see swt public static int find key code string token if key codes null init key codes token token to upper case integer i integer key codes get token if i null return i int value if token length 1 return token char at 0 return 1 arrow_up arrow_down arrow_left arrow_right page_up page_down findkeycode keycodes initkeycodes touppercase keycodes intvalue charat find the supplied code for a localized key as find key code but localized to the current locale support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml param token the localized key name return the swt key code code 1 code if no match was found see find key code private static int find localized key code string token if localized key codes null init localized key codes token token to upper case integer i integer localized key codes get token if i null return i int value if token length 1 return token char at 0 return 1 findkeycode setaccelerator findkeycode findlocalizedkeycode localizedkeycodes initlocalizedkeycodes touppercase localizedkeycodes intvalue charat maps an swt key code to a standard keyboard key name the key code is stripped of modifiers swt ctrl swt alt swt shift and swt command if the key code is not an swt code for example if it a key code for the key s a string containing a character representation of the key code is returned param key code the key code to be translated return the string representation of the key code see swt since 2 0 public static string find key string int key code if key strings null init key strings int i key code swt ctrl swt alt swt shift swt command integer integer new integer i string result string key strings get integer if result null return result result new string new char char i return result keycode findkeystring keycode keystrings initkeystrings keycode keystrings maps standard keyboard modifier key names to the corresponding swt modifier bit the following modifier key names are recognized case is ignored code ctrl code code shift code code alt code and code command code the given modifier key name is converted to upper case before comparison param token the modifier key name return the swt modifier bit or code 0 code if no match was found see swt public static int find modifier string token token token to upper case if token equals ctrl non nls 1 return swt ctrl if token equals shift non nls 1 return swt shift if token equals alt non nls 1 return swt alt if token equals command non nls 1 return swt command return 0 findmodifier touppercase maps the localized modifier names to a code in the same manner as find modifier support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml see find modifier private static int find localized modifier string token if localized ctrl null init localized modifiers token token to upper case if token equals localized ctrl non nls 1 return swt ctrl if token equals localized shift non nls 1 return swt shift if token equals localized alt non nls 1 return swt alt if token equals localized command non nls 1 return swt command return 0 findmodifier setaccelerator findmodifier findlocalizedmodifier localized_ctrl initlocalizedmodifiers touppercase localized_ctrl localized_shift localized_alt localized_command initialize the list of localized modifiers private static void init localized modifiers localized ctrl j face resources get string ctrl to upper case non nls 1 localized shift j face resources get string shift to upper case non nls 1 localized alt j face resources get string alt to upper case non nls 1 localized command j face resources get string command to upper case non nls 1 initlocalizedmodifiers localized_ctrl jfaceresources getstring touppercase localized_shift jfaceresources getstring touppercase localized_alt jfaceresources getstring touppercase localized_command jfaceresources getstring touppercase returns a string representation of an swt modifier bit swt ctrl swt alt swt shift and swt command returns code null code if the key code is not an swt modifier bit param key code the swt modifier bit to be translated return the string representation of the swt modifier bit or code null code if the key code was not an swt modifier bit see swt since 2 0 public static string find modifier string int key code if key code swt ctrl return j face resources get string ctrl non nls 1 if key code swt alt return j face resources get string alt non nls 1 if key code swt shift return j face resources get string shift non nls 1 if key code swt command return j face resources get string command non nls 1 return null keycode findmodifierstring keycode keycode jfaceresources getstring keycode jfaceresources getstring keycode jfaceresources getstring keycode jfaceresources getstring notifies any property change listeners that a property has changed only listeners registered at the time this method is called are notified this method avoids creating an event object if there are no listeners registered but calls code fire property change property change event code if there are param property name the name of the property that has changed param old value the old value of the property or code null code if none param new value the new value of the property or code null code if none see i property change listener property change protected void fire property change string property name object old value object new value if listeners is empty fire property change new property change event this property name old value new value firepropertychange propertychangeevent propertyname oldvalue newvalue ipropertychangelistener propertychange firepropertychange propertyname oldvalue newvalue isempty firepropertychange propertychangeevent propertyname oldvalue newvalue notifies any property change listeners that a property has changed only listeners registered at the time this method is called are notified param event the property change event see i property change listener property change protected void fire property change property change event event object list this listeners get listeners for int i 0 i list length i i property change listener list i property change event ipropertychangelistener propertychange firepropertychange propertychangeevent getlisteners ipropertychangelistener propertychange method declared on i action public int get accelerator return accelerator iaction getaccelerator public string get action definition id return action definition id getactiondefinitionid actiondefinitionid public string get description if description null return description return get tool tip text getdescription gettooltiptext method declared on i action public image descriptor get disabled image descriptor return disabled image iaction imagedescriptor getdisabledimagedescriptor disabledimage method declared on i action public help listener get help listener return help listener iaction helplistener gethelplistener helplistener method declared on i action public image descriptor get hover image descriptor return hover image iaction imagedescriptor gethoverimagedescriptor hoverimage method declared on i action public string get id return id iaction getid method declared on i action public image descriptor get image descriptor return image iaction imagedescriptor getimagedescriptor public i menu creator get menu creator the default drop down menu value is only used to mark this action requested style so do not return it for backward compatibility reasons if value val drop down menu return null if value instanceof i menu creator return i menu creator value return null imenucreator getmenucreator val_drop_down_menu imenucreator imenucreator public int get style infer the style from the value field if value val push btn value null return as push button if value val toggle btn on value val toggle btn off return as check box if value val radio btn on value val radio btn off return as radio button if value instanceof i menu creator return as drop down menu we should never get to this line return as push button getstyle val_push_btn as_push_button val_toggle_btn_on val_toggle_btn_off as_check_box val_radio_btn_on val_radio_btn_off as_radio_button imenucreator as_drop_down_menu as_push_button method declared on i action public string get text return text iaction gettext method declared on i action public string get tool tip text return tool tip text iaction gettooltiptext tooltiptext initializes the internal key code table private static void init key codes key codes new hash map 40 key codes put backspace new integer 8 non nls 1 key codes put tab new integer 9 non nls 1 key codes put return new integer 13 non nls 1 key codes put enter new integer 13 non nls 1 key codes put escape new integer 27 non nls 1 key codes put esc new integer 27 non nls 1 key codes put delete new integer 127 non nls 1 key codes put space new integer non nls 1 key codes put arrow up new integer swt arrow up non nls 1 key codes put arrow down new integer swt arrow down non nls 1 key codes put arrow left new integer swt arrow left non nls 1 key codes put arrow right new integer swt arrow right non nls 1 key codes put page up new integer swt page up non nls 1 key codes put page down new integer swt page down non nls 1 key codes put home new integer swt home non nls 1 key codes put end new integer swt end non nls 1 key codes put insert new integer swt insert non nls 1 key codes put f1 new integer swt f1 non nls 1 key codes put f2 new integer swt f2 non nls 1 key codes put f3 new integer swt f3 non nls 1 key codes put f4 new integer swt f4 non nls 1 key codes put f5 new integer swt f5 non nls 1 key codes put f6 new integer swt f6 non nls 1 key codes put f7 new integer swt f7 non nls 1 key codes put f8 new integer swt f8 non nls 1 key codes put f9 new integer swt f9 non nls 1 key codes put f10 new integer swt f10 non nls 1 key codes put f11 new integer swt f11 non nls 1 key codes put f12 new integer swt f12 non nls 1 initkeycodes keycodes hashmap keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes arrow_up arrow_up keycodes arrow_down arrow_down keycodes arrow_left arrow_left keycodes arrow_right arrow_right keycodes page_up page_up keycodes page_down page_down keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes initializes the localized internal key code table private static void init localized key codes localized key codes new hash map 40 localized key codes put j face resources get string backspace to upper case new integer 8 non nls 1 localized key codes put j face resources get string tab to upper case new integer 9 non nls 1 localized key codes put j face resources get string return to upper case new integer 13 non nls 1 localized key codes put j face resources get string enter to upper case new integer 13 non nls 1 localized key codes put j face resources get string escape to upper case new integer 27 non nls 1 localized key codes put j face resources get string esc to upper case new integer 27 non nls 1 localized key codes put j face resources get string delete to upper case new integer 127 non nls 1 localized key codes put j face resources get string space to upper case new integer non nls 1 localized key codes put j face resources get string arrow up to upper case new integer swt arrow up non nls 1 localized key codes put j face resources get string arrow down to upper case new integer swt arrow down non nls 1 localized key codes put j face resources get string arrow left to upper case new integer swt arrow left non nls 1 localized key codes put j face resources get string arrow right to upper case new integer swt arrow right non nls 1 localized key codes put j face resources get string page up to upper case new integer swt page up non nls 1 localized key codes put j face resources get string page down to upper case new integer swt page down non nls 1 localized key codes put j face resources get string home to upper case new integer swt home non nls 1 localized key codes put j face resources get string end to upper case new integer swt end non nls 1 localized key codes put j face resources get string insert to upper case new integer swt insert non nls 1 localized key codes put j face resources get string f1 to upper case new integer swt f1 non nls 1 localized key codes put j face resources get string f2 to upper case new integer swt f2 non nls 1 localized key codes put j face resources get string f3 to upper case new integer swt f3 non nls 1 localized key codes put j face resources get string f4 to upper case new integer swt f4 non nls 1 localized key codes put j face resources get string f5 to upper case new integer swt f5 non nls 1 localized key codes put j face resources get string f6 to upper case new integer swt f6 non nls 1 localized key codes put j face resources get string f7 to upper case new integer swt f7 non nls 1 localized key codes put j face resources get string f8 to upper case new integer swt f8 non nls 1 localized key codes put j face resources get string f9 to upper case new integer swt f9 non nls 1 localized key codes put j face resources get string f10 to upper case new integer swt f10 non nls 1 localized key codes put j face resources get string f11 to upper case new integer swt f11 non nls 1 localized key codes put j face resources get string f12 to upper case new integer swt f12 non nls 1 initlocalizedkeycodes localizedkeycodes hashmap localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring arrow_up touppercase arrow_up localizedkeycodes jfaceresources getstring arrow_down touppercase arrow_down localizedkeycodes jfaceresources getstring arrow_left touppercase arrow_left localizedkeycodes jfaceresources getstring arrow_right touppercase arrow_right localizedkeycodes jfaceresources getstring page_up touppercase page_up localizedkeycodes jfaceresources getstring page_down touppercase page_down localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase initializes the internal key string table private static void init key strings key strings new hash map 40 key strings put new integer 8 j face resources get string backspace non nls 1 key strings put new integer 9 j face resources get string tab non nls 1 key strings put new integer 13 j face resources get string return non nls 1 key strings put new integer 13 j face resources get string enter non nls 1 key strings put new integer 27 j face resources get string escape non nls 1 key strings put new integer 27 j face resources get string esc non nls 1 key strings put new integer 127 j face resources get string delete non nls 1 key strings put new integer j face resources get string space non nls 1 key strings put new integer swt arrow up j face resources get string arrow up non nls 1 key strings put new integer swt arrow down j face resources get string arrow down non nls 1 key strings put new integer swt arrow left j face resources get string arrow left non nls 1 key strings put new integer swt arrow right j face resources get string arrow right non nls 1 key strings put new integer swt page up j face resources get string page up non nls 1 key strings put new integer swt page down j face resources get string page down non nls 1 key strings put new integer swt home j face resources get string home non nls 1 key strings put new integer swt end j face resources get string end non nls 1 key strings put new integer swt insert j face resources get string insert non nls 1 key strings put new integer swt f1 j face resources get string f1 non nls 1 key strings put new integer swt f2 j face resources get string f2 non nls 1 key strings put new integer swt f3 j face resources get string f3 non nls 1 key strings put new integer swt f4 j face resources get string f4 non nls 1 key strings put new integer swt f5 j face resources get string f5 non nls 1 key strings put new integer swt f6 j face resources get string f6 non nls 1 key strings put new integer swt f7 j face resources get string f7 non nls 1 key strings put new integer swt f8 j face resources get string f8 non nls 1 key strings put new integer swt f9 j face resources get string f9 non nls 1 key strings put new integer swt f10 j face resources get string f10 non nls 1 key strings put new integer swt f11 j face resources get string f11 non nls 1 key strings put new integer swt f12 j face resources get string f12 non nls 1 initkeystrings keystrings hashmap keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings arrow_up jfaceresources getstring arrow_up keystrings arrow_down jfaceresources getstring arrow_down keystrings arrow_left jfaceresources getstring arrow_left keystrings arrow_right jfaceresources getstring arrow_right keystrings page_up jfaceresources getstring page_up keystrings page_down jfaceresources getstring page_down keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring method declared on i action public boolean is checked return value val toggle btn on value val radio btn on iaction ischecked val_toggle_btn_on val_radio_btn_on method declared on i action public boolean is enabled return enabled iaction isenabled method declared on i action public boolean is handled return true iaction ishandled convenience method for removing any optional accelerator text from the given string the accelerator text appears at the end of the text and is separated from the main part by a single tab character code t code param text the text return the text sans accelerator public static string remove accelerator text string text int index text last index of t if index 1 index text last index of if index 0 return text substring 0 index return text removeacceleratortext lastindexof lastindexof convenience method for removing any mnemonics from the given string for example code remove mnemonics open code will return code open code param text the text return the text sans mnemonics since 3 0 public static string remove mnemonics string text int index text index of if index 1 return text int len text length string buffer sb new string buffer len int last index 0 while index 1 ignore at the end if index len 1 break handle the case if text char at index 1 index dbcs languages use x format if index 0 text char at index 1 text length index 3 text char at index 2 sb append text substring last index index 1 index 3 else sb append text substring last index index skip the index last index index index text index of index if last index len sb append text substring last index len return sb to string removemnemonics removemnemonics indexof stringbuffer stringbuffer lastindex charat charat charat lastindex lastindex lastindex indexof lastindex lastindex tostring method declared on i action public void remove property change listener i property change listener listener listeners remove listener iaction removepropertychangelistener ipropertychangelistener the default implementation of this code i action code method does nothing subclasses should override this method if they do not need information from the triggering event or override code run with event event code if they do public void run do nothing iaction runwithevent the default implementation of this code i action code method ignores the event argument and simply calls code run code subclasses should override this method if they need information from the triggering event or override code run code if not param event the swt event which triggered this action being run since 2 0 public void run with event event event run iaction runwithevent method declared on i action public void set action definition id string id action definition id id iaction setactiondefinitionid actiondefinitionid public void set checked boolean checked object new value null for backward compatibility if the style is not set yet then convert it to a toggle button if value null value val toggle btn on value val toggle btn off new value checked val toggle btn on val toggle btn off else if value val radio btn on value val radio btn off new value checked val radio btn on val radio btn off else some other style already so do nothing return if new value value value new value if checked fire property change checked boolean false boolean true else fire property change checked boolean true boolean false setchecked newvalue val_toggle_btn_on val_toggle_btn_off newvalue val_toggle_btn_on val_toggle_btn_off val_radio_btn_on val_radio_btn_off newvalue val_radio_btn_on val_radio_btn_off newvalue newvalue firepropertychange firepropertychange public void set description string text if description null text null description null text null description null text null text equals description string old description description description text fire property change description old description description setdescription olddescription firepropertychange olddescription public void set disabled image descriptor image descriptor new image if disabled image new image image descriptor old image disabled image disabled image new image fire property change image old image new image setdisabledimagedescriptor imagedescriptor newimage disabledimage newimage imagedescriptor oldimage disabledimage disabledimage newimage firepropertychange oldimage newimage public void set enabled boolean enabled if enabled this enabled boolean old val this enabled boolean true boolean false boolean new val enabled boolean true boolean false this enabled enabled fire property change enabled old val new val setenabled oldval newval firepropertychange oldval newval method declared on i action public void set help listener help listener listener help listener listener iaction sethelplistener helplistener helplistener public void set hover image descriptor image descriptor new image if hover image new image image descriptor old image hover image hover image new image fire property change image old image new image sethoverimagedescriptor imagedescriptor newimage hoverimage newimage imagedescriptor oldimage hoverimage hoverimage newimage firepropertychange oldimage newimage method declared on i action public void set id string id this id id iaction setid public void set image descriptor image descriptor new image if image new image image descriptor old image image image new image fire property change image old image new image setimagedescriptor imagedescriptor newimage newimage imagedescriptor oldimage newimage firepropertychange oldimage newimage sets the menu creator for this action p note that if this method is called it overrides the check status p param creator the menu creator or code null code if none public void set menu creator i menu creator creator for backward compatibility if the style is not set yet then convert it to a drop down menu if value null value creator return if value instanceof i menu creator value creator null val drop down menu creator setmenucreator imenucreator imenucreator val_drop_down_menu sets the text for this action p fires a property change event for the code text code property if the text actually changes as a consequence p p the accelerator is identified by the last index of a tab character if there are no tab characters then it is identified by the last index of a character if neither then there is no accelerator text note that if you want to insert a character into the text but no accelerator you can simply insert a or a tab at the end of the text p param text the text or code null code if none public void set text string text string old text this text int old accel this accelerator this text text if text null string accelerator text extract accelerator text text if accelerator text null int new accelerator convert localized accelerator accelerator text be sure to not wipe out the accelerator if nothing found if new accelerator 0 set accelerator new accelerator if this accelerator old accel old text null this text null old text equals this text fire property change text old text this text settext oldtext oldaccel acceleratortext extractacceleratortext acceleratortext newaccelerator convertlocalizedaccelerator acceleratortext newaccelerator setaccelerator newaccelerator oldaccel oldtext oldtext firepropertychange oldtext sets the tool tip text for this action p fires a property change event for the code tool tip text code property if the tool tip text actually changes as a consequence p param tool tip text the tool tip text or code null code if none public void set tool tip text string tool tip text string old tool tip text this tool tip text if old tool tip text null tool tip text null old tool tip text equals tool tip text this tool tip text tool tip text fire property change tool tip text old tool tip text tool tip text tool_tip_text tooltiptext settooltiptext tooltiptext oldtooltiptext tooltiptext oldtooltiptext tooltiptext oldtooltiptext tooltiptext tooltiptext tooltiptext firepropertychange tool_tip_text oldtooltiptext tooltiptext see i action set accelerator int public void set accelerator int keycode this accelerator keycode iaction setaccelerator setaccelerator reports the outcome of the running of this action via the link i action result property param success code true code if the action succeeded and code false code if the action failed or was not completed see i action result since 3 0 public final void notify result boolean success avoid boolean value of boolean to allow compilation against jcl foundation bug 80059 fire property change result null success boolean true boolean false iaction iaction notifyresult valueof firepropertychange private static final i menu creator val drop down menu new i menu creator public void dispose do nothing imenucreator val_drop_down_menu imenucreator public menu get menu control parent do nothing return null getmenu public menu get menu menu parent do nothing return null getmenu creates a new action with no text and no image p configure the action later using the set methods p protected action do nothing creates a new action with the given text and no image calls the zero arg constructor then code set text code param text the string used as the text for the action or code null code if there is no text see set text protected action string text this set text text settext settext settext creates a new action with the given text and image calls the zero arg constructor then code set text code and code set image descriptor code param text the action s text or code null code if there is no text param image the action s image or code null code if there is no image see set text see set image descriptor protected action string text image descriptor image this text set image descriptor image settext setimagedescriptor settext setimagedescriptor imagedescriptor setimagedescriptor creates a new action with the given text and style param text the action s text or code null code if there is no text param style one of code as push button code code as check box code code as drop down menu code code as radio button code and code as unspecified code protected action string text int style this text switch style case as push button value val push btn break case as check box value val toggle btn off break case as drop down menu value val drop down menu break case as radio button value val radio btn off break as_push_button as_check_box as_drop_down_menu as_radio_button as_unspecified as_push_button val_push_btn as_check_box val_toggle_btn_off as_drop_down_menu val_drop_down_menu as_radio_button val_radio_btn_off method declared on i action public void add property change listener i property change listener listener listeners add listener iaction addpropertychangelistener ipropertychangelistener parses the given accelerator text and converts it to an accelerator key code support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml param accelerator text the accelerator text localized to the current locale return the swt key code or 0 if there is no accelerator private static int convert localized accelerator string accelerator text int accelerator 0 string tokenizer stok new string tokenizer accelerator text non nls 1 int key code 1 boolean has more tokens stok has more tokens while has more tokens string token stok next token has more tokens stok has more tokens every token except the last must be one of the modifiers ctrl shift alt or command if has more tokens int modifier find localized modifier token if modifier 0 accelerator modifier else leave if there are none return 0 else key code find localized key code token if key code 1 accelerator key code return accelerator setaccelerator acceleratortext convertlocalizedaccelerator acceleratortext stringtokenizer stringtokenizer acceleratortext keycode hasmoretokens hasmoretokens hasmoretokens nexttoken hasmoretokens hasmoretokens hasmoretokens findlocalizedmodifier keycode findlocalizedkeycode keycode keycode parses the given accelerator text and converts it to an accelerator key code param accelerator text the accelerator text return the swt key code or 0 if there is no accelerator public static int convert accelerator string accelerator text int accelerator 0 string tokenizer stok new string tokenizer accelerator text non nls 1 int key code 1 boolean has more tokens stok has more tokens while has more tokens string token stok next token has more tokens stok has more tokens every token except the last must be one of the modifiers ctrl shift alt or command if has more tokens int modifier find modifier token if modifier 0 accelerator modifier else leave if there are none return 0 else key code find key code token if key code 1 accelerator key code return accelerator acceleratortext convertaccelerator acceleratortext stringtokenizer stringtokenizer acceleratortext keycode hasmoretokens hasmoretokens hasmoretokens nexttoken hasmoretokens hasmoretokens hasmoretokens findmodifier keycode findkeycode keycode keycode converts an accelerator key code to a string representation param key code the key code to be translated return a string representation of the key code public static string convert accelerator int key code string modifier get modifier string key code string full key if modifier equals non nls 1 full key find key string key code else full key modifier find key string key code non nls 1 return full key keycode convertaccelerator keycode getmodifierstring keycode fullkey fullkey findkeystring keycode fullkey findkeystring keycode fullkey private static string get modifier string int key code string mod string non nls 1 if key code swt ctrl 0 mod string find modifier string key code swt ctrl if key code swt alt 0 if mod string equals non nls 1 mod string find modifier string key code swt alt else mod string mod string find modifier string key code swt alt non nls 1 if key code swt shift 0 if mod string equals non nls 1 mod string find modifier string key code swt shift else mod string mod string find modifier string key code swt shift non nls 1 if key code swt command 0 if mod string equals non nls 1 mod string find modifier string key code swt command else mod string mod string find modifier string key code swt command non nls 1 return mod string getmodifierstring keycode modstring keycode modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode modstring extracts the accelerator text from the given text returns code null code if there is no accelerator text and the empty string if there is no text after the accelerator delimeter tab or param text the text for the action return the accelerator text or code null code private static string extract accelerator text string text int index text last index of t if index 1 index text last index of if index 0 return text substring index 1 return null extractacceleratortext lastindexof lastindexof maps a standard keyboard key name to an swt key code key names are converted to upper case before comparison if the key name is a single letter for example s its character code is returned p the following key names are known case is ignored ul li code backspace code li li code tab code li li code return code li li code enter code li li code esc code li li code escape code li li code delete code li li code space code li li code arrow up code code arrow down code code arrow left code and code arrow right code li li code page up code and code page down code li li code home code li li code end code li li code insert code li li code f1 code code f2 code through code f12 code li ul p param token the key name return the swt key code code 1 code if no match was found see swt public static int find key code string token if key codes null init key codes token token to upper case integer i integer key codes get token if i null return i int value if token length 1 return token char at 0 return 1 arrow_up arrow_down arrow_left arrow_right page_up page_down findkeycode keycodes initkeycodes touppercase keycodes intvalue charat find the supplied code for a localized key as find key code but localized to the current locale support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml param token the localized key name return the swt key code code 1 code if no match was found see find key code private static int find localized key code string token if localized key codes null init localized key codes token token to upper case integer i integer localized key codes get token if i null return i int value if token length 1 return token char at 0 return 1 findkeycode setaccelerator findkeycode findlocalizedkeycode localizedkeycodes initlocalizedkeycodes touppercase localizedkeycodes intvalue charat maps an swt key code to a standard keyboard key name the key code is stripped of modifiers swt ctrl swt alt swt shift and swt command if the key code is not an swt code for example if it a key code for the key s a string containing a character representation of the key code is returned param key code the key code to be translated return the string representation of the key code see swt since 2 0 public static string find key string int key code if key strings null init key strings int i key code swt ctrl swt alt swt shift swt command integer integer new integer i string result string key strings get integer if result null return result result new string new char char i return result keycode findkeystring keycode keystrings initkeystrings keycode keystrings maps standard keyboard modifier key names to the corresponding swt modifier bit the following modifier key names are recognized case is ignored code ctrl code code shift code code alt code and code command code the given modifier key name is converted to upper case before comparison param token the modifier key name return the swt modifier bit or code 0 code if no match was found see swt public static int find modifier string token token token to upper case if token equals ctrl non nls 1 return swt ctrl if token equals shift non nls 1 return swt shift if token equals alt non nls 1 return swt alt if token equals command non nls 1 return swt command return 0 findmodifier touppercase maps the localized modifier names to a code in the same manner as find modifier support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml see find modifier private static int find localized modifier string token if localized ctrl null init localized modifiers token token to upper case if token equals localized ctrl non nls 1 return swt ctrl if token equals localized shift non nls 1 return swt shift if token equals localized alt non nls 1 return swt alt if token equals localized command non nls 1 return swt command return 0 findmodifier setaccelerator findmodifier findlocalizedmodifier localized_ctrl initlocalizedmodifiers touppercase localized_ctrl localized_shift localized_alt localized_command initialize the list of localized modifiers private static void init localized modifiers localized ctrl j face resources get string ctrl to upper case non nls 1 localized shift j face resources get string shift to upper case non nls 1 localized alt j face resources get string alt to upper case non nls 1 localized command j face resources get string command to upper case non nls 1 initlocalizedmodifiers localized_ctrl jfaceresources getstring touppercase localized_shift jfaceresources getstring touppercase localized_alt jfaceresources getstring touppercase localized_command jfaceresources getstring touppercase returns a string representation of an swt modifier bit swt ctrl swt alt swt shift and swt command returns code null code if the key code is not an swt modifier bit param key code the swt modifier bit to be translated return the string representation of the swt modifier bit or code null code if the key code was not an swt modifier bit see swt since 2 0 public static string find modifier string int key code if key code swt ctrl return j face resources get string ctrl non nls 1 if key code swt alt return j face resources get string alt non nls 1 if key code swt shift return j face resources get string shift non nls 1 if key code swt command return j face resources get string command non nls 1 return null keycode findmodifierstring keycode keycode jfaceresources getstring keycode jfaceresources getstring keycode jfaceresources getstring keycode jfaceresources getstring notifies any property change listeners that a property has changed only listeners registered at the time this method is called are notified this method avoids creating an event object if there are no listeners registered but calls code fire property change property change event code if there are param property name the name of the property that has changed param old value the old value of the property or code null code if none param new value the new value of the property or code null code if none see i property change listener property change protected void fire property change string property name object old value object new value if listeners is empty fire property change new property change event this property name old value new value firepropertychange propertychangeevent propertyname oldvalue newvalue ipropertychangelistener propertychange firepropertychange propertyname oldvalue newvalue isempty firepropertychange propertychangeevent propertyname oldvalue newvalue notifies any property change listeners that a property has changed only listeners registered at the time this method is called are notified param event the property change event see i property change listener property change protected void fire property change property change event event object list this listeners get listeners for int i 0 i list length i i property change listener list i property change event ipropertychangelistener propertychange firepropertychange propertychangeevent getlisteners ipropertychangelistener propertychange method declared on i action public int get accelerator return accelerator iaction getaccelerator public string get action definition id return action definition id getactiondefinitionid actiondefinitionid public string get description if description null return description return get tool tip text getdescription gettooltiptext method declared on i action public image descriptor get disabled image descriptor return disabled image iaction imagedescriptor getdisabledimagedescriptor disabledimage method declared on i action public help listener get help listener return help listener iaction helplistener gethelplistener helplistener method declared on i action public image descriptor get hover image descriptor return hover image iaction imagedescriptor gethoverimagedescriptor hoverimage method declared on i action public string get id return id iaction getid method declared on i action public image descriptor get image descriptor return image iaction imagedescriptor getimagedescriptor public i menu creator get menu creator the default drop down menu value is only used to mark this action requested style so do not return it for backward compatibility reasons if value val drop down menu return null if value instanceof i menu creator return i menu creator value return null imenucreator getmenucreator val_drop_down_menu imenucreator imenucreator public int get style infer the style from the value field if value val push btn value null return as push button if value val toggle btn on value val toggle btn off return as check box if value val radio btn on value val radio btn off return as radio button if value instanceof i menu creator return as drop down menu we should never get to this line return as push button getstyle val_push_btn as_push_button val_toggle_btn_on val_toggle_btn_off as_check_box val_radio_btn_on val_radio_btn_off as_radio_button imenucreator as_drop_down_menu as_push_button method declared on i action public string get text return text iaction gettext method declared on i action public string get tool tip text return tool tip text iaction gettooltiptext tooltiptext initializes the internal key code table private static void init key codes key codes new hash map 40 key codes put backspace new integer 8 non nls 1 key codes put tab new integer 9 non nls 1 key codes put return new integer 13 non nls 1 key codes put enter new integer 13 non nls 1 key codes put escape new integer 27 non nls 1 key codes put esc new integer 27 non nls 1 key codes put delete new integer 127 non nls 1 key codes put space new integer non nls 1 key codes put arrow up new integer swt arrow up non nls 1 key codes put arrow down new integer swt arrow down non nls 1 key codes put arrow left new integer swt arrow left non nls 1 key codes put arrow right new integer swt arrow right non nls 1 key codes put page up new integer swt page up non nls 1 key codes put page down new integer swt page down non nls 1 key codes put home new integer swt home non nls 1 key codes put end new integer swt end non nls 1 key codes put insert new integer swt insert non nls 1 key codes put f1 new integer swt f1 non nls 1 key codes put f2 new integer swt f2 non nls 1 key codes put f3 new integer swt f3 non nls 1 key codes put f4 new integer swt f4 non nls 1 key codes put f5 new integer swt f5 non nls 1 key codes put f6 new integer swt f6 non nls 1 key codes put f7 new integer swt f7 non nls 1 key codes put f8 new integer swt f8 non nls 1 key codes put f9 new integer swt f9 non nls 1 key codes put f10 new integer swt f10 non nls 1 key codes put f11 new integer swt f11 non nls 1 key codes put f12 new integer swt f12 non nls 1 initkeycodes keycodes hashmap keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes arrow_up arrow_up keycodes arrow_down arrow_down keycodes arrow_left arrow_left keycodes arrow_right arrow_right keycodes page_up page_up keycodes page_down page_down keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes initializes the localized internal key code table private static void init localized key codes localized key codes new hash map 40 localized key codes put j face resources get string backspace to upper case new integer 8 non nls 1 localized key codes put j face resources get string tab to upper case new integer 9 non nls 1 localized key codes put j face resources get string return to upper case new integer 13 non nls 1 localized key codes put j face resources get string enter to upper case new integer 13 non nls 1 localized key codes put j face resources get string escape to upper case new integer 27 non nls 1 localized key codes put j face resources get string esc to upper case new integer 27 non nls 1 localized key codes put j face resources get string delete to upper case new integer 127 non nls 1 localized key codes put j face resources get string space to upper case new integer non nls 1 localized key codes put j face resources get string arrow up to upper case new integer swt arrow up non nls 1 localized key codes put j face resources get string arrow down to upper case new integer swt arrow down non nls 1 localized key codes put j face resources get string arrow left to upper case new integer swt arrow left non nls 1 localized key codes put j face resources get string arrow right to upper case new integer swt arrow right non nls 1 localized key codes put j face resources get string page up to upper case new integer swt page up non nls 1 localized key codes put j face resources get string page down to upper case new integer swt page down non nls 1 localized key codes put j face resources get string home to upper case new integer swt home non nls 1 localized key codes put j face resources get string end to upper case new integer swt end non nls 1 localized key codes put j face resources get string insert to upper case new integer swt insert non nls 1 localized key codes put j face resources get string f1 to upper case new integer swt f1 non nls 1 localized key codes put j face resources get string f2 to upper case new integer swt f2 non nls 1 localized key codes put j face resources get string f3 to upper case new integer swt f3 non nls 1 localized key codes put j face resources get string f4 to upper case new integer swt f4 non nls 1 localized key codes put j face resources get string f5 to upper case new integer swt f5 non nls 1 localized key codes put j face resources get string f6 to upper case new integer swt f6 non nls 1 localized key codes put j face resources get string f7 to upper case new integer swt f7 non nls 1 localized key codes put j face resources get string f8 to upper case new integer swt f8 non nls 1 localized key codes put j face resources get string f9 to upper case new integer swt f9 non nls 1 localized key codes put j face resources get string f10 to upper case new integer swt f10 non nls 1 localized key codes put j face resources get string f11 to upper case new integer swt f11 non nls 1 localized key codes put j face resources get string f12 to upper case new integer swt f12 non nls 1 initlocalizedkeycodes localizedkeycodes hashmap localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring arrow_up touppercase arrow_up localizedkeycodes jfaceresources getstring arrow_down touppercase arrow_down localizedkeycodes jfaceresources getstring arrow_left touppercase arrow_left localizedkeycodes jfaceresources getstring arrow_right touppercase arrow_right localizedkeycodes jfaceresources getstring page_up touppercase page_up localizedkeycodes jfaceresources getstring page_down touppercase page_down localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase initializes the internal key string table private static void init key strings key strings new hash map 40 key strings put new integer 8 j face resources get string backspace non nls 1 key strings put new integer 9 j face resources get string tab non nls 1 key strings put new integer 13 j face resources get string return non nls 1 key strings put new integer 13 j face resources get string enter non nls 1 key strings put new integer 27 j face resources get string escape non nls 1 key strings put new integer 27 j face resources get string esc non nls 1 key strings put new integer 127 j face resources get string delete non nls 1 key strings put new integer j face resources get string space non nls 1 key strings put new integer swt arrow up j face resources get string arrow up non nls 1 key strings put new integer swt arrow down j face resources get string arrow down non nls 1 key strings put new integer swt arrow left j face resources get string arrow left non nls 1 key strings put new integer swt arrow right j face resources get string arrow right non nls 1 key strings put new integer swt page up j face resources get string page up non nls 1 key strings put new integer swt page down j face resources get string page down non nls 1 key strings put new integer swt home j face resources get string home non nls 1 key strings put new integer swt end j face resources get string end non nls 1 key strings put new integer swt insert j face resources get string insert non nls 1 key strings put new integer swt f1 j face resources get string f1 non nls 1 key strings put new integer swt f2 j face resources get string f2 non nls 1 key strings put new integer swt f3 j face resources get string f3 non nls 1 key strings put new integer swt f4 j face resources get string f4 non nls 1 key strings put new integer swt f5 j face resources get string f5 non nls 1 key strings put new integer swt f6 j face resources get string f6 non nls 1 key strings put new integer swt f7 j face resources get string f7 non nls 1 key strings put new integer swt f8 j face resources get string f8 non nls 1 key strings put new integer swt f9 j face resources get string f9 non nls 1 key strings put new integer swt f10 j face resources get string f10 non nls 1 key strings put new integer swt f11 j face resources get string f11 non nls 1 key strings put new integer swt f12 j face resources get string f12 non nls 1 initkeystrings keystrings hashmap keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings arrow_up jfaceresources getstring arrow_up keystrings arrow_down jfaceresources getstring arrow_down keystrings arrow_left jfaceresources getstring arrow_left keystrings arrow_right jfaceresources getstring arrow_right keystrings page_up jfaceresources getstring page_up keystrings page_down jfaceresources getstring page_down keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring method declared on i action public boolean is checked return value val toggle btn on value val radio btn on iaction ischecked val_toggle_btn_on val_radio_btn_on method declared on i action public boolean is enabled return enabled iaction isenabled method declared on i action public boolean is handled return true iaction ishandled convenience method for removing any optional accelerator text from the given string the accelerator text appears at the end of the text and is separated from the main part by a single tab character code t code param text the text return the text sans accelerator public static string remove accelerator text string text int index text last index of t if index 1 index text last index of if index 0 return text substring 0 index return text removeacceleratortext lastindexof lastindexof convenience method for removing any mnemonics from the given string for example code remove mnemonics open code will return code open code param text the text return the text sans mnemonics since 3 0 public static string remove mnemonics string text int index text index of if index 1 return text int len text length string buffer sb new string buffer len int last index 0 while index 1 ignore at the end if index len 1 break handle the case if text char at index 1 index dbcs languages use x format if index 0 text char at index 1 text length index 3 text char at index 2 sb append text substring last index index 1 index 3 else sb append text substring last index index skip the index last index index index text index of index if last index len sb append text substring last index len return sb to string removemnemonics removemnemonics indexof stringbuffer stringbuffer lastindex charat charat charat lastindex lastindex lastindex indexof lastindex lastindex tostring method declared on i action public void remove property change listener i property change listener listener listeners remove listener iaction removepropertychangelistener ipropertychangelistener the default implementation of this code i action code method does nothing subclasses should override this method if they do not need information from the triggering event or override code run with event event code if they do public void run do nothing iaction runwithevent the default implementation of this code i action code method ignores the event argument and simply calls code run code subclasses should override this method if they need information from the triggering event or override code run code if not param event the swt event which triggered this action being run since 2 0 public void run with event event event run iaction runwithevent method declared on i action public void set action definition id string id action definition id id iaction setactiondefinitionid actiondefinitionid public void set checked boolean checked object new value null for backward compatibility if the style is not set yet then convert it to a toggle button if value null value val toggle btn on value val toggle btn off new value checked val toggle btn on val toggle btn off else if value val radio btn on value val radio btn off new value checked val radio btn on val radio btn off else some other style already so do nothing return if new value value value new value if checked fire property change checked boolean false boolean true else fire property change checked boolean true boolean false setchecked newvalue val_toggle_btn_on val_toggle_btn_off newvalue val_toggle_btn_on val_toggle_btn_off val_radio_btn_on val_radio_btn_off newvalue val_radio_btn_on val_radio_btn_off newvalue newvalue firepropertychange firepropertychange public void set description string text if description null text null description null text null description null text null text equals description string old description description description text fire property change description old description description setdescription olddescription firepropertychange olddescription public void set disabled image descriptor image descriptor new image if disabled image new image image descriptor old image disabled image disabled image new image fire property change image old image new image setdisabledimagedescriptor imagedescriptor newimage disabledimage newimage imagedescriptor oldimage disabledimage disabledimage newimage firepropertychange oldimage newimage public void set enabled boolean enabled if enabled this enabled boolean old val this enabled boolean true boolean false boolean new val enabled boolean true boolean false this enabled enabled fire property change enabled old val new val setenabled oldval newval firepropertychange oldval newval method declared on i action public void set help listener help listener listener help listener listener iaction sethelplistener helplistener helplistener public void set hover image descriptor image descriptor new image if hover image new image image descriptor old image hover image hover image new image fire property change image old image new image sethoverimagedescriptor imagedescriptor newimage hoverimage newimage imagedescriptor oldimage hoverimage hoverimage newimage firepropertychange oldimage newimage method declared on i action public void set id string id this id id iaction setid public void set image descriptor image descriptor new image if image new image image descriptor old image image image new image fire property change image old image new image setimagedescriptor imagedescriptor newimage newimage imagedescriptor oldimage newimage firepropertychange oldimage newimage sets the menu creator for this action p note that if this method is called it overrides the check status p param creator the menu creator or code null code if none public void set menu creator i menu creator creator for backward compatibility if the style is not set yet then convert it to a drop down menu if value null value creator return if value instanceof i menu creator value creator null val drop down menu creator setmenucreator imenucreator imenucreator val_drop_down_menu sets the text for this action p fires a property change event for the code text code property if the text actually changes as a consequence p p the accelerator is identified by the last index of a tab character if there are no tab characters then it is identified by the last index of a character if neither then there is no accelerator text note that if you want to insert a character into the text but no accelerator you can simply insert a or a tab at the end of the text p param text the text or code null code if none public void set text string text string old text this text int old accel this accelerator this text text if text null string accelerator text extract accelerator text text if accelerator text null int new accelerator convert localized accelerator accelerator text be sure to not wipe out the accelerator if nothing found if new accelerator 0 set accelerator new accelerator if this accelerator old accel old text null this text null old text equals this text fire property change text old text this text settext oldtext oldaccel acceleratortext extractacceleratortext acceleratortext newaccelerator convertlocalizedaccelerator acceleratortext newaccelerator setaccelerator newaccelerator oldaccel oldtext oldtext firepropertychange oldtext sets the tool tip text for this action p fires a property change event for the code tool tip text code property if the tool tip text actually changes as a consequence p param tool tip text the tool tip text or code null code if none public void set tool tip text string tool tip text string old tool tip text this tool tip text if old tool tip text null tool tip text null old tool tip text equals tool tip text this tool tip text tool tip text fire property change tool tip text old tool tip text tool tip text tool_tip_text tooltiptext settooltiptext tooltiptext oldtooltiptext tooltiptext oldtooltiptext tooltiptext oldtooltiptext tooltiptext tooltiptext tooltiptext firepropertychange tool_tip_text oldtooltiptext tooltiptext see i action set accelerator int public void set accelerator int keycode this accelerator keycode iaction setaccelerator setaccelerator reports the outcome of the running of this action via the link i action result property param success code true code if the action succeeded and code false code if the action failed or was not completed see i action result since 3 0 public final void notify result boolean success avoid boolean value of boolean to allow compilation against jcl foundation bug 80059 fire property change result null success boolean true boolean false iaction iaction notifyresult valueof firepropertychange private static final i menu creator val drop down menu new i menu creator public void dispose do nothing imenucreator val_drop_down_menu imenucreator public menu get menu control parent do nothing return null getmenu public menu get menu menu parent do nothing return null getmenu creates a new action with no text and no image p configure the action later using the set methods p protected action do nothing creates a new action with the given text and no image calls the zero arg constructor then code set text code param text the string used as the text for the action or code null code if there is no text see set text protected action string text this set text text settext settext settext creates a new action with the given text and image calls the zero arg constructor then code set text code and code set image descriptor code param text the action s text or code null code if there is no text param image the action s image or code null code if there is no image see set text see set image descriptor protected action string text image descriptor image this text set image descriptor image settext setimagedescriptor settext setimagedescriptor imagedescriptor setimagedescriptor creates a new action with the given text and style param text the action s text or code null code if there is no text param style one of code as push button code code as check box code code as drop down menu code code as radio button code and code as unspecified code protected action string text int style this text switch style case as push button value val push btn break case as check box value val toggle btn off break case as drop down menu value val drop down menu break case as radio button value val radio btn off break as_push_button as_check_box as_drop_down_menu as_radio_button as_unspecified as_push_button val_push_btn as_check_box val_toggle_btn_off as_drop_down_menu val_drop_down_menu as_radio_button val_radio_btn_off method declared on i action public void add property change listener i property change listener listener listeners add listener iaction addpropertychangelistener ipropertychangelistener parses the given accelerator text and converts it to an accelerator key code support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml param accelerator text the accelerator text localized to the current locale return the swt key code or 0 if there is no accelerator private static int convert localized accelerator string accelerator text int accelerator 0 string tokenizer stok new string tokenizer accelerator text non nls 1 int key code 1 boolean has more tokens stok has more tokens while has more tokens string token stok next token has more tokens stok has more tokens every token except the last must be one of the modifiers ctrl shift alt or command if has more tokens int modifier find localized modifier token if modifier 0 accelerator modifier else leave if there are none return 0 else key code find localized key code token if key code 1 accelerator key code return accelerator setaccelerator acceleratortext convertlocalizedaccelerator acceleratortext stringtokenizer stringtokenizer acceleratortext keycode hasmoretokens hasmoretokens hasmoretokens nexttoken hasmoretokens hasmoretokens hasmoretokens findlocalizedmodifier keycode findlocalizedkeycode keycode keycode parses the given accelerator text and converts it to an accelerator key code param accelerator text the accelerator text return the swt key code or 0 if there is no accelerator public static int convert accelerator string accelerator text int accelerator 0 string tokenizer stok new string tokenizer accelerator text non nls 1 int key code 1 boolean has more tokens stok has more tokens while has more tokens string token stok next token has more tokens stok has more tokens every token except the last must be one of the modifiers ctrl shift alt or command if has more tokens int modifier find modifier token if modifier 0 accelerator modifier else leave if there are none return 0 else key code find key code token if key code 1 accelerator key code return accelerator acceleratortext convertaccelerator acceleratortext stringtokenizer stringtokenizer acceleratortext keycode hasmoretokens hasmoretokens hasmoretokens nexttoken hasmoretokens hasmoretokens hasmoretokens findmodifier keycode findkeycode keycode keycode converts an accelerator key code to a string representation param key code the key code to be translated return a string representation of the key code public static string convert accelerator int key code string modifier get modifier string key code string full key if modifier equals non nls 1 full key find key string key code else full key modifier find key string key code non nls 1 return full key keycode convertaccelerator keycode getmodifierstring keycode fullkey fullkey findkeystring keycode fullkey findkeystring keycode fullkey private static string get modifier string int key code string mod string non nls 1 if key code swt ctrl 0 mod string find modifier string key code swt ctrl if key code swt alt 0 if mod string equals non nls 1 mod string find modifier string key code swt alt else mod string mod string find modifier string key code swt alt non nls 1 if key code swt shift 0 if mod string equals non nls 1 mod string find modifier string key code swt shift else mod string mod string find modifier string key code swt shift non nls 1 if key code swt command 0 if mod string equals non nls 1 mod string find modifier string key code swt command else mod string mod string find modifier string key code swt command non nls 1 return mod string getmodifierstring keycode modstring keycode modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode modstring extracts the accelerator text from the given text returns code null code if there is no accelerator text and the empty string if there is no text after the accelerator delimeter tab or param text the text for the action return the accelerator text or code null code private static string extract accelerator text string text int index text last index of t if index 1 index text last index of if index 0 return text substring index 1 return null extractacceleratortext lastindexof lastindexof maps a standard keyboard key name to an swt key code key names are converted to upper case before comparison if the key name is a single letter for example s its character code is returned p the following key names are known case is ignored ul li code backspace code li li code tab code li li code return code li li code enter code li li code esc code li li code escape code li li code delete code li li code space code li li code arrow up code code arrow down code code arrow left code and code arrow right code li li code page up code and code page down code li li code home code li li code end code li li code insert code li li code f1 code code f2 code through code f12 code li ul p param token the key name return the swt key code code 1 code if no match was found see swt public static int find key code string token if key codes null init key codes token token to upper case integer i integer key codes get token if i null return i int value if token length 1 return token char at 0 return 1 arrow_up arrow_down arrow_left arrow_right page_up page_down findkeycode keycodes initkeycodes touppercase keycodes intvalue charat find the supplied code for a localized key as find key code but localized to the current locale support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml param token the localized key name return the swt key code code 1 code if no match was found see find key code private static int find localized key code string token if localized key codes null init localized key codes token token to upper case integer i integer localized key codes get token if i null return i int value if token length 1 return token char at 0 return 1 findkeycode setaccelerator findkeycode findlocalizedkeycode localizedkeycodes initlocalizedkeycodes touppercase localizedkeycodes intvalue charat maps an swt key code to a standard keyboard key name the key code is stripped of modifiers swt ctrl swt alt swt shift and swt command if the key code is not an swt code for example if it a key code for the key s a string containing a character representation of the key code is returned param key code the key code to be translated return the string representation of the key code see swt since 2 0 public static string find key string int key code if key strings null init key strings int i key code swt ctrl swt alt swt shift swt command integer integer new integer i string result string key strings get integer if result null return result result new string new char char i return result keycode findkeystring keycode keystrings initkeystrings keycode keystrings maps standard keyboard modifier key names to the corresponding swt modifier bit the following modifier key names are recognized case is ignored code ctrl code code shift code code alt code and code command code the given modifier key name is converted to upper case before comparison param token the modifier key name return the swt modifier bit or code 0 code if no match was found see swt public static int find modifier string token token token to upper case if token equals ctrl non nls 1 return swt ctrl if token equals shift non nls 1 return swt shift if token equals alt non nls 1 return swt alt if token equals command non nls 1 return swt command return 0 findmodifier touppercase maps the localized modifier names to a code in the same manner as find modifier support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml see find modifier private static int find localized modifier string token if localized ctrl null init localized modifiers token token to upper case if token equals localized ctrl non nls 1 return swt ctrl if token equals localized shift non nls 1 return swt shift if token equals localized alt non nls 1 return swt alt if token equals localized command non nls 1 return swt command return 0 findmodifier setaccelerator findmodifier findlocalizedmodifier localized_ctrl initlocalizedmodifiers touppercase localized_ctrl localized_shift localized_alt localized_command initialize the list of localized modifiers private static void init localized modifiers localized ctrl j face resources get string ctrl to upper case non nls 1 localized shift j face resources get string shift to upper case non nls 1 localized alt j face resources get string alt to upper case non nls 1 localized command j face resources get string command to upper case non nls 1 initlocalizedmodifiers localized_ctrl jfaceresources getstring touppercase localized_shift jfaceresources getstring touppercase localized_alt jfaceresources getstring touppercase localized_command jfaceresources getstring touppercase returns a string representation of an swt modifier bit swt ctrl swt alt swt shift and swt command returns code null code if the key code is not an swt modifier bit param key code the swt modifier bit to be translated return the string representation of the swt modifier bit or code null code if the key code was not an swt modifier bit see swt since 2 0 public static string find modifier string int key code if key code swt ctrl return j face resources get string ctrl non nls 1 if key code swt alt return j face resources get string alt non nls 1 if key code swt shift return j face resources get string shift non nls 1 if key code swt command return j face resources get string command non nls 1 return null keycode findmodifierstring keycode keycode jfaceresources getstring keycode jfaceresources getstring keycode jfaceresources getstring keycode jfaceresources getstring notifies any property change listeners that a property has changed only listeners registered at the time this method is called are notified this method avoids creating an event object if there are no listeners registered but calls code fire property change property change event code if there are param property name the name of the property that has changed param old value the old value of the property or code null code if none param new value the new value of the property or code null code if none see i property change listener property change protected void fire property change string property name object old value object new value if listeners is empty fire property change new property change event this property name old value new value firepropertychange propertychangeevent propertyname oldvalue newvalue ipropertychangelistener propertychange firepropertychange propertyname oldvalue newvalue isempty firepropertychange propertychangeevent propertyname oldvalue newvalue notifies any property change listeners that a property has changed only listeners registered at the time this method is called are notified param event the property change event see i property change listener property change protected void fire property change property change event event object list this listeners get listeners for int i 0 i list length i i property change listener list i property change event ipropertychangelistener propertychange firepropertychange propertychangeevent getlisteners ipropertychangelistener propertychange method declared on i action public int get accelerator return accelerator iaction getaccelerator public string get action definition id return action definition id getactiondefinitionid actiondefinitionid public string get description if description null return description return get tool tip text getdescription gettooltiptext method declared on i action public image descriptor get disabled image descriptor return disabled image iaction imagedescriptor getdisabledimagedescriptor disabledimage method declared on i action public help listener get help listener return help listener iaction helplistener gethelplistener helplistener method declared on i action public image descriptor get hover image descriptor return hover image iaction imagedescriptor gethoverimagedescriptor hoverimage method declared on i action public string get id return id iaction getid method declared on i action public image descriptor get image descriptor return image iaction imagedescriptor getimagedescriptor public i menu creator get menu creator the default drop down menu value is only used to mark this action requested style so do not return it for backward compatibility reasons if value val drop down menu return null if value instanceof i menu creator return i menu creator value return null imenucreator getmenucreator val_drop_down_menu imenucreator imenucreator public int get style infer the style from the value field if value val push btn value null return as push button if value val toggle btn on value val toggle btn off return as check box if value val radio btn on value val radio btn off return as radio button if value instanceof i menu creator return as drop down menu we should never get to this line return as push button getstyle val_push_btn as_push_button val_toggle_btn_on val_toggle_btn_off as_check_box val_radio_btn_on val_radio_btn_off as_radio_button imenucreator as_drop_down_menu as_push_button method declared on i action public string get text return text iaction gettext method declared on i action public string get tool tip text return tool tip text iaction gettooltiptext tooltiptext initializes the internal key code table private static void init key codes key codes new hash map 40 key codes put backspace new integer 8 non nls 1 key codes put tab new integer 9 non nls 1 key codes put return new integer 13 non nls 1 key codes put enter new integer 13 non nls 1 key codes put escape new integer 27 non nls 1 key codes put esc new integer 27 non nls 1 key codes put delete new integer 127 non nls 1 key codes put space new integer non nls 1 key codes put arrow up new integer swt arrow up non nls 1 key codes put arrow down new integer swt arrow down non nls 1 key codes put arrow left new integer swt arrow left non nls 1 key codes put arrow right new integer swt arrow right non nls 1 key codes put page up new integer swt page up non nls 1 key codes put page down new integer swt page down non nls 1 key codes put home new integer swt home non nls 1 key codes put end new integer swt end non nls 1 key codes put insert new integer swt insert non nls 1 key codes put f1 new integer swt f1 non nls 1 key codes put f2 new integer swt f2 non nls 1 key codes put f3 new integer swt f3 non nls 1 key codes put f4 new integer swt f4 non nls 1 key codes put f5 new integer swt f5 non nls 1 key codes put f6 new integer swt f6 non nls 1 key codes put f7 new integer swt f7 non nls 1 key codes put f8 new integer swt f8 non nls 1 key codes put f9 new integer swt f9 non nls 1 key codes put f10 new integer swt f10 non nls 1 key codes put f11 new integer swt f11 non nls 1 key codes put f12 new integer swt f12 non nls 1 initkeycodes keycodes hashmap keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes arrow_up arrow_up keycodes arrow_down arrow_down keycodes arrow_left arrow_left keycodes arrow_right arrow_right keycodes page_up page_up keycodes page_down page_down keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes initializes the localized internal key code table private static void init localized key codes localized key codes new hash map 40 localized key codes put j face resources get string backspace to upper case new integer 8 non nls 1 localized key codes put j face resources get string tab to upper case new integer 9 non nls 1 localized key codes put j face resources get string return to upper case new integer 13 non nls 1 localized key codes put j face resources get string enter to upper case new integer 13 non nls 1 localized key codes put j face resources get string escape to upper case new integer 27 non nls 1 localized key codes put j face resources get string esc to upper case new integer 27 non nls 1 localized key codes put j face resources get string delete to upper case new integer 127 non nls 1 localized key codes put j face resources get string space to upper case new integer non nls 1 localized key codes put j face resources get string arrow up to upper case new integer swt arrow up non nls 1 localized key codes put j face resources get string arrow down to upper case new integer swt arrow down non nls 1 localized key codes put j face resources get string arrow left to upper case new integer swt arrow left non nls 1 localized key codes put j face resources get string arrow right to upper case new integer swt arrow right non nls 1 localized key codes put j face resources get string page up to upper case new integer swt page up non nls 1 localized key codes put j face resources get string page down to upper case new integer swt page down non nls 1 localized key codes put j face resources get string home to upper case new integer swt home non nls 1 localized key codes put j face resources get string end to upper case new integer swt end non nls 1 localized key codes put j face resources get string insert to upper case new integer swt insert non nls 1 localized key codes put j face resources get string f1 to upper case new integer swt f1 non nls 1 localized key codes put j face resources get string f2 to upper case new integer swt f2 non nls 1 localized key codes put j face resources get string f3 to upper case new integer swt f3 non nls 1 localized key codes put j face resources get string f4 to upper case new integer swt f4 non nls 1 localized key codes put j face resources get string f5 to upper case new integer swt f5 non nls 1 localized key codes put j face resources get string f6 to upper case new integer swt f6 non nls 1 localized key codes put j face resources get string f7 to upper case new integer swt f7 non nls 1 localized key codes put j face resources get string f8 to upper case new integer swt f8 non nls 1 localized key codes put j face resources get string f9 to upper case new integer swt f9 non nls 1 localized key codes put j face resources get string f10 to upper case new integer swt f10 non nls 1 localized key codes put j face resources get string f11 to upper case new integer swt f11 non nls 1 localized key codes put j face resources get string f12 to upper case new integer swt f12 non nls 1 initlocalizedkeycodes localizedkeycodes hashmap localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring arrow_up touppercase arrow_up localizedkeycodes jfaceresources getstring arrow_down touppercase arrow_down localizedkeycodes jfaceresources getstring arrow_left touppercase arrow_left localizedkeycodes jfaceresources getstring arrow_right touppercase arrow_right localizedkeycodes jfaceresources getstring page_up touppercase page_up localizedkeycodes jfaceresources getstring page_down touppercase page_down localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase initializes the internal key string table private static void init key strings key strings new hash map 40 key strings put new integer 8 j face resources get string backspace non nls 1 key strings put new integer 9 j face resources get string tab non nls 1 key strings put new integer 13 j face resources get string return non nls 1 key strings put new integer 13 j face resources get string enter non nls 1 key strings put new integer 27 j face resources get string escape non nls 1 key strings put new integer 27 j face resources get string esc non nls 1 key strings put new integer 127 j face resources get string delete non nls 1 key strings put new integer j face resources get string space non nls 1 key strings put new integer swt arrow up j face resources get string arrow up non nls 1 key strings put new integer swt arrow down j face resources get string arrow down non nls 1 key strings put new integer swt arrow left j face resources get string arrow left non nls 1 key strings put new integer swt arrow right j face resources get string arrow right non nls 1 key strings put new integer swt page up j face resources get string page up non nls 1 key strings put new integer swt page down j face resources get string page down non nls 1 key strings put new integer swt home j face resources get string home non nls 1 key strings put new integer swt end j face resources get string end non nls 1 key strings put new integer swt insert j face resources get string insert non nls 1 key strings put new integer swt f1 j face resources get string f1 non nls 1 key strings put new integer swt f2 j face resources get string f2 non nls 1 key strings put new integer swt f3 j face resources get string f3 non nls 1 key strings put new integer swt f4 j face resources get string f4 non nls 1 key strings put new integer swt f5 j face resources get string f5 non nls 1 key strings put new integer swt f6 j face resources get string f6 non nls 1 key strings put new integer swt f7 j face resources get string f7 non nls 1 key strings put new integer swt f8 j face resources get string f8 non nls 1 key strings put new integer swt f9 j face resources get string f9 non nls 1 key strings put new integer swt f10 j face resources get string f10 non nls 1 key strings put new integer swt f11 j face resources get string f11 non nls 1 key strings put new integer swt f12 j face resources get string f12 non nls 1 initkeystrings keystrings hashmap keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings arrow_up jfaceresources getstring arrow_up keystrings arrow_down jfaceresources getstring arrow_down keystrings arrow_left jfaceresources getstring arrow_left keystrings arrow_right jfaceresources getstring arrow_right keystrings page_up jfaceresources getstring page_up keystrings page_down jfaceresources getstring page_down keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring method declared on i action public boolean is checked return value val toggle btn on value val radio btn on iaction ischecked val_toggle_btn_on val_radio_btn_on method declared on i action public boolean is enabled return enabled iaction isenabled method declared on i action public boolean is handled return true iaction ishandled convenience method for removing any optional accelerator text from the given string the accelerator text appears at the end of the text and is separated from the main part by a single tab character code t code param text the text return the text sans accelerator public static string remove accelerator text string text int index text last index of t if index 1 index text last index of if index 0 return text substring 0 index return text removeacceleratortext lastindexof lastindexof convenience method for removing any mnemonics from the given string for example code remove mnemonics open code will return code open code param text the text return the text sans mnemonics since 3 0 public static string remove mnemonics string text int index text index of if index 1 return text int len text length string buffer sb new string buffer len int last index 0 while index 1 ignore at the end if index len 1 break handle the case if text char at index 1 index dbcs languages use x format if index 0 text char at index 1 text length index 3 text char at index 2 sb append text substring last index index 1 index 3 else sb append text substring last index index skip the index last index index index text index of index if last index len sb append text substring last index len return sb to string removemnemonics removemnemonics indexof stringbuffer stringbuffer lastindex charat charat charat lastindex lastindex lastindex indexof lastindex lastindex tostring method declared on i action public void remove property change listener i property change listener listener listeners remove listener iaction removepropertychangelistener ipropertychangelistener the default implementation of this code i action code method does nothing subclasses should override this method if they do not need information from the triggering event or override code run with event event code if they do public void run do nothing iaction runwithevent the default implementation of this code i action code method ignores the event argument and simply calls code run code subclasses should override this method if they need information from the triggering event or override code run code if not param event the swt event which triggered this action being run since 2 0 public void run with event event event run iaction runwithevent method declared on i action public void set action definition id string id action definition id id iaction setactiondefinitionid actiondefinitionid public void set checked boolean checked object new value null for backward compatibility if the style is not set yet then convert it to a toggle button if value null value val toggle btn on value val toggle btn off new value checked val toggle btn on val toggle btn off else if value val radio btn on value val radio btn off new value checked val radio btn on val radio btn off else some other style already so do nothing return if new value value value new value if checked fire property change checked boolean false boolean true else fire property change checked boolean true boolean false setchecked newvalue val_toggle_btn_on val_toggle_btn_off newvalue val_toggle_btn_on val_toggle_btn_off val_radio_btn_on val_radio_btn_off newvalue val_radio_btn_on val_radio_btn_off newvalue newvalue firepropertychange firepropertychange public void set description string text if description null text null description null text null description null text null text equals description string old description description description text fire property change description old description description setdescription olddescription firepropertychange olddescription public void set disabled image descriptor image descriptor new image if disabled image new image image descriptor old image disabled image disabled image new image fire property change image old image new image setdisabledimagedescriptor imagedescriptor newimage disabledimage newimage imagedescriptor oldimage disabledimage disabledimage newimage firepropertychange oldimage newimage public void set enabled boolean enabled if enabled this enabled boolean old val this enabled boolean true boolean false boolean new val enabled boolean true boolean false this enabled enabled fire property change enabled old val new val setenabled oldval newval firepropertychange oldval newval method declared on i action public void set help listener help listener listener help listener listener iaction sethelplistener helplistener helplistener public void set hover image descriptor image descriptor new image if hover image new image image descriptor old image hover image hover image new image fire property change image old image new image sethoverimagedescriptor imagedescriptor newimage hoverimage newimage imagedescriptor oldimage hoverimage hoverimage newimage firepropertychange oldimage newimage method declared on i action public void set id string id this id id iaction setid public void set image descriptor image descriptor new image if image new image image descriptor old image image image new image fire property change image old image new image setimagedescriptor imagedescriptor newimage newimage imagedescriptor oldimage newimage firepropertychange oldimage newimage sets the menu creator for this action p note that if this method is called it overrides the check status p param creator the menu creator or code null code if none public void set menu creator i menu creator creator for backward compatibility if the style is not set yet then convert it to a drop down menu if value null value creator return if value instanceof i menu creator value creator null val drop down menu creator setmenucreator imenucreator imenucreator val_drop_down_menu sets the text for this action p fires a property change event for the code text code property if the text actually changes as a consequence p p the accelerator is identified by the last index of a tab character if there are no tab characters then it is identified by the last index of a character if neither then there is no accelerator text note that if you want to insert a character into the text but no accelerator you can simply insert a or a tab at the end of the text p param text the text or code null code if none public void set text string text string old text this text int old accel this accelerator this text text if text null string accelerator text extract accelerator text text if accelerator text null int new accelerator convert localized accelerator accelerator text be sure to not wipe out the accelerator if nothing found if new accelerator 0 set accelerator new accelerator if this accelerator old accel old text null this text null old text equals this text fire property change text old text this text settext oldtext oldaccel acceleratortext extractacceleratortext acceleratortext newaccelerator convertlocalizedaccelerator acceleratortext newaccelerator setaccelerator newaccelerator oldaccel oldtext oldtext firepropertychange oldtext sets the tool tip text for this action p fires a property change event for the code tool tip text code property if the tool tip text actually changes as a consequence p param tool tip text the tool tip text or code null code if none public void set tool tip text string tool tip text string old tool tip text this tool tip text if old tool tip text null tool tip text null old tool tip text equals tool tip text this tool tip text tool tip text fire property change tool tip text old tool tip text tool tip text tool_tip_text tooltiptext settooltiptext tooltiptext oldtooltiptext tooltiptext oldtooltiptext tooltiptext oldtooltiptext tooltiptext tooltiptext tooltiptext firepropertychange tool_tip_text oldtooltiptext tooltiptext see i action set accelerator int public void set accelerator int keycode this accelerator keycode iaction setaccelerator setaccelerator reports the outcome of the running of this action via the link i action result property param success code true code if the action succeeded and code false code if the action failed or was not completed see i action result since 3 0 public final void notify result boolean success avoid boolean value of boolean to allow compilation against jcl foundation bug 80059 fire property change result null success boolean true boolean false iaction iaction notifyresult valueof firepropertychange private static final i menu creator val drop down menu new i menu creator public void dispose do nothing imenucreator val_drop_down_menu imenucreator public menu get menu control parent do nothing return null getmenu public menu get menu menu parent do nothing return null getmenu creates a new action with no text and no image p configure the action later using the set methods p protected action do nothing creates a new action with the given text and no image calls the zero arg constructor then code set text code param text the string used as the text for the action or code null code if there is no text see set text protected action string text this set text text settext settext settext creates a new action with the given text and image calls the zero arg constructor then code set text code and code set image descriptor code param text the action s text or code null code if there is no text param image the action s image or code null code if there is no image see set text see set image descriptor protected action string text image descriptor image this text set image descriptor image settext setimagedescriptor settext setimagedescriptor imagedescriptor setimagedescriptor creates a new action with the given text and style param text the action s text or code null code if there is no text param style one of code as push button code code as check box code code as drop down menu code code as radio button code and code as unspecified code protected action string text int style this text switch style case as push button value val push btn break case as check box value val toggle btn off break case as drop down menu value val drop down menu break case as radio button value val radio btn off break as_push_button as_check_box as_drop_down_menu as_radio_button as_unspecified as_push_button val_push_btn as_check_box val_toggle_btn_off as_drop_down_menu val_drop_down_menu as_radio_button val_radio_btn_off method declared on i action public void add property change listener i property change listener listener listeners add listener iaction addpropertychangelistener ipropertychangelistener parses the given accelerator text and converts it to an accelerator key code support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml param accelerator text the accelerator text localized to the current locale return the swt key code or 0 if there is no accelerator private static int convert localized accelerator string accelerator text int accelerator 0 string tokenizer stok new string tokenizer accelerator text non nls 1 int key code 1 boolean has more tokens stok has more tokens while has more tokens string token stok next token has more tokens stok has more tokens every token except the last must be one of the modifiers ctrl shift alt or command if has more tokens int modifier find localized modifier token if modifier 0 accelerator modifier else leave if there are none return 0 else key code find localized key code token if key code 1 accelerator key code return accelerator setaccelerator acceleratortext convertlocalizedaccelerator acceleratortext stringtokenizer stringtokenizer acceleratortext keycode hasmoretokens hasmoretokens hasmoretokens nexttoken hasmoretokens hasmoretokens hasmoretokens findlocalizedmodifier keycode findlocalizedkeycode keycode keycode parses the given accelerator text and converts it to an accelerator key code param accelerator text the accelerator text return the swt key code or 0 if there is no accelerator public static int convert accelerator string accelerator text int accelerator 0 string tokenizer stok new string tokenizer accelerator text non nls 1 int key code 1 boolean has more tokens stok has more tokens while has more tokens string token stok next token has more tokens stok has more tokens every token except the last must be one of the modifiers ctrl shift alt or command if has more tokens int modifier find modifier token if modifier 0 accelerator modifier else leave if there are none return 0 else key code find key code token if key code 1 accelerator key code return accelerator acceleratortext convertaccelerator acceleratortext stringtokenizer stringtokenizer acceleratortext keycode hasmoretokens hasmoretokens hasmoretokens nexttoken hasmoretokens hasmoretokens hasmoretokens findmodifier keycode findkeycode keycode keycode converts an accelerator key code to a string representation param key code the key code to be translated return a string representation of the key code public static string convert accelerator int key code string modifier get modifier string key code string full key if modifier equals non nls 1 full key find key string key code else full key modifier find key string key code non nls 1 return full key keycode convertaccelerator keycode getmodifierstring keycode fullkey fullkey findkeystring keycode fullkey findkeystring keycode fullkey private static string get modifier string int key code string mod string non nls 1 if key code swt ctrl 0 mod string find modifier string key code swt ctrl if key code swt alt 0 if mod string equals non nls 1 mod string find modifier string key code swt alt else mod string mod string find modifier string key code swt alt non nls 1 if key code swt shift 0 if mod string equals non nls 1 mod string find modifier string key code swt shift else mod string mod string find modifier string key code swt shift non nls 1 if key code swt command 0 if mod string equals non nls 1 mod string find modifier string key code swt command else mod string mod string find modifier string key code swt command non nls 1 return mod string getmodifierstring keycode modstring keycode modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode keycode modstring modstring findmodifierstring keycode modstring modstring findmodifierstring keycode modstring extracts the accelerator text from the given text returns code null code if there is no accelerator text and the empty string if there is no text after the accelerator delimeter tab or param text the text for the action return the accelerator text or code null code private static string extract accelerator text string text int index text last index of t if index 1 index text last index of if index 0 return text substring index 1 return null extractacceleratortext lastindexof lastindexof maps a standard keyboard key name to an swt key code key names are converted to upper case before comparison if the key name is a single letter for example s its character code is returned p the following key names are known case is ignored ul li code backspace code li li code tab code li li code return code li li code enter code li li code esc code li li code escape code li li code delete code li li code space code li li code arrow up code code arrow down code code arrow left code and code arrow right code li li code page up code and code page down code li li code home code li li code end code li li code insert code li li code f1 code code f2 code through code f12 code li ul p param token the key name return the swt key code code 1 code if no match was found see swt public static int find key code string token if key codes null init key codes token token to upper case integer i integer key codes get token if i null return i int value if token length 1 return token char at 0 return 1 arrow_up arrow_down arrow_left arrow_right page_up page_down findkeycode keycodes initkeycodes touppercase keycodes intvalue charat find the supplied code for a localized key as find key code but localized to the current locale support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml param token the localized key name return the swt key code code 1 code if no match was found see find key code private static int find localized key code string token if localized key codes null init localized key codes token token to upper case integer i integer localized key codes get token if i null return i int value if token length 1 return token char at 0 return 1 findkeycode setaccelerator findkeycode findlocalizedkeycode localizedkeycodes initlocalizedkeycodes touppercase localizedkeycodes intvalue charat maps an swt key code to a standard keyboard key name the key code is stripped of modifiers swt ctrl swt alt swt shift and swt command if the key code is not an swt code for example if it a key code for the key s a string containing a character representation of the key code is returned param key code the key code to be translated return the string representation of the key code see swt since 2 0 public static string find key string int key code if key strings null init key strings int i key code swt ctrl swt alt swt shift swt command integer integer new integer i string result string key strings get integer if result null return result result new string new char char i return result keycode findkeystring keycode keystrings initkeystrings keycode keystrings maps standard keyboard modifier key names to the corresponding swt modifier bit the following modifier key names are recognized case is ignored code ctrl code code shift code code alt code and code command code the given modifier key name is converted to upper case before comparison param token the modifier key name return the swt modifier bit or code 0 code if no match was found see swt public static int find modifier string token token token to upper case if token equals ctrl non nls 1 return swt ctrl if token equals shift non nls 1 return swt shift if token equals alt non nls 1 return swt alt if token equals command non nls 1 return swt command return 0 findmodifier touppercase maps the localized modifier names to a code in the same manner as find modifier support for localized modifiers is for backwards compatibility with 1 0 use set accelerator int to set accelerators programatically or the code accelerator code tag in action definitions in plugin xml see find modifier private static int find localized modifier string token if localized ctrl null init localized modifiers token token to upper case if token equals localized ctrl non nls 1 return swt ctrl if token equals localized shift non nls 1 return swt shift if token equals localized alt non nls 1 return swt alt if token equals localized command non nls 1 return swt command return 0 findmodifier setaccelerator findmodifier findlocalizedmodifier localized_ctrl initlocalizedmodifiers touppercase localized_ctrl localized_shift localized_alt localized_command initialize the list of localized modifiers private static void init localized modifiers localized ctrl j face resources get string ctrl to upper case non nls 1 localized shift j face resources get string shift to upper case non nls 1 localized alt j face resources get string alt to upper case non nls 1 localized command j face resources get string command to upper case non nls 1 initlocalizedmodifiers localized_ctrl jfaceresources getstring touppercase localized_shift jfaceresources getstring touppercase localized_alt jfaceresources getstring touppercase localized_command jfaceresources getstring touppercase returns a string representation of an swt modifier bit swt ctrl swt alt swt shift and swt command returns code null code if the key code is not an swt modifier bit param key code the swt modifier bit to be translated return the string representation of the swt modifier bit or code null code if the key code was not an swt modifier bit see swt since 2 0 public static string find modifier string int key code if key code swt ctrl return j face resources get string ctrl non nls 1 if key code swt alt return j face resources get string alt non nls 1 if key code swt shift return j face resources get string shift non nls 1 if key code swt command return j face resources get string command non nls 1 return null keycode findmodifierstring keycode keycode jfaceresources getstring keycode jfaceresources getstring keycode jfaceresources getstring keycode jfaceresources getstring notifies any property change listeners that a property has changed only listeners registered at the time this method is called are notified this method avoids creating an event object if there are no listeners registered but calls code fire property change property change event code if there are param property name the name of the property that has changed param old value the old value of the property or code null code if none param new value the new value of the property or code null code if none see i property change listener property change protected void fire property change string property name object old value object new value if listeners is empty fire property change new property change event this property name old value new value firepropertychange propertychangeevent propertyname oldvalue newvalue ipropertychangelistener propertychange firepropertychange propertyname oldvalue newvalue isempty firepropertychange propertychangeevent propertyname oldvalue newvalue notifies any property change listeners that a property has changed only listeners registered at the time this method is called are notified param event the property change event see i property change listener property change protected void fire property change property change event event object list this listeners get listeners for int i 0 i list length i i property change listener list i property change event ipropertychangelistener propertychange firepropertychange propertychangeevent getlisteners ipropertychangelistener propertychange method declared on i action public int get accelerator return accelerator iaction getaccelerator public string get action definition id return action definition id getactiondefinitionid actiondefinitionid public string get description if description null return description return get tool tip text getdescription gettooltiptext method declared on i action public image descriptor get disabled image descriptor return disabled image iaction imagedescriptor getdisabledimagedescriptor disabledimage method declared on i action public help listener get help listener return help listener iaction helplistener gethelplistener helplistener method declared on i action public image descriptor get hover image descriptor return hover image iaction imagedescriptor gethoverimagedescriptor hoverimage method declared on i action public string get id return id iaction getid method declared on i action public image descriptor get image descriptor return image iaction imagedescriptor getimagedescriptor public i menu creator get menu creator the default drop down menu value is only used to mark this action requested style so do not return it for backward compatibility reasons if value val drop down menu return null if value instanceof i menu creator return i menu creator value return null imenucreator getmenucreator val_drop_down_menu imenucreator imenucreator public int get style infer the style from the value field if value val push btn value null return as push button if value val toggle btn on value val toggle btn off return as check box if value val radio btn on value val radio btn off return as radio button if value instanceof i menu creator return as drop down menu we should never get to this line return as push button getstyle val_push_btn as_push_button val_toggle_btn_on val_toggle_btn_off as_check_box val_radio_btn_on val_radio_btn_off as_radio_button imenucreator as_drop_down_menu as_push_button method declared on i action public string get text return text iaction gettext method declared on i action public string get tool tip text return tool tip text iaction gettooltiptext tooltiptext initializes the internal key code table private static void init key codes key codes new hash map 40 key codes put backspace new integer 8 non nls 1 key codes put tab new integer 9 non nls 1 key codes put return new integer 13 non nls 1 key codes put enter new integer 13 non nls 1 key codes put escape new integer 27 non nls 1 key codes put esc new integer 27 non nls 1 key codes put delete new integer 127 non nls 1 key codes put space new integer non nls 1 key codes put arrow up new integer swt arrow up non nls 1 key codes put arrow down new integer swt arrow down non nls 1 key codes put arrow left new integer swt arrow left non nls 1 key codes put arrow right new integer swt arrow right non nls 1 key codes put page up new integer swt page up non nls 1 key codes put page down new integer swt page down non nls 1 key codes put home new integer swt home non nls 1 key codes put end new integer swt end non nls 1 key codes put insert new integer swt insert non nls 1 key codes put f1 new integer swt f1 non nls 1 key codes put f2 new integer swt f2 non nls 1 key codes put f3 new integer swt f3 non nls 1 key codes put f4 new integer swt f4 non nls 1 key codes put f5 new integer swt f5 non nls 1 key codes put f6 new integer swt f6 non nls 1 key codes put f7 new integer swt f7 non nls 1 key codes put f8 new integer swt f8 non nls 1 key codes put f9 new integer swt f9 non nls 1 key codes put f10 new integer swt f10 non nls 1 key codes put f11 new integer swt f11 non nls 1 key codes put f12 new integer swt f12 non nls 1 initkeycodes keycodes hashmap keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes arrow_up arrow_up keycodes arrow_down arrow_down keycodes arrow_left arrow_left keycodes arrow_right arrow_right keycodes page_up page_up keycodes page_down page_down keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes keycodes initializes the localized internal key code table private static void init localized key codes localized key codes new hash map 40 localized key codes put j face resources get string backspace to upper case new integer 8 non nls 1 localized key codes put j face resources get string tab to upper case new integer 9 non nls 1 localized key codes put j face resources get string return to upper case new integer 13 non nls 1 localized key codes put j face resources get string enter to upper case new integer 13 non nls 1 localized key codes put j face resources get string escape to upper case new integer 27 non nls 1 localized key codes put j face resources get string esc to upper case new integer 27 non nls 1 localized key codes put j face resources get string delete to upper case new integer 127 non nls 1 localized key codes put j face resources get string space to upper case new integer non nls 1 localized key codes put j face resources get string arrow up to upper case new integer swt arrow up non nls 1 localized key codes put j face resources get string arrow down to upper case new integer swt arrow down non nls 1 localized key codes put j face resources get string arrow left to upper case new integer swt arrow left non nls 1 localized key codes put j face resources get string arrow right to upper case new integer swt arrow right non nls 1 localized key codes put j face resources get string page up to upper case new integer swt page up non nls 1 localized key codes put j face resources get string page down to upper case new integer swt page down non nls 1 localized key codes put j face resources get string home to upper case new integer swt home non nls 1 localized key codes put j face resources get string end to upper case new integer swt end non nls 1 localized key codes put j face resources get string insert to upper case new integer swt insert non nls 1 localized key codes put j face resources get string f1 to upper case new integer swt f1 non nls 1 localized key codes put j face resources get string f2 to upper case new integer swt f2 non nls 1 localized key codes put j face resources get string f3 to upper case new integer swt f3 non nls 1 localized key codes put j face resources get string f4 to upper case new integer swt f4 non nls 1 localized key codes put j face resources get string f5 to upper case new integer swt f5 non nls 1 localized key codes put j face resources get string f6 to upper case new integer swt f6 non nls 1 localized key codes put j face resources get string f7 to upper case new integer swt f7 non nls 1 localized key codes put j face resources get string f8 to upper case new integer swt f8 non nls 1 localized key codes put j face resources get string f9 to upper case new integer swt f9 non nls 1 localized key codes put j face resources get string f10 to upper case new integer swt f10 non nls 1 localized key codes put j face resources get string f11 to upper case new integer swt f11 non nls 1 localized key codes put j face resources get string f12 to upper case new integer swt f12 non nls 1 initlocalizedkeycodes localizedkeycodes hashmap localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring arrow_up touppercase arrow_up localizedkeycodes jfaceresources getstring arrow_down touppercase arrow_down localizedkeycodes jfaceresources getstring arrow_left touppercase arrow_left localizedkeycodes jfaceresources getstring arrow_right touppercase arrow_right localizedkeycodes jfaceresources getstring page_up touppercase page_up localizedkeycodes jfaceresources getstring page_down touppercase page_down localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase localizedkeycodes jfaceresources getstring touppercase initializes the internal key string table private static void init key strings key strings new hash map 40 key strings put new integer 8 j face resources get string backspace non nls 1 key strings put new integer 9 j face resources get string tab non nls 1 key strings put new integer 13 j face resources get string return non nls 1 key strings put new integer 13 j face resources get string enter non nls 1 key strings put new integer 27 j face resources get string escape non nls 1 key strings put new integer 27 j face resources get string esc non nls 1 key strings put new integer 127 j face resources get string delete non nls 1 key strings put new integer j face resources get string space non nls 1 key strings put new integer swt arrow up j face resources get string arrow up non nls 1 key strings put new integer swt arrow down j face resources get string arrow down non nls 1 key strings put new integer swt arrow left j face resources get string arrow left non nls 1 key strings put new integer swt arrow right j face resources get string arrow right non nls 1 key strings put new integer swt page up j face resources get string page up non nls 1 key strings put new integer swt page down j face resources get string page down non nls 1 key strings put new integer swt home j face resources get string home non nls 1 key strings put new integer swt end j face resources get string end non nls 1 key strings put new integer swt insert j face resources get string insert non nls 1 key strings put new integer swt f1 j face resources get string f1 non nls 1 key strings put new integer swt f2 j face resources get string f2 non nls 1 key strings put new integer swt f3 j face resources get string f3 non nls 1 key strings put new integer swt f4 j face resources get string f4 non nls 1 key strings put new integer swt f5 j face resources get string f5 non nls 1 key strings put new integer swt f6 j face resources get string f6 non nls 1 key strings put new integer swt f7 j face resources get string f7 non nls 1 key strings put new integer swt f8 j face resources get string f8 non nls 1 key strings put new integer swt f9 j face resources get string f9 non nls 1 key strings put new integer swt f10 j face resources get string f10 non nls 1 key strings put new integer swt f11 j face resources get string f11 non nls 1 key strings put new integer swt f12 j face resources get string f12 non nls 1 initkeystrings keystrings hashmap keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings arrow_up jfaceresources getstring arrow_up keystrings arrow_down jfaceresources getstring arrow_down keystrings arrow_left jfaceresources getstring arrow_left keystrings arrow_right jfaceresources getstring arrow_right keystrings page_up jfaceresources getstring page_up keystrings page_down jfaceresources getstring page_down keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring keystrings jfaceresources getstring method declared on i action public boolean is checked return value val toggle btn on value val radio btn on iaction ischecked val_toggle_btn_on val_radio_btn_on method declared on i action public boolean is enabled return enabled iaction isenabled method declared on i action public boolean is handled return true iaction ishandled convenience method for removing any optional accelerator text from the given string the accelerator text appears at the end of the text and is separated from the main part by a single tab character code t code param text the text return the text sans accelerator public static string remove accelerator text string text int index text last index of t if index 1 index text last index of if index 0 return text substring 0 index return text removeacceleratortext lastindexof lastindexof convenience method for removing any mnemonics from the given string for example code remove mnemonics open code will return code open code param text the text return the text sans mnemonics since 3 0 public static string remove mnemonics string text int index text index of if index 1 return text int len text length string buffer sb new string buffer len int last index 0 while index 1 ignore at the end if index len 1 break handle the case if text char at index 1 index dbcs languages use x format if index 0 text char at index 1 text length index 3 text char at index 2 sb append text substring last index index 1 index 3 else sb append text substring last index index skip the index last index index index text index of index if last index len sb append text substring last index len return sb to string removemnemonics removemnemonics indexof stringbuffer stringbuffer lastindex charat charat charat lastindex lastindex lastindex indexof lastindex lastindex tostring method declared on i action public void remove property change listener i property change listener listener listeners remove listener iaction removepropertychangelistener ipropertychangelistener the default implementation of this code i action code method does nothing subclasses should override this method if they do not need information from the triggering event or override code run with event event code if they do public void run do nothing iaction runwithevent the default implementation of this code i action code method ignores the event argument and simply calls code run code subclasses should override this method if they need information from the triggering event or override code run code if not param event the swt event which triggered this action being run since 2 0 public void run with event event event run iaction runwithevent method declared on i action public void set action definition id string id action definition id id iaction setactiondefinitionid actiondefinitionid public void set checked boolean checked object new value null for backward compatibility if the style is not set yet then convert it to a toggle button if value null value val toggle btn on value val toggle btn off new value checked val toggle btn on val toggle btn off else if value val radio btn on value val radio btn off new value checked val radio btn on val radio btn off else some other style already so do nothing return if new value value value new value if checked fire property change checked boolean false boolean true else fire property change checked boolean true boolean false setchecked newvalue val_toggle_btn_on val_toggle_btn_off newvalue val_toggle_btn_on val_toggle_btn_off val_radio_btn_on val_radio_btn_off newvalue val_radio_btn_on val_radio_btn_off newvalue newvalue firepropertychange firepropertychange public void set description string text if description null text null description null text null description null text null text equals description string old description description description text fire property change description old description description setdescription olddescription firepropertychange olddescription public void set disabled image descriptor image descriptor new image if disabled image new image image descriptor old image disabled image disabled image new image fire property change image old image new image setdisabledimagedescriptor imagedescriptor newimage disabledimage newimage imagedescriptor oldimage disabledimage disabledimage newimage firepropertychange oldimage newimage public void set enabled boolean enabled if enabled this enabled boolean old val this enabled boolean true boolean false boolean new val enabled boolean true boolean false this enabled enabled fire property change enabled old val new val setenabled oldval newval firepropertychange oldval newval method declared on i action public void set help listener help listener listener help listener listener iaction sethelplistener helplistener helplistener public void set hover image descriptor image descriptor new image if hover image new image image descriptor old image hover image hover image new image fire property change image old image new image sethoverimagedescriptor imagedescriptor newimage hoverimage newimage imagedescriptor oldimage hoverimage hoverimage newimage firepropertychange oldimage newimage method declared on i action public void set id string id this id id iaction setid public void set image descriptor image descriptor new image if image new image image descriptor old image image image new image fire property change image old image new image setimagedescriptor imagedescriptor newimage newimage imagedescriptor oldimage newimage firepropertychange oldimage newimage sets the menu creator for this action p note that if this method is called it overrides the check status p param creator the menu creator or code null code if none public void set menu creator i menu creator creator for backward compatibility if the style is not set yet then convert it to a drop down menu if value null value creator return if value instanceof i menu creator value creator null val drop down menu creator setmenucreator imenucreator imenucreator val_drop_down_menu sets the text for this action p fires a property change event for the code text code property if the text actually changes as a consequence p p the accelerator is identified by the last index of a tab character if there are no tab characters then it is identified by the last index of a character if neither then there is no accelerator text note that if you want to insert a character into the text but no accelerator you can simply insert a or a tab at the end of the text p param text the text or code null code if none public void set text string text string old text this text int old accel this accelerator this text text if text null string accelerator text extract accelerator text text if accelerator text null int new accelerator convert localized accelerator accelerator text be sure to not wipe out the accelerator if nothing found if new accelerator 0 set accelerator new accelerator if this accelerator old accel old text null this text null old text equals this text fire property change text old text this text settext oldtext oldaccel acceleratortext extractacceleratortext acceleratortext newaccelerator convertlocalizedaccelerator acceleratortext newaccelerator setaccelerator newaccelerator oldaccel oldtext oldtext firepropertychange oldtext sets the tool tip text for this action p fires a property change event for the code tool tip text code property if the tool tip text actually changes as a consequence p param tool tip text the tool tip text or code null code if none public void set tool tip text string tool tip text string old tool tip text this tool tip text if old tool tip text null tool tip text null old tool tip text equals tool tip text this tool tip text tool tip text fire property change tool tip text old tool tip text tool tip text tool_tip_text tooltiptext settooltiptext tooltiptext oldtooltiptext tooltiptext oldtooltiptext tooltiptext oldtooltiptext tooltiptext tooltiptext tooltiptext firepropertychange tool_tip_text oldtooltiptext tooltiptext see i action set accelerator int public void set accelerator int keycode this accelerator keycode iaction setaccelerator setaccelerator reports the outcome of the running of this action via the link i action result property param success code true code if the action succeeded and code false code if the action failed or was not completed see i action result since 3 0 public final void notify result boolean success avoid boolean value of boolean to allow compilation against jcl foundation bug 80059 fire property change result null success boolean true boolean false iaction iaction notifyresult valueof firepropertychange cannot construct an image resource use static methods only private image resource do nothing imageresource imageresource returns the busy images for the web browser return org eclipse swt graphics image public static image get busy images return busy images getbusyimages busyimages return the image with the given key param key java lang string return org eclipse swt graphics image public static image get image string key if image registry null initialize image registry return image registry get key getimage imageregistry initializeimageregistry imageregistry return the image descriptor with the given key param key java lang string return org eclipse jface resource image descriptor public static image descriptor get image descriptor string key if image registry null initialize image registry return image descriptor image descriptors get key imagedescriptor imagedescriptor getimagedescriptor imageregistry initializeimageregistry imagedescriptor imagedescriptors initialize the image resources protected static void initialize image registry image registry new image registry image descriptors new hash map load web browser images register image img elcl nav backward url elcl nav backward gif non nls 1 register image img elcl nav forward url elcl nav forward gif non nls 1 register image img elcl nav stop url elcl nav stop gif non nls 1 register image img elcl nav refresh url elcl nav refresh gif non nls 1 register image img elcl nav go url elcl nav go gif non nls 1 register image img elcl nav home url elcl nav home gif non nls 1 register image img elcl nav print url elcl nav print gif non nls 1 register image img clcl nav backward url clcl nav backward gif non nls 1 register image img clcl nav forward url clcl nav forward gif non nls 1 register image img clcl nav stop url clcl nav stop gif non nls 1 register image img clcl nav refresh url clcl nav refresh gif non nls 1 register image img clcl nav go url clcl nav go gif non nls 1 register image img clcl nav home url clcl nav home gif non nls 1 register image img clcl nav print url clcl nav print gif non nls 1 register image img dlcl nav backward url dlcl nav backward gif non nls 1 register image img dlcl nav forward url dlcl nav forward gif non nls 1 register image img dlcl nav stop url dlcl nav stop gif non nls 1 register image img dlcl nav refresh url dlcl nav refresh gif non nls 1 register image img dlcl nav go url dlcl nav go gif non nls 1 register image img dlcl nav home url dlcl nav home gif non nls 1 register image img dlcl nav print url dlcl nav print gif non nls 1 register image img internal browser url obj internal browser gif non nls 1 register image img external browser url obj external browser gif non nls 1 busy images busy images new image 13 for int i 0 i 13 i register image busy i url obj busy i 1 gif non nls 1 non nls 2 non nls 3 busy images i get image busy i non nls 1 initializeimageregistry imageregistry imageregistry imagedescriptors hashmap registerimage img_elcl_nav_backward url_elcl nav_backward registerimage img_elcl_nav_forward url_elcl nav_forward registerimage img_elcl_nav_stop url_elcl nav_stop registerimage img_elcl_nav_refresh url_elcl nav_refresh registerimage img_elcl_nav_go url_elcl nav_go registerimage img_elcl_nav_home url_elcl nav_home registerimage img_elcl_nav_print url_elcl nav_print registerimage img_clcl_nav_backward url_clcl nav_backward registerimage img_clcl_nav_forward url_clcl nav_forward registerimage img_clcl_nav_stop url_clcl nav_stop registerimage img_clcl_nav_refresh url_clcl nav_refresh registerimage img_clcl_nav_go url_clcl nav_go registerimage img_clcl_nav_home url_clcl nav_home registerimage img_clcl_nav_print url_clcl nav_print registerimage img_dlcl_nav_backward url_dlcl nav_backward registerimage img_dlcl_nav_forward url_dlcl nav_forward registerimage img_dlcl_nav_stop url_dlcl nav_stop registerimage img_dlcl_nav_refresh url_dlcl nav_refresh registerimage img_dlcl_nav_go url_dlcl nav_go registerimage img_dlcl_nav_home url_dlcl nav_home registerimage img_dlcl_nav_print url_dlcl nav_print registerimage img_internal_browser url_obj internal_browser registerimage img_external_browser url_obj external_browser busyimages registerimage url_obj busyimages getimage register an image with the registry param key java lang string param partialurl java lang string private static void register image string key string partialurl try image descriptor id image descriptor create fromurl new url icon base url partialurl image registry put key id image descriptors put key id catch exception e trace trace trace warning error registering image key from partialurl e non nls 1 non nls 2 registerimage imagedescriptor imagedescriptor createfromurl icon_base_url imageregistry imagedescriptors public class internal browser editor instance extends internal browser instance public internal browser editor instance string id int style string name string tooltip super id style name tooltip internalbrowsereditorinstance internalbrowserinstance internalbrowsereditorinstance public void openurl url url throws part init exception web browser editor input input new web browser editor input url style input set name this name input set tool tip text this tooltip web browser editor editor web browser editor part i workbench window workbench window web browserui plugin get instance get workbench get active workbench window i workbench page page null if workbench window null page workbench window get active page if page null throw new part init exception messages error could not launch internal web browser if editor null editor init editor get editor site input page activate editor else try i editor part editor part page open editor input web browser editor web browser editor id hook part page editor part catch exception e trace trace trace severe error opening web browser e non nls 1 partinitexception webbrowsereditorinput webbrowsereditorinput setname settooltiptext webbrowsereditor webbrowsereditor iworkbenchwindow workbenchwindow webbrowseruiplugin getinstance getworkbench getactiveworkbenchwindow iworkbenchpage workbenchwindow workbenchwindow getactivepage partinitexception errorcouldnotlaunchinternalwebbrowser geteditorsite ieditorpart editorpart openeditor webbrowsereditor web_browser_editor_id hookpart editorpart public boolean close try return web browser editor part close catch exception e return false webbrowsereditor public stream consumer input stream input stream super set daemon true b reader new buffered reader new input stream reader input stream streamconsumer inputstream inputstream setdaemon breader bufferedreader inputstreamreader inputstream public void run try string line while null line b reader read line last line line browser log log line b reader close catch io exception ioe web browserui plugin log error exception occurred reading from web browser ioe non nls 1 breader readline lastline browserlog breader ioexception webbrowseruiplugin logerror return last line obtained or null public string get last line return last line getlastline lastline public void property changed object source int prop id if prop id i workbench part constants prop title set default content description propertychanged propid propid iworkbenchpartconstants prop_title setdefaultcontentdescription creates a new view protected view part super add property listener compatibility title listener viewpart addpropertylistener compatibilitytitlelistener method declared on i view part public i view site get view site return i view site get site iviewpart iviewsite getviewsite iviewsite getsite public void init i view site site throws part init exception set site site set default content description iviewsite partinitexception setsite setdefaultcontentdescription state restoration as needed public void init i view site site i memento memento throws part init exception init site iviewsite imemento partinitexception method declared on i view part public void save state i memento memento do nothing iviewpart savestate imemento protected void set part name string part name if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set part name part name setpartname partname compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setpartname partname protected void set content description string description if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set content description description setcontentdescription compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setcontentdescription public void set initialization data i configuration element cfig string property name object data super set initialization data cfig property name data set default content description setinitializationdata iconfigurationelement propertyname setinitializationdata propertyname setdefaultcontentdescription private void set default content description if compatibility title listener null return string part name get part name string title get title if util equals part name title internal set content description non nls 1 else internal set content description title setdefaultcontentdescription compatibilitytitlelistener partname getpartname gettitle partname internalsetcontentdescription internalsetcontentdescription checks that the given site is valid for this type of part the site for a view must be an code i view site code param site the site to check since 3 1 protected final void check site i workbench part site site super check site site assert is true site instanceof i view site the site for a view must be an i view site non nls 1 iviewsite checksite iworkbenchpartsite checksite istrue iviewsite iviewsite public void property changed object source int prop id if prop id i workbench part constants prop title set default content description propertychanged propid propid iworkbenchpartconstants prop_title setdefaultcontentdescription creates a new view protected view part super add property listener compatibility title listener viewpart addpropertylistener compatibilitytitlelistener method declared on i view part public i view site get view site return i view site get site iviewpart iviewsite getviewsite iviewsite getsite public void init i view site site throws part init exception set site site set default content description iviewsite partinitexception setsite setdefaultcontentdescription state restoration as needed public void init i view site site i memento memento throws part init exception init site iviewsite imemento partinitexception method declared on i view part public void save state i memento memento do nothing iviewpart savestate imemento protected void set part name string part name if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set part name part name setpartname partname compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setpartname partname protected void set content description string description if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set content description description setcontentdescription compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setcontentdescription public void set initialization data i configuration element cfig string property name object data super set initialization data cfig property name data set default content description setinitializationdata iconfigurationelement propertyname setinitializationdata propertyname setdefaultcontentdescription private void set default content description if compatibility title listener null return string part name get part name string title get title if util equals part name title internal set content description non nls 1 else internal set content description title setdefaultcontentdescription compatibilitytitlelistener partname getpartname gettitle partname internalsetcontentdescription internalsetcontentdescription checks that the given site is valid for this type of part the site for a view must be an code i view site code param site the site to check since 3 1 protected final void check site i workbench part site site super check site site assert is true site instanceof i view site the site for a view must be an i view site non nls 1 iviewsite checksite iworkbenchpartsite checksite istrue iviewsite iviewsite public void property changed object source int prop id if prop id i workbench part constants prop title set default content description propertychanged propid propid iworkbenchpartconstants prop_title setdefaultcontentdescription creates a new view protected view part super add property listener compatibility title listener viewpart addpropertylistener compatibilitytitlelistener method declared on i view part public i view site get view site return i view site get site iviewpart iviewsite getviewsite iviewsite getsite public void init i view site site throws part init exception set site site set default content description iviewsite partinitexception setsite setdefaultcontentdescription state restoration as needed public void init i view site site i memento memento throws part init exception init site iviewsite imemento partinitexception method declared on i view part public void save state i memento memento do nothing iviewpart savestate imemento protected void set part name string part name if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set part name part name setpartname partname compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setpartname partname protected void set content description string description if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set content description description setcontentdescription compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setcontentdescription public void set initialization data i configuration element cfig string property name object data super set initialization data cfig property name data set default content description setinitializationdata iconfigurationelement propertyname setinitializationdata propertyname setdefaultcontentdescription private void set default content description if compatibility title listener null return string part name get part name string title get title if util equals part name title internal set content description non nls 1 else internal set content description title setdefaultcontentdescription compatibilitytitlelistener partname getpartname gettitle partname internalsetcontentdescription internalsetcontentdescription checks that the given site is valid for this type of part the site for a view must be an code i view site code param site the site to check since 3 1 protected final void check site i workbench part site site super check site site assert is true site instanceof i view site the site for a view must be an i view site non nls 1 iviewsite checksite iworkbenchpartsite checksite istrue iviewsite iviewsite public void property changed object source int prop id if prop id i workbench part constants prop title set default content description propertychanged propid propid iworkbenchpartconstants prop_title setdefaultcontentdescription creates a new view protected view part super add property listener compatibility title listener viewpart addpropertylistener compatibilitytitlelistener method declared on i view part public i view site get view site return i view site get site iviewpart iviewsite getviewsite iviewsite getsite public void init i view site site throws part init exception set site site set default content description iviewsite partinitexception setsite setdefaultcontentdescription state restoration as needed public void init i view site site i memento memento throws part init exception init site iviewsite imemento partinitexception method declared on i view part public void save state i memento memento do nothing iviewpart savestate imemento protected void set part name string part name if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set part name part name setpartname partname compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setpartname partname protected void set content description string description if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set content description description setcontentdescription compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setcontentdescription public void set initialization data i configuration element cfig string property name object data super set initialization data cfig property name data set default content description setinitializationdata iconfigurationelement propertyname setinitializationdata propertyname setdefaultcontentdescription private void set default content description if compatibility title listener null return string part name get part name string title get title if util equals part name title internal set content description non nls 1 else internal set content description title setdefaultcontentdescription compatibilitytitlelistener partname getpartname gettitle partname internalsetcontentdescription internalsetcontentdescription checks that the given site is valid for this type of part the site for a view must be an code i view site code param site the site to check since 3 1 protected final void check site i workbench part site site super check site site assert is true site instanceof i view site the site for a view must be an i view site non nls 1 iviewsite checksite iworkbenchpartsite checksite istrue iviewsite iviewsite public void property changed object source int prop id if prop id i workbench part constants prop title set default content description propertychanged propid propid iworkbenchpartconstants prop_title setdefaultcontentdescription creates a new view protected view part super add property listener compatibility title listener viewpart addpropertylistener compatibilitytitlelistener method declared on i view part public i view site get view site return i view site get site iviewpart iviewsite getviewsite iviewsite getsite public void init i view site site throws part init exception set site site set default content description iviewsite partinitexception setsite setdefaultcontentdescription state restoration as needed public void init i view site site i memento memento throws part init exception init site iviewsite imemento partinitexception method declared on i view part public void save state i memento memento do nothing iviewpart savestate imemento protected void set part name string part name if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set part name part name setpartname partname compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setpartname partname protected void set content description string description if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set content description description setcontentdescription compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setcontentdescription public void set initialization data i configuration element cfig string property name object data super set initialization data cfig property name data set default content description setinitializationdata iconfigurationelement propertyname setinitializationdata propertyname setdefaultcontentdescription private void set default content description if compatibility title listener null return string part name get part name string title get title if util equals part name title internal set content description non nls 1 else internal set content description title setdefaultcontentdescription compatibilitytitlelistener partname getpartname gettitle partname internalsetcontentdescription internalsetcontentdescription checks that the given site is valid for this type of part the site for a view must be an code i view site code param site the site to check since 3 1 protected final void check site i workbench part site site super check site site assert is true site instanceof i view site the site for a view must be an i view site non nls 1 iviewsite checksite iworkbenchpartsite checksite istrue iviewsite iviewsite public void property changed object source int prop id if prop id i workbench part constants prop title set default content description propertychanged propid propid iworkbenchpartconstants prop_title setdefaultcontentdescription creates a new view protected view part super add property listener compatibility title listener viewpart addpropertylistener compatibilitytitlelistener method declared on i view part public i view site get view site return i view site get site iviewpart iviewsite getviewsite iviewsite getsite public void init i view site site throws part init exception set site site set default content description iviewsite partinitexception setsite setdefaultcontentdescription state restoration as needed public void init i view site site i memento memento throws part init exception init site iviewsite imemento partinitexception method declared on i view part public void save state i memento memento do nothing iviewpart savestate imemento protected void set part name string part name if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set part name part name setpartname partname compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setpartname partname protected void set content description string description if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set content description description setcontentdescription compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setcontentdescription public void set initialization data i configuration element cfig string property name object data super set initialization data cfig property name data set default content description setinitializationdata iconfigurationelement propertyname setinitializationdata propertyname setdefaultcontentdescription private void set default content description if compatibility title listener null return string part name get part name string title get title if util equals part name title internal set content description non nls 1 else internal set content description title setdefaultcontentdescription compatibilitytitlelistener partname getpartname gettitle partname internalsetcontentdescription internalsetcontentdescription checks that the given site is valid for this type of part the site for a view must be an code i view site code param site the site to check since 3 1 protected final void check site i workbench part site site super check site site assert is true site instanceof i view site the site for a view must be an i view site non nls 1 iviewsite checksite iworkbenchpartsite checksite istrue iviewsite iviewsite public void property changed object source int prop id if prop id i workbench part constants prop title set default content description propertychanged propid propid iworkbenchpartconstants prop_title setdefaultcontentdescription creates a new view protected view part super add property listener compatibility title listener viewpart addpropertylistener compatibilitytitlelistener method declared on i view part public i view site get view site return i view site get site iviewpart iviewsite getviewsite iviewsite getsite public void init i view site site throws part init exception set site site set default content description iviewsite partinitexception setsite setdefaultcontentdescription state restoration as needed public void init i view site site i memento memento throws part init exception init site iviewsite imemento partinitexception method declared on i view part public void save state i memento memento do nothing iviewpart savestate imemento protected void set part name string part name if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set part name part name setpartname partname compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setpartname partname protected void set content description string description if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set content description description setcontentdescription compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setcontentdescription public void set initialization data i configuration element cfig string property name object data super set initialization data cfig property name data set default content description setinitializationdata iconfigurationelement propertyname setinitializationdata propertyname setdefaultcontentdescription private void set default content description if compatibility title listener null return string part name get part name string title get title if util equals part name title internal set content description non nls 1 else internal set content description title setdefaultcontentdescription compatibilitytitlelistener partname getpartname gettitle partname internalsetcontentdescription internalsetcontentdescription checks that the given site is valid for this type of part the site for a view must be an code i view site code param site the site to check since 3 1 protected final void check site i workbench part site site super check site site assert is true site instanceof i view site the site for a view must be an i view site non nls 1 iviewsite checksite iworkbenchpartsite checksite istrue iviewsite iviewsite public void property changed object source int prop id if prop id i workbench part constants prop title set default content description propertychanged propid propid iworkbenchpartconstants prop_title setdefaultcontentdescription creates a new view protected view part super add property listener compatibility title listener viewpart addpropertylistener compatibilitytitlelistener method declared on i view part public i view site get view site return i view site get site iviewpart iviewsite getviewsite iviewsite getsite public void init i view site site throws part init exception set site site set default content description iviewsite partinitexception setsite setdefaultcontentdescription state restoration as needed public void init i view site site i memento memento throws part init exception init site iviewsite imemento partinitexception method declared on i view part public void save state i memento memento do nothing iviewpart savestate imemento protected void set part name string part name if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set part name part name setpartname partname compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setpartname partname protected void set content description string description if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set content description description setcontentdescription compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setcontentdescription public void set initialization data i configuration element cfig string property name object data super set initialization data cfig property name data set default content description setinitializationdata iconfigurationelement propertyname setinitializationdata propertyname setdefaultcontentdescription private void set default content description if compatibility title listener null return string part name get part name string title get title if util equals part name title internal set content description non nls 1 else internal set content description title setdefaultcontentdescription compatibilitytitlelistener partname getpartname gettitle partname internalsetcontentdescription internalsetcontentdescription checks that the given site is valid for this type of part the site for a view must be an code i view site code param site the site to check since 3 1 protected final void check site i workbench part site site super check site site assert is true site instanceof i view site the site for a view must be an i view site non nls 1 iviewsite checksite iworkbenchpartsite checksite istrue iviewsite iviewsite public void property changed object source int prop id if prop id i workbench part constants prop title set default content description propertychanged propid propid iworkbenchpartconstants prop_title setdefaultcontentdescription creates a new view protected view part super add property listener compatibility title listener viewpart addpropertylistener compatibilitytitlelistener method declared on i view part public i view site get view site return i view site get site iviewpart iviewsite getviewsite iviewsite getsite public void init i view site site throws part init exception set site site set default content description iviewsite partinitexception setsite setdefaultcontentdescription state restoration as needed public void init i view site site i memento memento throws part init exception init site iviewsite imemento partinitexception method declared on i view part public void save state i memento memento do nothing iviewpart savestate imemento protected void set part name string part name if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set part name part name setpartname partname compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setpartname partname protected void set content description string description if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set content description description setcontentdescription compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setcontentdescription public void set initialization data i configuration element cfig string property name object data super set initialization data cfig property name data set default content description setinitializationdata iconfigurationelement propertyname setinitializationdata propertyname setdefaultcontentdescription private void set default content description if compatibility title listener null return string part name get part name string title get title if util equals part name title internal set content description non nls 1 else internal set content description title setdefaultcontentdescription compatibilitytitlelistener partname getpartname gettitle partname internalsetcontentdescription internalsetcontentdescription checks that the given site is valid for this type of part the site for a view must be an code i view site code param site the site to check since 3 1 protected final void check site i workbench part site site super check site site assert is true site instanceof i view site the site for a view must be an i view site non nls 1 iviewsite checksite iworkbenchpartsite checksite istrue iviewsite iviewsite public void property changed object source int prop id if prop id i workbench part constants prop title set default content description propertychanged propid propid iworkbenchpartconstants prop_title setdefaultcontentdescription creates a new view protected view part super add property listener compatibility title listener viewpart addpropertylistener compatibilitytitlelistener method declared on i view part public i view site get view site return i view site get site iviewpart iviewsite getviewsite iviewsite getsite public void init i view site site throws part init exception set site site set default content description iviewsite partinitexception setsite setdefaultcontentdescription state restoration as needed public void init i view site site i memento memento throws part init exception init site iviewsite imemento partinitexception method declared on i view part public void save state i memento memento do nothing iviewpart savestate imemento protected void set part name string part name if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set part name part name setpartname partname compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setpartname partname protected void set content description string description if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set content description description setcontentdescription compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setcontentdescription public void set initialization data i configuration element cfig string property name object data super set initialization data cfig property name data set default content description setinitializationdata iconfigurationelement propertyname setinitializationdata propertyname setdefaultcontentdescription private void set default content description if compatibility title listener null return string part name get part name string title get title if util equals part name title internal set content description non nls 1 else internal set content description title setdefaultcontentdescription compatibilitytitlelistener partname getpartname gettitle partname internalsetcontentdescription internalsetcontentdescription checks that the given site is valid for this type of part the site for a view must be an code i view site code param site the site to check since 3 1 protected final void check site i workbench part site site super check site site assert is true site instanceof i view site the site for a view must be an i view site non nls 1 iviewsite checksite iworkbenchpartsite checksite istrue iviewsite iviewsite public void property changed object source int prop id if prop id i workbench part constants prop title set default content description propertychanged propid propid iworkbenchpartconstants prop_title setdefaultcontentdescription creates a new view protected view part super add property listener compatibility title listener viewpart addpropertylistener compatibilitytitlelistener method declared on i view part public i view site get view site return i view site get site iviewpart iviewsite getviewsite iviewsite getsite public void init i view site site throws part init exception set site site set default content description iviewsite partinitexception setsite setdefaultcontentdescription state restoration as needed public void init i view site site i memento memento throws part init exception init site iviewsite imemento partinitexception method declared on i view part public void save state i memento memento do nothing iviewpart savestate imemento protected void set part name string part name if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set part name part name setpartname partname compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setpartname partname protected void set content description string description if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set content description description setcontentdescription compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setcontentdescription public void set initialization data i configuration element cfig string property name object data super set initialization data cfig property name data set default content description setinitializationdata iconfigurationelement propertyname setinitializationdata propertyname setdefaultcontentdescription private void set default content description if compatibility title listener null return string part name get part name string title get title if util equals part name title internal set content description non nls 1 else internal set content description title setdefaultcontentdescription compatibilitytitlelistener partname getpartname gettitle partname internalsetcontentdescription internalsetcontentdescription checks that the given site is valid for this type of part the site for a view must be an code i view site code param site the site to check since 3 1 protected final void check site i workbench part site site super check site site assert is true site instanceof i view site the site for a view must be an i view site non nls 1 iviewsite checksite iworkbenchpartsite checksite istrue iviewsite iviewsite public void property changed object source int prop id if prop id i workbench part constants prop title set default content description propertychanged propid propid iworkbenchpartconstants prop_title setdefaultcontentdescription creates a new view protected view part super add property listener compatibility title listener viewpart addpropertylistener compatibilitytitlelistener method declared on i view part public i view site get view site return i view site get site iviewpart iviewsite getviewsite iviewsite getsite public void init i view site site throws part init exception set site site set default content description iviewsite partinitexception setsite setdefaultcontentdescription state restoration as needed public void init i view site site i memento memento throws part init exception init site iviewsite imemento partinitexception method declared on i view part public void save state i memento memento do nothing iviewpart savestate imemento protected void set part name string part name if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set part name part name setpartname partname compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setpartname partname protected void set content description string description if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set content description description setcontentdescription compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setcontentdescription public void set initialization data i configuration element cfig string property name object data super set initialization data cfig property name data set default content description setinitializationdata iconfigurationelement propertyname setinitializationdata propertyname setdefaultcontentdescription private void set default content description if compatibility title listener null return string part name get part name string title get title if util equals part name title internal set content description non nls 1 else internal set content description title setdefaultcontentdescription compatibilitytitlelistener partname getpartname gettitle partname internalsetcontentdescription internalsetcontentdescription checks that the given site is valid for this type of part the site for a view must be an code i view site code param site the site to check since 3 1 protected final void check site i workbench part site site super check site site assert is true site instanceof i view site the site for a view must be an i view site non nls 1 iviewsite checksite iworkbenchpartsite checksite istrue iviewsite iviewsite public void property changed object source int prop id if prop id i workbench part constants prop title set default content description propertychanged propid propid iworkbenchpartconstants prop_title setdefaultcontentdescription creates a new view protected view part super add property listener compatibility title listener viewpart addpropertylistener compatibilitytitlelistener method declared on i view part public i view site get view site return i view site get site iviewpart iviewsite getviewsite iviewsite getsite public void init i view site site throws part init exception set site site set default content description iviewsite partinitexception setsite setdefaultcontentdescription state restoration as needed public void init i view site site i memento memento throws part init exception init site iviewsite imemento partinitexception method declared on i view part public void save state i memento memento do nothing iviewpart savestate imemento protected void set part name string part name if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set part name part name setpartname partname compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setpartname partname protected void set content description string description if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set content description description setcontentdescription compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setcontentdescription public void set initialization data i configuration element cfig string property name object data super set initialization data cfig property name data set default content description setinitializationdata iconfigurationelement propertyname setinitializationdata propertyname setdefaultcontentdescription private void set default content description if compatibility title listener null return string part name get part name string title get title if util equals part name title internal set content description non nls 1 else internal set content description title setdefaultcontentdescription compatibilitytitlelistener partname getpartname gettitle partname internalsetcontentdescription internalsetcontentdescription checks that the given site is valid for this type of part the site for a view must be an code i view site code param site the site to check since 3 1 protected final void check site i workbench part site site super check site site assert is true site instanceof i view site the site for a view must be an i view site non nls 1 iviewsite checksite iworkbenchpartsite checksite istrue iviewsite iviewsite public void property changed object source int prop id if prop id i workbench part constants prop title set default content description propertychanged propid propid iworkbenchpartconstants prop_title setdefaultcontentdescription creates a new view protected view part super add property listener compatibility title listener viewpart addpropertylistener compatibilitytitlelistener method declared on i view part public i view site get view site return i view site get site iviewpart iviewsite getviewsite iviewsite getsite public void init i view site site throws part init exception set site site set default content description iviewsite partinitexception setsite setdefaultcontentdescription state restoration as needed public void init i view site site i memento memento throws part init exception init site iviewsite imemento partinitexception method declared on i view part public void save state i memento memento do nothing iviewpart savestate imemento protected void set part name string part name if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set part name part name setpartname partname compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setpartname partname protected void set content description string description if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set content description description setcontentdescription compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setcontentdescription public void set initialization data i configuration element cfig string property name object data super set initialization data cfig property name data set default content description setinitializationdata iconfigurationelement propertyname setinitializationdata propertyname setdefaultcontentdescription private void set default content description if compatibility title listener null return string part name get part name string title get title if util equals part name title internal set content description non nls 1 else internal set content description title setdefaultcontentdescription compatibilitytitlelistener partname getpartname gettitle partname internalsetcontentdescription internalsetcontentdescription checks that the given site is valid for this type of part the site for a view must be an code i view site code param site the site to check since 3 1 protected final void check site i workbench part site site super check site site assert is true site instanceof i view site the site for a view must be an i view site non nls 1 iviewsite checksite iworkbenchpartsite checksite istrue iviewsite iviewsite public void property changed object source int prop id if prop id i workbench part constants prop title set default content description propertychanged propid propid iworkbenchpartconstants prop_title setdefaultcontentdescription creates a new view protected view part super add property listener compatibility title listener viewpart addpropertylistener compatibilitytitlelistener method declared on i view part public i view site get view site return i view site get site iviewpart iviewsite getviewsite iviewsite getsite public void init i view site site throws part init exception set site site set default content description iviewsite partinitexception setsite setdefaultcontentdescription state restoration as needed public void init i view site site i memento memento throws part init exception init site iviewsite imemento partinitexception method declared on i view part public void save state i memento memento do nothing iviewpart savestate imemento protected void set part name string part name if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set part name part name setpartname partname compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setpartname partname protected void set content description string description if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set content description description setcontentdescription compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setcontentdescription public void set initialization data i configuration element cfig string property name object data super set initialization data cfig property name data set default content description setinitializationdata iconfigurationelement propertyname setinitializationdata propertyname setdefaultcontentdescription private void set default content description if compatibility title listener null return string part name get part name string title get title if util equals part name title internal set content description non nls 1 else internal set content description title setdefaultcontentdescription compatibilitytitlelistener partname getpartname gettitle partname internalsetcontentdescription internalsetcontentdescription checks that the given site is valid for this type of part the site for a view must be an code i view site code param site the site to check since 3 1 protected final void check site i workbench part site site super check site site assert is true site instanceof i view site the site for a view must be an i view site non nls 1 iviewsite checksite iworkbenchpartsite checksite istrue iviewsite iviewsite public void property changed object source int prop id if prop id i workbench part constants prop title set default content description propertychanged propid propid iworkbenchpartconstants prop_title setdefaultcontentdescription creates a new view protected view part super add property listener compatibility title listener viewpart addpropertylistener compatibilitytitlelistener method declared on i view part public i view site get view site return i view site get site iviewpart iviewsite getviewsite iviewsite getsite public void init i view site site throws part init exception set site site set default content description iviewsite partinitexception setsite setdefaultcontentdescription state restoration as needed public void init i view site site i memento memento throws part init exception init site iviewsite imemento partinitexception method declared on i view part public void save state i memento memento do nothing iviewpart savestate imemento protected void set part name string part name if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set part name part name setpartname partname compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setpartname partname protected void set content description string description if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set content description description setcontentdescription compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setcontentdescription public void set initialization data i configuration element cfig string property name object data super set initialization data cfig property name data set default content description setinitializationdata iconfigurationelement propertyname setinitializationdata propertyname setdefaultcontentdescription private void set default content description if compatibility title listener null return string part name get part name string title get title if util equals part name title internal set content description non nls 1 else internal set content description title setdefaultcontentdescription compatibilitytitlelistener partname getpartname gettitle partname internalsetcontentdescription internalsetcontentdescription checks that the given site is valid for this type of part the site for a view must be an code i view site code param site the site to check since 3 1 protected final void check site i workbench part site site super check site site assert is true site instanceof i view site the site for a view must be an i view site non nls 1 iviewsite checksite iworkbenchpartsite checksite istrue iviewsite iviewsite public void property changed object source int prop id if prop id i workbench part constants prop title set default content description propertychanged propid propid iworkbenchpartconstants prop_title setdefaultcontentdescription creates a new view protected view part super add property listener compatibility title listener viewpart addpropertylistener compatibilitytitlelistener method declared on i view part public i view site get view site return i view site get site iviewpart iviewsite getviewsite iviewsite getsite public void init i view site site throws part init exception set site site set default content description iviewsite partinitexception setsite setdefaultcontentdescription state restoration as needed public void init i view site site i memento memento throws part init exception init site iviewsite imemento partinitexception method declared on i view part public void save state i memento memento do nothing iviewpart savestate imemento protected void set part name string part name if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set part name part name setpartname partname compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setpartname partname protected void set content description string description if compatibility title listener null remove property listener compatibility title listener compatibility title listener null super set content description description setcontentdescription compatibilitytitlelistener removepropertylistener compatibilitytitlelistener compatibilitytitlelistener setcontentdescription public void set initialization data i configuration element cfig string property name object data super set initialization data cfig property name data set default content description setinitializationdata iconfigurationelement propertyname setinitializationdata propertyname setdefaultcontentdescription private void set default content description if compatibility title listener null return string part name get part name string title get title if util equals part name title internal set content description non nls 1 else internal set content description title setdefaultcontentdescription compatibilitytitlelistener partname getpartname gettitle partname internalsetcontentdescription internalsetcontentdescription checks that the given site is valid for this type of part the site for a view must be an code i view site code param site the site to check since 3 1 protected final void check site i workbench part site site super check site site assert is true site instanceof i view site the site for a view must be an i view site non nls 1 iviewsite checksite iworkbenchpartsite checksite istrue iviewsite iviewsite public void create part control composite parent int style web browser util decode style get view site get secondary id viewer new browser viewer parent style viewer set container this property change listener property change listener new property change listener public void property change property change event event if browser viewer property title equals event get property name set part name string event get new value viewer add property change listener property change listener init drag and drop createpartcontrol webbrowserutil decodestyle getviewsite getsecondaryid browserviewer setcontainer propertychangelistener propertychangelistener propertychangelistener propertychange propertychangeevent browserviewer property_title getpropertyname setpartname getnewvalue addpropertychangelistener propertychangelistener initdraganddrop public void dispose if listener null remove selection listener removeselectionlistener public void seturl string url if viewer null viewer seturl url public void set focus viewer set focus setfocus setfocus public boolean close try get site get page hide view this return true catch exception e return false getsite getpage hideview public i action bars get action bars return get view site get action bars iactionbars getactionbars getviewsite getactionbars public void open in external browser string url try url theurl new url url i workbench browser support support platformui get workbench get browser support support get external browser openurl theurl catch malformedurl exception e todo handle this catch part init exception e todo handle this openinexternalbrowser iworkbenchbrowsersupport getworkbench getbrowsersupport getexternalbrowser malformedurlexception partinitexception public void add selection listener if listener null return listener new i selection listener public void selection changed i workbench part part i selection selection if selection instanceof structured selection return structured selection sel structured selection selection object obj sel get first element if obj instanceof i adaptable i adaptable adapt i adaptable obj i location provider loc i location provider adapt get adapter i location provider class i path path i path adapt get adapter i path class if path null file file path to file if file exists is web file file get name try seturl file tourl to external form catch exception e ignore get site get workbench window get selection service add post selection listener listener addselectionlistener iselectionlistener selectionchanged iworkbenchpart iselection structuredselection structuredselection structuredselection getfirstelement iadaptable iadaptable iadaptable ilocationprovider ilocationprovider getadapter ilocationprovider ipath ipath getadapter ipath tofile iswebfile getname toexternalform getsite getworkbenchwindow getselectionservice addpostselectionlistener listener new i selection listener public void selection changed i workbench part part i selection selection if selection instanceof structured selection return structured selection sel structured selection selection object obj sel get first element if obj instanceof i adaptable i adaptable adapt i adaptable obj i location provider loc i location provider adapt get adapter i location provider class i path path i path adapt get adapter i path class if path null file file path to file if file exists is web file file get name try seturl file tourl to external form catch exception e ignore iselectionlistener selectionchanged iworkbenchpart iselection structuredselection structuredselection structuredselection getfirstelement iadaptable iadaptable iadaptable ilocationprovider ilocationprovider getadapter ilocationprovider ipath ipath getadapter ipath tofile iswebfile getname toexternalform public void remove selection listener if listener null return get site get workbench window get selection service remove post selection listener listener listener null removeselectionlistener getsite getworkbenchwindow getselectionservice removepostselectionlistener return true if the filename has a web extension param name return protected boolean is web file string name return name ends with html name ends with htm name ends with gif non nls 1 non nls 2 non nls 3 name ends with jpg non nls 1 iswebfile endswith endswith endswith endswith adds drag and drop support to the view protected void init drag and drop transfer transfers new transfer local selection transfer get instance resource transfer get instance file transfer get instance drop target drop target new drop target viewer dnd drop copy dnd drop default drop target set transfer transfers drop target add drop listener new web browser view drop adapter viewer initdraganddrop localselectiontransfer getinstance resourcetransfer getinstance filetransfer getinstance droptarget droptarget droptarget drop_copy drop_default droptarget settransfer droptarget adddroplistener webbrowserviewdropadapter create the web browserui plugin public web browserui plugin super singleton this webbrowseruiplugin webbrowseruiplugin returns the singleton instance of this plugin return org eclipse ui internal browser web browser plugin public static web browserui plugin get instance return singleton webbrowserplugin webbrowseruiplugin getinstance shuts down this plug in and saves all plug in state exception exception public void stop bundle context context throws exception super stop context browser manager safe dispose bundlecontext browsermanager safedispose returns an array of all known browers p a new array is returned on each call so clients may store or modify the result p return a possibly empty array of browser instances link i client public static i browser ext get browsers if browsers null load browsers i browser ext c new i browser ext browsers size browsers to array c return c iclient ibrowserext getbrowsers loadbrowsers ibrowserext ibrowserext toarray public static i browser ext find browsers string executable i browser ext browsers2 get browsers if browsers2 null executable null return null int ind1 executable last index of non nls 1 int ind2 executable last index of non nls 1 if ind2 ind1 ind1 ind2 executable executable substring ind1 1 string os platform getos int size browsers2 length for int i 0 i size i if browsers2 i getos to lower case index of os 1 if browsers2 i is available string executable2 browsers2 i get executable if executable starts with executable2 return browsers2 i return null ibrowserext findbrowsers ibrowserext getbrowsers lastindexof lastindexof tolowercase indexof isavailable getexecutable startswith load the browsers extension point private static synchronized void load browsers if browsers null return trace trace trace config loading browsers extension point non nls 1 i extension registry registry platform get extension registry i configuration element cf registry get configuration elements for plugin id browsers non nls 1 int size cf length browsers new array list size for int i 0 i size i try browsers add new browser ext cf i trace trace trace config loaded browser cf i get attribute id non nls 1 non nls 2 catch throwable t trace trace trace severe could not load browser cf i get attribute id t non nls 1 non nls 2 trace trace trace config done loading browsers extension point non nls 1 loadbrowsers iextensionregistry getextensionregistry iconfigurationelement getconfigurationelementsfor plugin_id arraylist browserext getattribute getattribute logs an error message with an exception note that the message should already be localized to proper locale ie resources get string should already have been called public static synchronized void log error string message throwable ex if message null message non nls 1 status error status new status i status error plugin id i status ok message ex web browserui plugin get instance get log log error status getstring logerror errorstatus istatus plugin_id istatus webbrowseruiplugin getinstance getlog errorstatus public class open browser workbench action implements i workbench window action delegate open browser workbench action constructor comment public open browser workbench action super openbrowserworkbenchaction iworkbenchwindowactiondelegate openbrowserworkbenchaction openbrowserworkbenchaction disposes this action delegate the implementor should unhook any references to itself so that garbage collection can occur public void dispose do nothing initializes this action delegate with the workbench window it will work in param window the window that provides the context for this delegate public void init i workbench window window do nothing iworkbenchwindow performs this action p this method is called when the delegating action has been triggered implement this method to do the actual work p param action the action proxy that handles the presentation portion of the action public void run i action action try i workbench browser support browser support web browserui plugin get instance get workbench get browser support i web browser browser browser support create browser i workbench browser support location bar i workbench browser support navigation bar null null null browser openurl null catch exception e trace trace trace severe error opening browser e non nls 1 iaction iworkbenchbrowsersupport browsersupport webbrowseruiplugin getinstance getworkbench getbrowsersupport iwebbrowser browsersupport createbrowser iworkbenchbrowsersupport location_bar iworkbenchbrowsersupport navigation_bar notifies this action delegate that the selection in the workbench has changed p implementers can use this opportunity to change the availability of the action or to modify other presentation properties p param action the action proxy that handles presentation portion of the action param selection the current selection in the workbench public void selection changed i action action i selection selection do nothing selectionchanged iaction iselection creates a new empty dialog page protected dialog page no initial behaviour dialogpage creates a new dialog page with the given title param title the title of this dialog page or code null code if none protected dialog page string title this title title dialogpage creates a new dialog page with the given title and image param title the title of this dialog page or code null code if none param image the image for this dialog page or code null code if none protected dialog page string title image descriptor image this title image descriptor image dialogpage imagedescriptor imagedescriptor returns the number of pixels corresponding to the height of the given number of characters p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param chars the number of characters return the number of pixels protected int convert height in chars to pixels int chars test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert height in chars to pixels font metrics chars initializedialogunits convertheightincharstopixels fontmetrics convertheightincharstopixels fontmetrics returns the number of pixels corresponding to the given number of horizontal dialog units p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param dlus the number of horizontal dialog units return the number of pixels protected int convert horizontaldl us to pixels int dlus test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert horizontaldl us to pixels font metrics dlus initializedialogunits converthorizontaldlustopixels fontmetrics converthorizontaldlustopixels fontmetrics returns the number of pixels corresponding to the given number of vertical dialog units p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param dlus the number of vertical dialog units return the number of pixels protected int convert verticaldl us to pixels int dlus test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert verticaldl us to pixels font metrics dlus initializedialogunits convertverticaldlustopixels fontmetrics convertverticaldlustopixels fontmetrics returns the number of pixels corresponding to the width of the given number of characters p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param chars the number of characters return the number of pixels protected int convert width in chars to pixels int chars test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert width in chars to pixels font metrics chars initializedialogunits convertwidthincharstopixels fontmetrics convertwidthincharstopixels fontmetrics the code dialog page code implementation of an code i dialog page code method does nothing subclasses may extend public void dispose deallocate swt resources if image null image dispose image null dialogpage idialogpage returns the top level control for this dialog page return the top level control public control get control return control getcontrol non javadoc method declared on i dialog page public string get description return description idialogpage getdescription returns the symbolic font name used by dialog pages return the symbolic font name protected string get dialog font name return j face resources dialog font getdialogfontname jfaceresources dialog_font non javadoc method declared on i dialog page public string get error message return error message idialogpage geterrormessage errormessage returns the default font to use for this dialog page return the font protected font get font return j face resources get font registry get get dialog font name getfont jfaceresources getfontregistry getdialogfontname public image get image if image null if image descriptor null image image descriptor create image return image getimage imagedescriptor imagedescriptor createimage non javadoc method declared on i dialog page public string get message return message idialogpage getmessage non javadoc method declared on i message provider public int get message type return message type imessageprovider getmessagetype messagetype returns this dialog page s shell convenience method for code get control get shell code this method may only be called after the page s control has been created return the shell public shell get shell return get control get shell getcontrol getshell getshell getcontrol getshell non javadoc method declared on i dialog page public string get title return title idialogpage gettitle returns the tool tip text for the widget with the given id p the default implementation of this framework method does nothing and returns code null code subclasses may override p param widget id the id of the widget for which hover help is requested return the tool tip text or code null code if none deprecated protected final string get tool tip text int widget id return nothing by default return null widgetid gettooltiptext widgetid initializes the computation of horizontal and vertical dialog units based on the size of current font p this method must be called before any of the dialog unit based conversion methods are called p param test control a control from which to obtain the current font protected void initialize dialog units control test control compute and store a font metric gc gc new gc test control gc set font j face resources get dialog font font metrics gc get font metrics gc dispose testcontrol initializedialogunits testcontrol testcontrol setfont jfaceresources getdialogfont fontmetrics getfontmetrics sets the code grid data code on the specified button to be one that is spaced for the current dialog page units the method code initialize dialog units code must be called once before calling this method for the first time param button the button to set the code grid data code return the code grid data code set on the specified button protected grid data set button layout data button button grid data data new grid data grid data horizontal align fill int width hint convert horizontaldl us to pixels i dialog constants button width point min size button compute size swt default swt default true data width hint math max width hint min size x button set layout data data return data griddata initializedialogunits griddata griddata griddata setbuttonlayoutdata griddata griddata griddata horizontal_align_fill widthhint converthorizontaldlustopixels idialogconstants button_width minsize computesize widthhint widthhint minsize setlayoutdata tests whether this page s ui content has already been created return code true code if the control has been created and code false code if not protected boolean is control created return control null iscontrolcreated this default implementation of an code i dialog page code method does nothing subclasses should override to take some action in response to a help request public void perform help no default help idialogpage performhelp set the control for the receiver param new control protected void set control control new control control new control newcontrol setcontrol newcontrol newcontrol non javadoc method declared on i dialog page public void set description string description this description description idialogpage setdescription sets or clears the error message for this page param new message the message or code null code to clear the error message public void set error message string new message error message new message newmessage seterrormessage newmessage errormessage newmessage public void set image descriptor image descriptor desc image descriptor desc if image null image dispose image null setimagedescriptor imagedescriptor imagedescriptor sets or clears the message for this page p this is a shortcut for code set message new mesasge none code p param new message the message or code null code to clear the message public void set message string new message set message new message none setmessage newmesasge newmessage setmessage newmessage setmessage newmessage sets the message for this page with an indication of what type of message it is p the valid message types are one of code none code code information code code warning code or code error code p p note that for backward compatibility a message of type code error code is different than an error message set using code set error message code an error message overrides the current message until the error message is cleared this method replaces the current message and does not affect the error message p param new message the message or code null code to clear the message param new type the message type since 2 0 public void set message string new message int new type message new message message type new type seterrormessage newmessage newtype setmessage newmessage newtype newmessage messagetype newtype the code dialog page code implementation of this code i dialog page code method remembers the title in an internal state variable subclasses may extend public void set title string title this title title dialogpage idialogpage settitle the code dialog page code implementation of this code i dialog page code method sets the control to the given visibility state subclasses may extend public void set visible boolean visible control set visible visible dialogpage idialogpage setvisible setvisible creates a new empty dialog page protected dialog page no initial behaviour dialogpage creates a new dialog page with the given title param title the title of this dialog page or code null code if none protected dialog page string title this title title dialogpage creates a new dialog page with the given title and image param title the title of this dialog page or code null code if none param image the image for this dialog page or code null code if none protected dialog page string title image descriptor image this title image descriptor image dialogpage imagedescriptor imagedescriptor returns the number of pixels corresponding to the height of the given number of characters p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param chars the number of characters return the number of pixels protected int convert height in chars to pixels int chars test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert height in chars to pixels font metrics chars initializedialogunits convertheightincharstopixels fontmetrics convertheightincharstopixels fontmetrics returns the number of pixels corresponding to the given number of horizontal dialog units p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param dlus the number of horizontal dialog units return the number of pixels protected int convert horizontaldl us to pixels int dlus test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert horizontaldl us to pixels font metrics dlus initializedialogunits converthorizontaldlustopixels fontmetrics converthorizontaldlustopixels fontmetrics returns the number of pixels corresponding to the given number of vertical dialog units p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param dlus the number of vertical dialog units return the number of pixels protected int convert verticaldl us to pixels int dlus test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert verticaldl us to pixels font metrics dlus initializedialogunits convertverticaldlustopixels fontmetrics convertverticaldlustopixels fontmetrics returns the number of pixels corresponding to the width of the given number of characters p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param chars the number of characters return the number of pixels protected int convert width in chars to pixels int chars test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert width in chars to pixels font metrics chars initializedialogunits convertwidthincharstopixels fontmetrics convertwidthincharstopixels fontmetrics the code dialog page code implementation of an code i dialog page code method does nothing subclasses may extend public void dispose deallocate swt resources if image null image dispose image null dialogpage idialogpage returns the top level control for this dialog page return the top level control public control get control return control getcontrol non javadoc method declared on i dialog page public string get description return description idialogpage getdescription returns the symbolic font name used by dialog pages return the symbolic font name protected string get dialog font name return j face resources dialog font getdialogfontname jfaceresources dialog_font non javadoc method declared on i dialog page public string get error message return error message idialogpage geterrormessage errormessage returns the default font to use for this dialog page return the font protected font get font return j face resources get font registry get get dialog font name getfont jfaceresources getfontregistry getdialogfontname public image get image if image null if image descriptor null image image descriptor create image return image getimage imagedescriptor imagedescriptor createimage non javadoc method declared on i dialog page public string get message return message idialogpage getmessage non javadoc method declared on i message provider public int get message type return message type imessageprovider getmessagetype messagetype returns this dialog page s shell convenience method for code get control get shell code this method may only be called after the page s control has been created return the shell public shell get shell return get control get shell getcontrol getshell getshell getcontrol getshell non javadoc method declared on i dialog page public string get title return title idialogpage gettitle returns the tool tip text for the widget with the given id p the default implementation of this framework method does nothing and returns code null code subclasses may override p param widget id the id of the widget for which hover help is requested return the tool tip text or code null code if none deprecated protected final string get tool tip text int widget id return nothing by default return null widgetid gettooltiptext widgetid initializes the computation of horizontal and vertical dialog units based on the size of current font p this method must be called before any of the dialog unit based conversion methods are called p param test control a control from which to obtain the current font protected void initialize dialog units control test control compute and store a font metric gc gc new gc test control gc set font j face resources get dialog font font metrics gc get font metrics gc dispose testcontrol initializedialogunits testcontrol testcontrol setfont jfaceresources getdialogfont fontmetrics getfontmetrics sets the code grid data code on the specified button to be one that is spaced for the current dialog page units the method code initialize dialog units code must be called once before calling this method for the first time param button the button to set the code grid data code return the code grid data code set on the specified button protected grid data set button layout data button button grid data data new grid data grid data horizontal align fill int width hint convert horizontaldl us to pixels i dialog constants button width point min size button compute size swt default swt default true data width hint math max width hint min size x button set layout data data return data griddata initializedialogunits griddata griddata griddata setbuttonlayoutdata griddata griddata griddata horizontal_align_fill widthhint converthorizontaldlustopixels idialogconstants button_width minsize computesize widthhint widthhint minsize setlayoutdata tests whether this page s ui content has already been created return code true code if the control has been created and code false code if not protected boolean is control created return control null iscontrolcreated this default implementation of an code i dialog page code method does nothing subclasses should override to take some action in response to a help request public void perform help no default help idialogpage performhelp set the control for the receiver param new control protected void set control control new control control new control newcontrol setcontrol newcontrol newcontrol non javadoc method declared on i dialog page public void set description string description this description description idialogpage setdescription sets or clears the error message for this page param new message the message or code null code to clear the error message public void set error message string new message error message new message newmessage seterrormessage newmessage errormessage newmessage public void set image descriptor image descriptor desc image descriptor desc if image null image dispose image null setimagedescriptor imagedescriptor imagedescriptor sets or clears the message for this page p this is a shortcut for code set message new mesasge none code p param new message the message or code null code to clear the message public void set message string new message set message new message none setmessage newmesasge newmessage setmessage newmessage setmessage newmessage sets the message for this page with an indication of what type of message it is p the valid message types are one of code none code code information code code warning code or code error code p p note that for backward compatibility a message of type code error code is different than an error message set using code set error message code an error message overrides the current message until the error message is cleared this method replaces the current message and does not affect the error message p param new message the message or code null code to clear the message param new type the message type since 2 0 public void set message string new message int new type message new message message type new type seterrormessage newmessage newtype setmessage newmessage newtype newmessage messagetype newtype the code dialog page code implementation of this code i dialog page code method remembers the title in an internal state variable subclasses may extend public void set title string title this title title dialogpage idialogpage settitle the code dialog page code implementation of this code i dialog page code method sets the control to the given visibility state subclasses may extend public void set visible boolean visible control set visible visible dialogpage idialogpage setvisible setvisible creates a new empty dialog page protected dialog page no initial behaviour dialogpage creates a new dialog page with the given title param title the title of this dialog page or code null code if none protected dialog page string title this title title dialogpage creates a new dialog page with the given title and image param title the title of this dialog page or code null code if none param image the image for this dialog page or code null code if none protected dialog page string title image descriptor image this title image descriptor image dialogpage imagedescriptor imagedescriptor returns the number of pixels corresponding to the height of the given number of characters p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param chars the number of characters return the number of pixels protected int convert height in chars to pixels int chars test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert height in chars to pixels font metrics chars initializedialogunits convertheightincharstopixels fontmetrics convertheightincharstopixels fontmetrics returns the number of pixels corresponding to the given number of horizontal dialog units p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param dlus the number of horizontal dialog units return the number of pixels protected int convert horizontaldl us to pixels int dlus test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert horizontaldl us to pixels font metrics dlus initializedialogunits converthorizontaldlustopixels fontmetrics converthorizontaldlustopixels fontmetrics returns the number of pixels corresponding to the given number of vertical dialog units p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param dlus the number of vertical dialog units return the number of pixels protected int convert verticaldl us to pixels int dlus test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert verticaldl us to pixels font metrics dlus initializedialogunits convertverticaldlustopixels fontmetrics convertverticaldlustopixels fontmetrics returns the number of pixels corresponding to the width of the given number of characters p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param chars the number of characters return the number of pixels protected int convert width in chars to pixels int chars test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert width in chars to pixels font metrics chars initializedialogunits convertwidthincharstopixels fontmetrics convertwidthincharstopixels fontmetrics the code dialog page code implementation of an code i dialog page code method does nothing subclasses may extend public void dispose deallocate swt resources if image null image dispose image null dialogpage idialogpage returns the top level control for this dialog page return the top level control public control get control return control getcontrol non javadoc method declared on i dialog page public string get description return description idialogpage getdescription returns the symbolic font name used by dialog pages return the symbolic font name protected string get dialog font name return j face resources dialog font getdialogfontname jfaceresources dialog_font non javadoc method declared on i dialog page public string get error message return error message idialogpage geterrormessage errormessage returns the default font to use for this dialog page return the font protected font get font return j face resources get font registry get get dialog font name getfont jfaceresources getfontregistry getdialogfontname public image get image if image null if image descriptor null image image descriptor create image return image getimage imagedescriptor imagedescriptor createimage non javadoc method declared on i dialog page public string get message return message idialogpage getmessage non javadoc method declared on i message provider public int get message type return message type imessageprovider getmessagetype messagetype returns this dialog page s shell convenience method for code get control get shell code this method may only be called after the page s control has been created return the shell public shell get shell return get control get shell getcontrol getshell getshell getcontrol getshell non javadoc method declared on i dialog page public string get title return title idialogpage gettitle returns the tool tip text for the widget with the given id p the default implementation of this framework method does nothing and returns code null code subclasses may override p param widget id the id of the widget for which hover help is requested return the tool tip text or code null code if none deprecated protected final string get tool tip text int widget id return nothing by default return null widgetid gettooltiptext widgetid initializes the computation of horizontal and vertical dialog units based on the size of current font p this method must be called before any of the dialog unit based conversion methods are called p param test control a control from which to obtain the current font protected void initialize dialog units control test control compute and store a font metric gc gc new gc test control gc set font j face resources get dialog font font metrics gc get font metrics gc dispose testcontrol initializedialogunits testcontrol testcontrol setfont jfaceresources getdialogfont fontmetrics getfontmetrics sets the code grid data code on the specified button to be one that is spaced for the current dialog page units the method code initialize dialog units code must be called once before calling this method for the first time param button the button to set the code grid data code return the code grid data code set on the specified button protected grid data set button layout data button button grid data data new grid data grid data horizontal align fill int width hint convert horizontaldl us to pixels i dialog constants button width point min size button compute size swt default swt default true data width hint math max width hint min size x button set layout data data return data griddata initializedialogunits griddata griddata griddata setbuttonlayoutdata griddata griddata griddata horizontal_align_fill widthhint converthorizontaldlustopixels idialogconstants button_width minsize computesize widthhint widthhint minsize setlayoutdata tests whether this page s ui content has already been created return code true code if the control has been created and code false code if not protected boolean is control created return control null iscontrolcreated this default implementation of an code i dialog page code method does nothing subclasses should override to take some action in response to a help request public void perform help no default help idialogpage performhelp set the control for the receiver param new control protected void set control control new control control new control newcontrol setcontrol newcontrol newcontrol non javadoc method declared on i dialog page public void set description string description this description description idialogpage setdescription sets or clears the error message for this page param new message the message or code null code to clear the error message public void set error message string new message error message new message newmessage seterrormessage newmessage errormessage newmessage public void set image descriptor image descriptor desc image descriptor desc if image null image dispose image null setimagedescriptor imagedescriptor imagedescriptor sets or clears the message for this page p this is a shortcut for code set message new mesasge none code p param new message the message or code null code to clear the message public void set message string new message set message new message none setmessage newmesasge newmessage setmessage newmessage setmessage newmessage sets the message for this page with an indication of what type of message it is p the valid message types are one of code none code code information code code warning code or code error code p p note that for backward compatibility a message of type code error code is different than an error message set using code set error message code an error message overrides the current message until the error message is cleared this method replaces the current message and does not affect the error message p param new message the message or code null code to clear the message param new type the message type since 2 0 public void set message string new message int new type message new message message type new type seterrormessage newmessage newtype setmessage newmessage newtype newmessage messagetype newtype the code dialog page code implementation of this code i dialog page code method remembers the title in an internal state variable subclasses may extend public void set title string title this title title dialogpage idialogpage settitle the code dialog page code implementation of this code i dialog page code method sets the control to the given visibility state subclasses may extend public void set visible boolean visible control set visible visible dialogpage idialogpage setvisible setvisible creates a new empty dialog page protected dialog page no initial behaviour dialogpage creates a new dialog page with the given title param title the title of this dialog page or code null code if none protected dialog page string title this title title dialogpage creates a new dialog page with the given title and image param title the title of this dialog page or code null code if none param image the image for this dialog page or code null code if none protected dialog page string title image descriptor image this title image descriptor image dialogpage imagedescriptor imagedescriptor returns the number of pixels corresponding to the height of the given number of characters p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param chars the number of characters return the number of pixels protected int convert height in chars to pixels int chars test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert height in chars to pixels font metrics chars initializedialogunits convertheightincharstopixels fontmetrics convertheightincharstopixels fontmetrics returns the number of pixels corresponding to the given number of horizontal dialog units p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param dlus the number of horizontal dialog units return the number of pixels protected int convert horizontaldl us to pixels int dlus test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert horizontaldl us to pixels font metrics dlus initializedialogunits converthorizontaldlustopixels fontmetrics converthorizontaldlustopixels fontmetrics returns the number of pixels corresponding to the given number of vertical dialog units p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param dlus the number of vertical dialog units return the number of pixels protected int convert verticaldl us to pixels int dlus test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert verticaldl us to pixels font metrics dlus initializedialogunits convertverticaldlustopixels fontmetrics convertverticaldlustopixels fontmetrics returns the number of pixels corresponding to the width of the given number of characters p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param chars the number of characters return the number of pixels protected int convert width in chars to pixels int chars test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert width in chars to pixels font metrics chars initializedialogunits convertwidthincharstopixels fontmetrics convertwidthincharstopixels fontmetrics the code dialog page code implementation of an code i dialog page code method does nothing subclasses may extend public void dispose deallocate swt resources if image null image dispose image null dialogpage idialogpage returns the top level control for this dialog page return the top level control public control get control return control getcontrol non javadoc method declared on i dialog page public string get description return description idialogpage getdescription returns the symbolic font name used by dialog pages return the symbolic font name protected string get dialog font name return j face resources dialog font getdialogfontname jfaceresources dialog_font non javadoc method declared on i dialog page public string get error message return error message idialogpage geterrormessage errormessage returns the default font to use for this dialog page return the font protected font get font return j face resources get font registry get get dialog font name getfont jfaceresources getfontregistry getdialogfontname public image get image if image null if image descriptor null image image descriptor create image return image getimage imagedescriptor imagedescriptor createimage non javadoc method declared on i dialog page public string get message return message idialogpage getmessage non javadoc method declared on i message provider public int get message type return message type imessageprovider getmessagetype messagetype returns this dialog page s shell convenience method for code get control get shell code this method may only be called after the page s control has been created return the shell public shell get shell return get control get shell getcontrol getshell getshell getcontrol getshell non javadoc method declared on i dialog page public string get title return title idialogpage gettitle returns the tool tip text for the widget with the given id p the default implementation of this framework method does nothing and returns code null code subclasses may override p param widget id the id of the widget for which hover help is requested return the tool tip text or code null code if none deprecated protected final string get tool tip text int widget id return nothing by default return null widgetid gettooltiptext widgetid initializes the computation of horizontal and vertical dialog units based on the size of current font p this method must be called before any of the dialog unit based conversion methods are called p param test control a control from which to obtain the current font protected void initialize dialog units control test control compute and store a font metric gc gc new gc test control gc set font j face resources get dialog font font metrics gc get font metrics gc dispose testcontrol initializedialogunits testcontrol testcontrol setfont jfaceresources getdialogfont fontmetrics getfontmetrics sets the code grid data code on the specified button to be one that is spaced for the current dialog page units the method code initialize dialog units code must be called once before calling this method for the first time param button the button to set the code grid data code return the code grid data code set on the specified button protected grid data set button layout data button button grid data data new grid data grid data horizontal align fill int width hint convert horizontaldl us to pixels i dialog constants button width point min size button compute size swt default swt default true data width hint math max width hint min size x button set layout data data return data griddata initializedialogunits griddata griddata griddata setbuttonlayoutdata griddata griddata griddata horizontal_align_fill widthhint converthorizontaldlustopixels idialogconstants button_width minsize computesize widthhint widthhint minsize setlayoutdata tests whether this page s ui content has already been created return code true code if the control has been created and code false code if not protected boolean is control created return control null iscontrolcreated this default implementation of an code i dialog page code method does nothing subclasses should override to take some action in response to a help request public void perform help no default help idialogpage performhelp set the control for the receiver param new control protected void set control control new control control new control newcontrol setcontrol newcontrol newcontrol non javadoc method declared on i dialog page public void set description string description this description description idialogpage setdescription sets or clears the error message for this page param new message the message or code null code to clear the error message public void set error message string new message error message new message newmessage seterrormessage newmessage errormessage newmessage public void set image descriptor image descriptor desc image descriptor desc if image null image dispose image null setimagedescriptor imagedescriptor imagedescriptor sets or clears the message for this page p this is a shortcut for code set message new mesasge none code p param new message the message or code null code to clear the message public void set message string new message set message new message none setmessage newmesasge newmessage setmessage newmessage setmessage newmessage sets the message for this page with an indication of what type of message it is p the valid message types are one of code none code code information code code warning code or code error code p p note that for backward compatibility a message of type code error code is different than an error message set using code set error message code an error message overrides the current message until the error message is cleared this method replaces the current message and does not affect the error message p param new message the message or code null code to clear the message param new type the message type since 2 0 public void set message string new message int new type message new message message type new type seterrormessage newmessage newtype setmessage newmessage newtype newmessage messagetype newtype the code dialog page code implementation of this code i dialog page code method remembers the title in an internal state variable subclasses may extend public void set title string title this title title dialogpage idialogpage settitle the code dialog page code implementation of this code i dialog page code method sets the control to the given visibility state subclasses may extend public void set visible boolean visible control set visible visible dialogpage idialogpage setvisible setvisible creates a new empty dialog page protected dialog page no initial behaviour dialogpage creates a new dialog page with the given title param title the title of this dialog page or code null code if none protected dialog page string title this title title dialogpage creates a new dialog page with the given title and image param title the title of this dialog page or code null code if none param image the image for this dialog page or code null code if none protected dialog page string title image descriptor image this title image descriptor image dialogpage imagedescriptor imagedescriptor returns the number of pixels corresponding to the height of the given number of characters p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param chars the number of characters return the number of pixels protected int convert height in chars to pixels int chars test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert height in chars to pixels font metrics chars initializedialogunits convertheightincharstopixels fontmetrics convertheightincharstopixels fontmetrics returns the number of pixels corresponding to the given number of horizontal dialog units p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param dlus the number of horizontal dialog units return the number of pixels protected int convert horizontaldl us to pixels int dlus test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert horizontaldl us to pixels font metrics dlus initializedialogunits converthorizontaldlustopixels fontmetrics converthorizontaldlustopixels fontmetrics returns the number of pixels corresponding to the given number of vertical dialog units p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param dlus the number of vertical dialog units return the number of pixels protected int convert verticaldl us to pixels int dlus test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert verticaldl us to pixels font metrics dlus initializedialogunits convertverticaldlustopixels fontmetrics convertverticaldlustopixels fontmetrics returns the number of pixels corresponding to the width of the given number of characters p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param chars the number of characters return the number of pixels protected int convert width in chars to pixels int chars test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert width in chars to pixels font metrics chars initializedialogunits convertwidthincharstopixels fontmetrics convertwidthincharstopixels fontmetrics the code dialog page code implementation of an code i dialog page code method does nothing subclasses may extend public void dispose deallocate swt resources if image null image dispose image null dialogpage idialogpage returns the top level control for this dialog page return the top level control public control get control return control getcontrol non javadoc method declared on i dialog page public string get description return description idialogpage getdescription returns the symbolic font name used by dialog pages return the symbolic font name protected string get dialog font name return j face resources dialog font getdialogfontname jfaceresources dialog_font non javadoc method declared on i dialog page public string get error message return error message idialogpage geterrormessage errormessage returns the default font to use for this dialog page return the font protected font get font return j face resources get font registry get get dialog font name getfont jfaceresources getfontregistry getdialogfontname public image get image if image null if image descriptor null image image descriptor create image return image getimage imagedescriptor imagedescriptor createimage non javadoc method declared on i dialog page public string get message return message idialogpage getmessage non javadoc method declared on i message provider public int get message type return message type imessageprovider getmessagetype messagetype returns this dialog page s shell convenience method for code get control get shell code this method may only be called after the page s control has been created return the shell public shell get shell return get control get shell getcontrol getshell getshell getcontrol getshell non javadoc method declared on i dialog page public string get title return title idialogpage gettitle returns the tool tip text for the widget with the given id p the default implementation of this framework method does nothing and returns code null code subclasses may override p param widget id the id of the widget for which hover help is requested return the tool tip text or code null code if none deprecated protected final string get tool tip text int widget id return nothing by default return null widgetid gettooltiptext widgetid initializes the computation of horizontal and vertical dialog units based on the size of current font p this method must be called before any of the dialog unit based conversion methods are called p param test control a control from which to obtain the current font protected void initialize dialog units control test control compute and store a font metric gc gc new gc test control gc set font j face resources get dialog font font metrics gc get font metrics gc dispose testcontrol initializedialogunits testcontrol testcontrol setfont jfaceresources getdialogfont fontmetrics getfontmetrics sets the code grid data code on the specified button to be one that is spaced for the current dialog page units the method code initialize dialog units code must be called once before calling this method for the first time param button the button to set the code grid data code return the code grid data code set on the specified button protected grid data set button layout data button button grid data data new grid data grid data horizontal align fill int width hint convert horizontaldl us to pixels i dialog constants button width point min size button compute size swt default swt default true data width hint math max width hint min size x button set layout data data return data griddata initializedialogunits griddata griddata griddata setbuttonlayoutdata griddata griddata griddata horizontal_align_fill widthhint converthorizontaldlustopixels idialogconstants button_width minsize computesize widthhint widthhint minsize setlayoutdata tests whether this page s ui content has already been created return code true code if the control has been created and code false code if not protected boolean is control created return control null iscontrolcreated this default implementation of an code i dialog page code method does nothing subclasses should override to take some action in response to a help request public void perform help no default help idialogpage performhelp set the control for the receiver param new control protected void set control control new control control new control newcontrol setcontrol newcontrol newcontrol non javadoc method declared on i dialog page public void set description string description this description description idialogpage setdescription sets or clears the error message for this page param new message the message or code null code to clear the error message public void set error message string new message error message new message newmessage seterrormessage newmessage errormessage newmessage public void set image descriptor image descriptor desc image descriptor desc if image null image dispose image null setimagedescriptor imagedescriptor imagedescriptor sets or clears the message for this page p this is a shortcut for code set message new mesasge none code p param new message the message or code null code to clear the message public void set message string new message set message new message none setmessage newmesasge newmessage setmessage newmessage setmessage newmessage sets the message for this page with an indication of what type of message it is p the valid message types are one of code none code code information code code warning code or code error code p p note that for backward compatibility a message of type code error code is different than an error message set using code set error message code an error message overrides the current message until the error message is cleared this method replaces the current message and does not affect the error message p param new message the message or code null code to clear the message param new type the message type since 2 0 public void set message string new message int new type message new message message type new type seterrormessage newmessage newtype setmessage newmessage newtype newmessage messagetype newtype the code dialog page code implementation of this code i dialog page code method remembers the title in an internal state variable subclasses may extend public void set title string title this title title dialogpage idialogpage settitle the code dialog page code implementation of this code i dialog page code method sets the control to the given visibility state subclasses may extend public void set visible boolean visible control set visible visible dialogpage idialogpage setvisible setvisible creates a new empty dialog page protected dialog page no initial behaviour dialogpage creates a new dialog page with the given title param title the title of this dialog page or code null code if none protected dialog page string title this title title dialogpage creates a new dialog page with the given title and image param title the title of this dialog page or code null code if none param image the image for this dialog page or code null code if none protected dialog page string title image descriptor image this title image descriptor image dialogpage imagedescriptor imagedescriptor returns the number of pixels corresponding to the height of the given number of characters p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param chars the number of characters return the number of pixels protected int convert height in chars to pixels int chars test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert height in chars to pixels font metrics chars initializedialogunits convertheightincharstopixels fontmetrics convertheightincharstopixels fontmetrics returns the number of pixels corresponding to the given number of horizontal dialog units p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param dlus the number of horizontal dialog units return the number of pixels protected int convert horizontaldl us to pixels int dlus test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert horizontaldl us to pixels font metrics dlus initializedialogunits converthorizontaldlustopixels fontmetrics converthorizontaldlustopixels fontmetrics returns the number of pixels corresponding to the given number of vertical dialog units p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param dlus the number of vertical dialog units return the number of pixels protected int convert verticaldl us to pixels int dlus test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert verticaldl us to pixels font metrics dlus initializedialogunits convertverticaldlustopixels fontmetrics convertverticaldlustopixels fontmetrics returns the number of pixels corresponding to the width of the given number of characters p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param chars the number of characters return the number of pixels protected int convert width in chars to pixels int chars test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert width in chars to pixels font metrics chars initializedialogunits convertwidthincharstopixels fontmetrics convertwidthincharstopixels fontmetrics the code dialog page code implementation of an code i dialog page code method does nothing subclasses may extend public void dispose deallocate swt resources if image null image dispose image null dialogpage idialogpage returns the top level control for this dialog page return the top level control public control get control return control getcontrol non javadoc method declared on i dialog page public string get description return description idialogpage getdescription returns the symbolic font name used by dialog pages return the symbolic font name protected string get dialog font name return j face resources dialog font getdialogfontname jfaceresources dialog_font non javadoc method declared on i dialog page public string get error message return error message idialogpage geterrormessage errormessage returns the default font to use for this dialog page return the font protected font get font return j face resources get font registry get get dialog font name getfont jfaceresources getfontregistry getdialogfontname public image get image if image null if image descriptor null image image descriptor create image return image getimage imagedescriptor imagedescriptor createimage non javadoc method declared on i dialog page public string get message return message idialogpage getmessage non javadoc method declared on i message provider public int get message type return message type imessageprovider getmessagetype messagetype returns this dialog page s shell convenience method for code get control get shell code this method may only be called after the page s control has been created return the shell public shell get shell return get control get shell getcontrol getshell getshell getcontrol getshell non javadoc method declared on i dialog page public string get title return title idialogpage gettitle returns the tool tip text for the widget with the given id p the default implementation of this framework method does nothing and returns code null code subclasses may override p param widget id the id of the widget for which hover help is requested return the tool tip text or code null code if none deprecated protected final string get tool tip text int widget id return nothing by default return null widgetid gettooltiptext widgetid initializes the computation of horizontal and vertical dialog units based on the size of current font p this method must be called before any of the dialog unit based conversion methods are called p param test control a control from which to obtain the current font protected void initialize dialog units control test control compute and store a font metric gc gc new gc test control gc set font j face resources get dialog font font metrics gc get font metrics gc dispose testcontrol initializedialogunits testcontrol testcontrol setfont jfaceresources getdialogfont fontmetrics getfontmetrics sets the code grid data code on the specified button to be one that is spaced for the current dialog page units the method code initialize dialog units code must be called once before calling this method for the first time param button the button to set the code grid data code return the code grid data code set on the specified button protected grid data set button layout data button button grid data data new grid data grid data horizontal align fill int width hint convert horizontaldl us to pixels i dialog constants button width point min size button compute size swt default swt default true data width hint math max width hint min size x button set layout data data return data griddata initializedialogunits griddata griddata griddata setbuttonlayoutdata griddata griddata griddata horizontal_align_fill widthhint converthorizontaldlustopixels idialogconstants button_width minsize computesize widthhint widthhint minsize setlayoutdata tests whether this page s ui content has already been created return code true code if the control has been created and code false code if not protected boolean is control created return control null iscontrolcreated this default implementation of an code i dialog page code method does nothing subclasses should override to take some action in response to a help request public void perform help no default help idialogpage performhelp set the control for the receiver param new control protected void set control control new control control new control newcontrol setcontrol newcontrol newcontrol non javadoc method declared on i dialog page public void set description string description this description description idialogpage setdescription sets or clears the error message for this page param new message the message or code null code to clear the error message public void set error message string new message error message new message newmessage seterrormessage newmessage errormessage newmessage public void set image descriptor image descriptor desc image descriptor desc if image null image dispose image null setimagedescriptor imagedescriptor imagedescriptor sets or clears the message for this page p this is a shortcut for code set message new mesasge none code p param new message the message or code null code to clear the message public void set message string new message set message new message none setmessage newmesasge newmessage setmessage newmessage setmessage newmessage sets the message for this page with an indication of what type of message it is p the valid message types are one of code none code code information code code warning code or code error code p p note that for backward compatibility a message of type code error code is different than an error message set using code set error message code an error message overrides the current message until the error message is cleared this method replaces the current message and does not affect the error message p param new message the message or code null code to clear the message param new type the message type since 2 0 public void set message string new message int new type message new message message type new type seterrormessage newmessage newtype setmessage newmessage newtype newmessage messagetype newtype the code dialog page code implementation of this code i dialog page code method remembers the title in an internal state variable subclasses may extend public void set title string title this title title dialogpage idialogpage settitle the code dialog page code implementation of this code i dialog page code method sets the control to the given visibility state subclasses may extend public void set visible boolean visible control set visible visible dialogpage idialogpage setvisible setvisible creates a new empty dialog page protected dialog page no initial behaviour dialogpage creates a new dialog page with the given title param title the title of this dialog page or code null code if none protected dialog page string title this title title dialogpage creates a new dialog page with the given title and image param title the title of this dialog page or code null code if none param image the image for this dialog page or code null code if none protected dialog page string title image descriptor image this title image descriptor image dialogpage imagedescriptor imagedescriptor returns the number of pixels corresponding to the height of the given number of characters p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param chars the number of characters return the number of pixels protected int convert height in chars to pixels int chars test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert height in chars to pixels font metrics chars initializedialogunits convertheightincharstopixels fontmetrics convertheightincharstopixels fontmetrics returns the number of pixels corresponding to the given number of horizontal dialog units p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param dlus the number of horizontal dialog units return the number of pixels protected int convert horizontaldl us to pixels int dlus test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert horizontaldl us to pixels font metrics dlus initializedialogunits converthorizontaldlustopixels fontmetrics converthorizontaldlustopixels fontmetrics returns the number of pixels corresponding to the given number of vertical dialog units p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param dlus the number of vertical dialog units return the number of pixels protected int convert verticaldl us to pixels int dlus test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert verticaldl us to pixels font metrics dlus initializedialogunits convertverticaldlustopixels fontmetrics convertverticaldlustopixels fontmetrics returns the number of pixels corresponding to the width of the given number of characters p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param chars the number of characters return the number of pixels protected int convert width in chars to pixels int chars test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert width in chars to pixels font metrics chars initializedialogunits convertwidthincharstopixels fontmetrics convertwidthincharstopixels fontmetrics the code dialog page code implementation of an code i dialog page code method does nothing subclasses may extend public void dispose deallocate swt resources if image null image dispose image null dialogpage idialogpage returns the top level control for this dialog page return the top level control public control get control return control getcontrol non javadoc method declared on i dialog page public string get description return description idialogpage getdescription returns the symbolic font name used by dialog pages return the symbolic font name protected string get dialog font name return j face resources dialog font getdialogfontname jfaceresources dialog_font non javadoc method declared on i dialog page public string get error message return error message idialogpage geterrormessage errormessage returns the default font to use for this dialog page return the font protected font get font return j face resources get font registry get get dialog font name getfont jfaceresources getfontregistry getdialogfontname public image get image if image null if image descriptor null image image descriptor create image return image getimage imagedescriptor imagedescriptor createimage non javadoc method declared on i dialog page public string get message return message idialogpage getmessage non javadoc method declared on i message provider public int get message type return message type imessageprovider getmessagetype messagetype returns this dialog page s shell convenience method for code get control get shell code this method may only be called after the page s control has been created return the shell public shell get shell return get control get shell getcontrol getshell getshell getcontrol getshell non javadoc method declared on i dialog page public string get title return title idialogpage gettitle returns the tool tip text for the widget with the given id p the default implementation of this framework method does nothing and returns code null code subclasses may override p param widget id the id of the widget for which hover help is requested return the tool tip text or code null code if none deprecated protected final string get tool tip text int widget id return nothing by default return null widgetid gettooltiptext widgetid initializes the computation of horizontal and vertical dialog units based on the size of current font p this method must be called before any of the dialog unit based conversion methods are called p param test control a control from which to obtain the current font protected void initialize dialog units control test control compute and store a font metric gc gc new gc test control gc set font j face resources get dialog font font metrics gc get font metrics gc dispose testcontrol initializedialogunits testcontrol testcontrol setfont jfaceresources getdialogfont fontmetrics getfontmetrics sets the code grid data code on the specified button to be one that is spaced for the current dialog page units the method code initialize dialog units code must be called once before calling this method for the first time param button the button to set the code grid data code return the code grid data code set on the specified button protected grid data set button layout data button button grid data data new grid data grid data horizontal align fill int width hint convert horizontaldl us to pixels i dialog constants button width point min size button compute size swt default swt default true data width hint math max width hint min size x button set layout data data return data griddata initializedialogunits griddata griddata griddata setbuttonlayoutdata griddata griddata griddata horizontal_align_fill widthhint converthorizontaldlustopixels idialogconstants button_width minsize computesize widthhint widthhint minsize setlayoutdata tests whether this page s ui content has already been created return code true code if the control has been created and code false code if not protected boolean is control created return control null iscontrolcreated this default implementation of an code i dialog page code method does nothing subclasses should override to take some action in response to a help request public void perform help no default help idialogpage performhelp set the control for the receiver param new control protected void set control control new control control new control newcontrol setcontrol newcontrol newcontrol non javadoc method declared on i dialog page public void set description string description this description description idialogpage setdescription sets or clears the error message for this page param new message the message or code null code to clear the error message public void set error message string new message error message new message newmessage seterrormessage newmessage errormessage newmessage public void set image descriptor image descriptor desc image descriptor desc if image null image dispose image null setimagedescriptor imagedescriptor imagedescriptor sets or clears the message for this page p this is a shortcut for code set message new mesasge none code p param new message the message or code null code to clear the message public void set message string new message set message new message none setmessage newmesasge newmessage setmessage newmessage setmessage newmessage sets the message for this page with an indication of what type of message it is p the valid message types are one of code none code code information code code warning code or code error code p p note that for backward compatibility a message of type code error code is different than an error message set using code set error message code an error message overrides the current message until the error message is cleared this method replaces the current message and does not affect the error message p param new message the message or code null code to clear the message param new type the message type since 2 0 public void set message string new message int new type message new message message type new type seterrormessage newmessage newtype setmessage newmessage newtype newmessage messagetype newtype the code dialog page code implementation of this code i dialog page code method remembers the title in an internal state variable subclasses may extend public void set title string title this title title dialogpage idialogpage settitle the code dialog page code implementation of this code i dialog page code method sets the control to the given visibility state subclasses may extend public void set visible boolean visible control set visible visible dialogpage idialogpage setvisible setvisible creates a new empty dialog page protected dialog page no initial behaviour dialogpage creates a new dialog page with the given title param title the title of this dialog page or code null code if none protected dialog page string title this title title dialogpage creates a new dialog page with the given title and image param title the title of this dialog page or code null code if none param image the image for this dialog page or code null code if none protected dialog page string title image descriptor image this title image descriptor image dialogpage imagedescriptor imagedescriptor returns the number of pixels corresponding to the height of the given number of characters p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param chars the number of characters return the number of pixels protected int convert height in chars to pixels int chars test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert height in chars to pixels font metrics chars initializedialogunits convertheightincharstopixels fontmetrics convertheightincharstopixels fontmetrics returns the number of pixels corresponding to the given number of horizontal dialog units p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param dlus the number of horizontal dialog units return the number of pixels protected int convert horizontaldl us to pixels int dlus test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert horizontaldl us to pixels font metrics dlus initializedialogunits converthorizontaldlustopixels fontmetrics converthorizontaldlustopixels fontmetrics returns the number of pixels corresponding to the given number of vertical dialog units p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param dlus the number of vertical dialog units return the number of pixels protected int convert verticaldl us to pixels int dlus test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert verticaldl us to pixels font metrics dlus initializedialogunits convertverticaldlustopixels fontmetrics convertverticaldlustopixels fontmetrics returns the number of pixels corresponding to the width of the given number of characters p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param chars the number of characters return the number of pixels protected int convert width in chars to pixels int chars test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert width in chars to pixels font metrics chars initializedialogunits convertwidthincharstopixels fontmetrics convertwidthincharstopixels fontmetrics the code dialog page code implementation of an code i dialog page code method does nothing subclasses may extend public void dispose deallocate swt resources if image null image dispose image null dialogpage idialogpage returns the top level control for this dialog page return the top level control public control get control return control getcontrol non javadoc method declared on i dialog page public string get description return description idialogpage getdescription returns the symbolic font name used by dialog pages return the symbolic font name protected string get dialog font name return j face resources dialog font getdialogfontname jfaceresources dialog_font non javadoc method declared on i dialog page public string get error message return error message idialogpage geterrormessage errormessage returns the default font to use for this dialog page return the font protected font get font return j face resources get font registry get get dialog font name getfont jfaceresources getfontregistry getdialogfontname public image get image if image null if image descriptor null image image descriptor create image return image getimage imagedescriptor imagedescriptor createimage non javadoc method declared on i dialog page public string get message return message idialogpage getmessage non javadoc method declared on i message provider public int get message type return message type imessageprovider getmessagetype messagetype returns this dialog page s shell convenience method for code get control get shell code this method may only be called after the page s control has been created return the shell public shell get shell return get control get shell getcontrol getshell getshell getcontrol getshell non javadoc method declared on i dialog page public string get title return title idialogpage gettitle returns the tool tip text for the widget with the given id p the default implementation of this framework method does nothing and returns code null code subclasses may override p param widget id the id of the widget for which hover help is requested return the tool tip text or code null code if none deprecated protected final string get tool tip text int widget id return nothing by default return null widgetid gettooltiptext widgetid initializes the computation of horizontal and vertical dialog units based on the size of current font p this method must be called before any of the dialog unit based conversion methods are called p param test control a control from which to obtain the current font protected void initialize dialog units control test control compute and store a font metric gc gc new gc test control gc set font j face resources get dialog font font metrics gc get font metrics gc dispose testcontrol initializedialogunits testcontrol testcontrol setfont jfaceresources getdialogfont fontmetrics getfontmetrics sets the code grid data code on the specified button to be one that is spaced for the current dialog page units the method code initialize dialog units code must be called once before calling this method for the first time param button the button to set the code grid data code return the code grid data code set on the specified button protected grid data set button layout data button button grid data data new grid data grid data horizontal align fill int width hint convert horizontaldl us to pixels i dialog constants button width point min size button compute size swt default swt default true data width hint math max width hint min size x button set layout data data return data griddata initializedialogunits griddata griddata griddata setbuttonlayoutdata griddata griddata griddata horizontal_align_fill widthhint converthorizontaldlustopixels idialogconstants button_width minsize computesize widthhint widthhint minsize setlayoutdata tests whether this page s ui content has already been created return code true code if the control has been created and code false code if not protected boolean is control created return control null iscontrolcreated this default implementation of an code i dialog page code method does nothing subclasses should override to take some action in response to a help request public void perform help no default help idialogpage performhelp set the control for the receiver param new control protected void set control control new control control new control newcontrol setcontrol newcontrol newcontrol non javadoc method declared on i dialog page public void set description string description this description description idialogpage setdescription sets or clears the error message for this page param new message the message or code null code to clear the error message public void set error message string new message error message new message newmessage seterrormessage newmessage errormessage newmessage public void set image descriptor image descriptor desc image descriptor desc if image null image dispose image null setimagedescriptor imagedescriptor imagedescriptor sets or clears the message for this page p this is a shortcut for code set message new mesasge none code p param new message the message or code null code to clear the message public void set message string new message set message new message none setmessage newmesasge newmessage setmessage newmessage setmessage newmessage sets the message for this page with an indication of what type of message it is p the valid message types are one of code none code code information code code warning code or code error code p p note that for backward compatibility a message of type code error code is different than an error message set using code set error message code an error message overrides the current message until the error message is cleared this method replaces the current message and does not affect the error message p param new message the message or code null code to clear the message param new type the message type since 2 0 public void set message string new message int new type message new message message type new type seterrormessage newmessage newtype setmessage newmessage newtype newmessage messagetype newtype the code dialog page code implementation of this code i dialog page code method remembers the title in an internal state variable subclasses may extend public void set title string title this title title dialogpage idialogpage settitle the code dialog page code implementation of this code i dialog page code method sets the control to the given visibility state subclasses may extend public void set visible boolean visible control set visible visible dialogpage idialogpage setvisible setvisible creates a new empty dialog page protected dialog page no initial behaviour dialogpage creates a new dialog page with the given title param title the title of this dialog page or code null code if none protected dialog page string title this title title dialogpage creates a new dialog page with the given title and image param title the title of this dialog page or code null code if none param image the image for this dialog page or code null code if none protected dialog page string title image descriptor image this title image descriptor image dialogpage imagedescriptor imagedescriptor returns the number of pixels corresponding to the height of the given number of characters p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param chars the number of characters return the number of pixels protected int convert height in chars to pixels int chars test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert height in chars to pixels font metrics chars initializedialogunits convertheightincharstopixels fontmetrics convertheightincharstopixels fontmetrics returns the number of pixels corresponding to the given number of horizontal dialog units p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param dlus the number of horizontal dialog units return the number of pixels protected int convert horizontaldl us to pixels int dlus test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert horizontaldl us to pixels font metrics dlus initializedialogunits converthorizontaldlustopixels fontmetrics converthorizontaldlustopixels fontmetrics returns the number of pixels corresponding to the given number of vertical dialog units p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param dlus the number of vertical dialog units return the number of pixels protected int convert verticaldl us to pixels int dlus test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert verticaldl us to pixels font metrics dlus initializedialogunits convertverticaldlustopixels fontmetrics convertverticaldlustopixels fontmetrics returns the number of pixels corresponding to the width of the given number of characters p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param chars the number of characters return the number of pixels protected int convert width in chars to pixels int chars test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert width in chars to pixels font metrics chars initializedialogunits convertwidthincharstopixels fontmetrics convertwidthincharstopixels fontmetrics the code dialog page code implementation of an code i dialog page code method does nothing subclasses may extend public void dispose deallocate swt resources if image null image dispose image null dialogpage idialogpage returns the top level control for this dialog page return the top level control public control get control return control getcontrol non javadoc method declared on i dialog page public string get description return description idialogpage getdescription returns the symbolic font name used by dialog pages return the symbolic font name protected string get dialog font name return j face resources dialog font getdialogfontname jfaceresources dialog_font non javadoc method declared on i dialog page public string get error message return error message idialogpage geterrormessage errormessage returns the default font to use for this dialog page return the font protected font get font return j face resources get font registry get get dialog font name getfont jfaceresources getfontregistry getdialogfontname public image get image if image null if image descriptor null image image descriptor create image return image getimage imagedescriptor imagedescriptor createimage non javadoc method declared on i dialog page public string get message return message idialogpage getmessage non javadoc method declared on i message provider public int get message type return message type imessageprovider getmessagetype messagetype returns this dialog page s shell convenience method for code get control get shell code this method may only be called after the page s control has been created return the shell public shell get shell return get control get shell getcontrol getshell getshell getcontrol getshell non javadoc method declared on i dialog page public string get title return title idialogpage gettitle returns the tool tip text for the widget with the given id p the default implementation of this framework method does nothing and returns code null code subclasses may override p param widget id the id of the widget for which hover help is requested return the tool tip text or code null code if none deprecated protected final string get tool tip text int widget id return nothing by default return null widgetid gettooltiptext widgetid initializes the computation of horizontal and vertical dialog units based on the size of current font p this method must be called before any of the dialog unit based conversion methods are called p param test control a control from which to obtain the current font protected void initialize dialog units control test control compute and store a font metric gc gc new gc test control gc set font j face resources get dialog font font metrics gc get font metrics gc dispose testcontrol initializedialogunits testcontrol testcontrol setfont jfaceresources getdialogfont fontmetrics getfontmetrics sets the code grid data code on the specified button to be one that is spaced for the current dialog page units the method code initialize dialog units code must be called once before calling this method for the first time param button the button to set the code grid data code return the code grid data code set on the specified button protected grid data set button layout data button button grid data data new grid data grid data horizontal align fill int width hint convert horizontaldl us to pixels i dialog constants button width point min size button compute size swt default swt default true data width hint math max width hint min size x button set layout data data return data griddata initializedialogunits griddata griddata griddata setbuttonlayoutdata griddata griddata griddata horizontal_align_fill widthhint converthorizontaldlustopixels idialogconstants button_width minsize computesize widthhint widthhint minsize setlayoutdata tests whether this page s ui content has already been created return code true code if the control has been created and code false code if not protected boolean is control created return control null iscontrolcreated this default implementation of an code i dialog page code method does nothing subclasses should override to take some action in response to a help request public void perform help no default help idialogpage performhelp set the control for the receiver param new control protected void set control control new control control new control newcontrol setcontrol newcontrol newcontrol non javadoc method declared on i dialog page public void set description string description this description description idialogpage setdescription sets or clears the error message for this page param new message the message or code null code to clear the error message public void set error message string new message error message new message newmessage seterrormessage newmessage errormessage newmessage public void set image descriptor image descriptor desc image descriptor desc if image null image dispose image null setimagedescriptor imagedescriptor imagedescriptor sets or clears the message for this page p this is a shortcut for code set message new mesasge none code p param new message the message or code null code to clear the message public void set message string new message set message new message none setmessage newmesasge newmessage setmessage newmessage setmessage newmessage sets the message for this page with an indication of what type of message it is p the valid message types are one of code none code code information code code warning code or code error code p p note that for backward compatibility a message of type code error code is different than an error message set using code set error message code an error message overrides the current message until the error message is cleared this method replaces the current message and does not affect the error message p param new message the message or code null code to clear the message param new type the message type since 2 0 public void set message string new message int new type message new message message type new type seterrormessage newmessage newtype setmessage newmessage newtype newmessage messagetype newtype the code dialog page code implementation of this code i dialog page code method remembers the title in an internal state variable subclasses may extend public void set title string title this title title dialogpage idialogpage settitle the code dialog page code implementation of this code i dialog page code method sets the control to the given visibility state subclasses may extend public void set visible boolean visible control set visible visible dialogpage idialogpage setvisible setvisible creates a new empty dialog page protected dialog page no initial behaviour dialogpage creates a new dialog page with the given title param title the title of this dialog page or code null code if none protected dialog page string title this title title dialogpage creates a new dialog page with the given title and image param title the title of this dialog page or code null code if none param image the image for this dialog page or code null code if none protected dialog page string title image descriptor image this title image descriptor image dialogpage imagedescriptor imagedescriptor returns the number of pixels corresponding to the height of the given number of characters p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param chars the number of characters return the number of pixels protected int convert height in chars to pixels int chars test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert height in chars to pixels font metrics chars initializedialogunits convertheightincharstopixels fontmetrics convertheightincharstopixels fontmetrics returns the number of pixels corresponding to the given number of horizontal dialog units p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param dlus the number of horizontal dialog units return the number of pixels protected int convert horizontaldl us to pixels int dlus test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert horizontaldl us to pixels font metrics dlus initializedialogunits converthorizontaldlustopixels fontmetrics converthorizontaldlustopixels fontmetrics returns the number of pixels corresponding to the given number of vertical dialog units p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param dlus the number of vertical dialog units return the number of pixels protected int convert verticaldl us to pixels int dlus test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert verticaldl us to pixels font metrics dlus initializedialogunits convertverticaldlustopixels fontmetrics convertverticaldlustopixels fontmetrics returns the number of pixels corresponding to the width of the given number of characters p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param chars the number of characters return the number of pixels protected int convert width in chars to pixels int chars test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert width in chars to pixels font metrics chars initializedialogunits convertwidthincharstopixels fontmetrics convertwidthincharstopixels fontmetrics the code dialog page code implementation of an code i dialog page code method does nothing subclasses may extend public void dispose deallocate swt resources if image null image dispose image null dialogpage idialogpage returns the top level control for this dialog page return the top level control public control get control return control getcontrol non javadoc method declared on i dialog page public string get description return description idialogpage getdescription returns the symbolic font name used by dialog pages return the symbolic font name protected string get dialog font name return j face resources dialog font getdialogfontname jfaceresources dialog_font non javadoc method declared on i dialog page public string get error message return error message idialogpage geterrormessage errormessage returns the default font to use for this dialog page return the font protected font get font return j face resources get font registry get get dialog font name getfont jfaceresources getfontregistry getdialogfontname public image get image if image null if image descriptor null image image descriptor create image return image getimage imagedescriptor imagedescriptor createimage non javadoc method declared on i dialog page public string get message return message idialogpage getmessage non javadoc method declared on i message provider public int get message type return message type imessageprovider getmessagetype messagetype returns this dialog page s shell convenience method for code get control get shell code this method may only be called after the page s control has been created return the shell public shell get shell return get control get shell getcontrol getshell getshell getcontrol getshell non javadoc method declared on i dialog page public string get title return title idialogpage gettitle returns the tool tip text for the widget with the given id p the default implementation of this framework method does nothing and returns code null code subclasses may override p param widget id the id of the widget for which hover help is requested return the tool tip text or code null code if none deprecated protected final string get tool tip text int widget id return nothing by default return null widgetid gettooltiptext widgetid initializes the computation of horizontal and vertical dialog units based on the size of current font p this method must be called before any of the dialog unit based conversion methods are called p param test control a control from which to obtain the current font protected void initialize dialog units control test control compute and store a font metric gc gc new gc test control gc set font j face resources get dialog font font metrics gc get font metrics gc dispose testcontrol initializedialogunits testcontrol testcontrol setfont jfaceresources getdialogfont fontmetrics getfontmetrics sets the code grid data code on the specified button to be one that is spaced for the current dialog page units the method code initialize dialog units code must be called once before calling this method for the first time param button the button to set the code grid data code return the code grid data code set on the specified button protected grid data set button layout data button button grid data data new grid data grid data horizontal align fill int width hint convert horizontaldl us to pixels i dialog constants button width point min size button compute size swt default swt default true data width hint math max width hint min size x button set layout data data return data griddata initializedialogunits griddata griddata griddata setbuttonlayoutdata griddata griddata griddata horizontal_align_fill widthhint converthorizontaldlustopixels idialogconstants button_width minsize computesize widthhint widthhint minsize setlayoutdata tests whether this page s ui content has already been created return code true code if the control has been created and code false code if not protected boolean is control created return control null iscontrolcreated this default implementation of an code i dialog page code method does nothing subclasses should override to take some action in response to a help request public void perform help no default help idialogpage performhelp set the control for the receiver param new control protected void set control control new control control new control newcontrol setcontrol newcontrol newcontrol non javadoc method declared on i dialog page public void set description string description this description description idialogpage setdescription sets or clears the error message for this page param new message the message or code null code to clear the error message public void set error message string new message error message new message newmessage seterrormessage newmessage errormessage newmessage public void set image descriptor image descriptor desc image descriptor desc if image null image dispose image null setimagedescriptor imagedescriptor imagedescriptor sets or clears the message for this page p this is a shortcut for code set message new mesasge none code p param new message the message or code null code to clear the message public void set message string new message set message new message none setmessage newmesasge newmessage setmessage newmessage setmessage newmessage sets the message for this page with an indication of what type of message it is p the valid message types are one of code none code code information code code warning code or code error code p p note that for backward compatibility a message of type code error code is different than an error message set using code set error message code an error message overrides the current message until the error message is cleared this method replaces the current message and does not affect the error message p param new message the message or code null code to clear the message param new type the message type since 2 0 public void set message string new message int new type message new message message type new type seterrormessage newmessage newtype setmessage newmessage newtype newmessage messagetype newtype the code dialog page code implementation of this code i dialog page code method remembers the title in an internal state variable subclasses may extend public void set title string title this title title dialogpage idialogpage settitle the code dialog page code implementation of this code i dialog page code method sets the control to the given visibility state subclasses may extend public void set visible boolean visible control set visible visible dialogpage idialogpage setvisible setvisible creates a new empty dialog page protected dialog page no initial behaviour dialogpage creates a new dialog page with the given title param title the title of this dialog page or code null code if none protected dialog page string title this title title dialogpage creates a new dialog page with the given title and image param title the title of this dialog page or code null code if none param image the image for this dialog page or code null code if none protected dialog page string title image descriptor image this title image descriptor image dialogpage imagedescriptor imagedescriptor returns the number of pixels corresponding to the height of the given number of characters p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param chars the number of characters return the number of pixels protected int convert height in chars to pixels int chars test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert height in chars to pixels font metrics chars initializedialogunits convertheightincharstopixels fontmetrics convertheightincharstopixels fontmetrics returns the number of pixels corresponding to the given number of horizontal dialog units p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param dlus the number of horizontal dialog units return the number of pixels protected int convert horizontaldl us to pixels int dlus test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert horizontaldl us to pixels font metrics dlus initializedialogunits converthorizontaldlustopixels fontmetrics converthorizontaldlustopixels fontmetrics returns the number of pixels corresponding to the given number of vertical dialog units p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param dlus the number of vertical dialog units return the number of pixels protected int convert verticaldl us to pixels int dlus test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert verticaldl us to pixels font metrics dlus initializedialogunits convertverticaldlustopixels fontmetrics convertverticaldlustopixels fontmetrics returns the number of pixels corresponding to the width of the given number of characters p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param chars the number of characters return the number of pixels protected int convert width in chars to pixels int chars test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert width in chars to pixels font metrics chars initializedialogunits convertwidthincharstopixels fontmetrics convertwidthincharstopixels fontmetrics the code dialog page code implementation of an code i dialog page code method does nothing subclasses may extend public void dispose deallocate swt resources if image null image dispose image null dialogpage idialogpage returns the top level control for this dialog page return the top level control public control get control return control getcontrol non javadoc method declared on i dialog page public string get description return description idialogpage getdescription returns the symbolic font name used by dialog pages return the symbolic font name protected string get dialog font name return j face resources dialog font getdialogfontname jfaceresources dialog_font non javadoc method declared on i dialog page public string get error message return error message idialogpage geterrormessage errormessage returns the default font to use for this dialog page return the font protected font get font return j face resources get font registry get get dialog font name getfont jfaceresources getfontregistry getdialogfontname public image get image if image null if image descriptor null image image descriptor create image return image getimage imagedescriptor imagedescriptor createimage non javadoc method declared on i dialog page public string get message return message idialogpage getmessage non javadoc method declared on i message provider public int get message type return message type imessageprovider getmessagetype messagetype returns this dialog page s shell convenience method for code get control get shell code this method may only be called after the page s control has been created return the shell public shell get shell return get control get shell getcontrol getshell getshell getcontrol getshell non javadoc method declared on i dialog page public string get title return title idialogpage gettitle returns the tool tip text for the widget with the given id p the default implementation of this framework method does nothing and returns code null code subclasses may override p param widget id the id of the widget for which hover help is requested return the tool tip text or code null code if none deprecated protected final string get tool tip text int widget id return nothing by default return null widgetid gettooltiptext widgetid initializes the computation of horizontal and vertical dialog units based on the size of current font p this method must be called before any of the dialog unit based conversion methods are called p param test control a control from which to obtain the current font protected void initialize dialog units control test control compute and store a font metric gc gc new gc test control gc set font j face resources get dialog font font metrics gc get font metrics gc dispose testcontrol initializedialogunits testcontrol testcontrol setfont jfaceresources getdialogfont fontmetrics getfontmetrics sets the code grid data code on the specified button to be one that is spaced for the current dialog page units the method code initialize dialog units code must be called once before calling this method for the first time param button the button to set the code grid data code return the code grid data code set on the specified button protected grid data set button layout data button button grid data data new grid data grid data horizontal align fill int width hint convert horizontaldl us to pixels i dialog constants button width point min size button compute size swt default swt default true data width hint math max width hint min size x button set layout data data return data griddata initializedialogunits griddata griddata griddata setbuttonlayoutdata griddata griddata griddata horizontal_align_fill widthhint converthorizontaldlustopixels idialogconstants button_width minsize computesize widthhint widthhint minsize setlayoutdata tests whether this page s ui content has already been created return code true code if the control has been created and code false code if not protected boolean is control created return control null iscontrolcreated this default implementation of an code i dialog page code method does nothing subclasses should override to take some action in response to a help request public void perform help no default help idialogpage performhelp set the control for the receiver param new control protected void set control control new control control new control newcontrol setcontrol newcontrol newcontrol non javadoc method declared on i dialog page public void set description string description this description description idialogpage setdescription sets or clears the error message for this page param new message the message or code null code to clear the error message public void set error message string new message error message new message newmessage seterrormessage newmessage errormessage newmessage public void set image descriptor image descriptor desc image descriptor desc if image null image dispose image null setimagedescriptor imagedescriptor imagedescriptor sets or clears the message for this page p this is a shortcut for code set message new mesasge none code p param new message the message or code null code to clear the message public void set message string new message set message new message none setmessage newmesasge newmessage setmessage newmessage setmessage newmessage sets the message for this page with an indication of what type of message it is p the valid message types are one of code none code code information code code warning code or code error code p p note that for backward compatibility a message of type code error code is different than an error message set using code set error message code an error message overrides the current message until the error message is cleared this method replaces the current message and does not affect the error message p param new message the message or code null code to clear the message param new type the message type since 2 0 public void set message string new message int new type message new message message type new type seterrormessage newmessage newtype setmessage newmessage newtype newmessage messagetype newtype the code dialog page code implementation of this code i dialog page code method remembers the title in an internal state variable subclasses may extend public void set title string title this title title dialogpage idialogpage settitle the code dialog page code implementation of this code i dialog page code method sets the control to the given visibility state subclasses may extend public void set visible boolean visible control set visible visible dialogpage idialogpage setvisible setvisible creates a new empty dialog page protected dialog page no initial behaviour dialogpage creates a new dialog page with the given title param title the title of this dialog page or code null code if none protected dialog page string title this title title dialogpage creates a new dialog page with the given title and image param title the title of this dialog page or code null code if none param image the image for this dialog page or code null code if none protected dialog page string title image descriptor image this title image descriptor image dialogpage imagedescriptor imagedescriptor returns the number of pixels corresponding to the height of the given number of characters p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param chars the number of characters return the number of pixels protected int convert height in chars to pixels int chars test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert height in chars to pixels font metrics chars initializedialogunits convertheightincharstopixels fontmetrics convertheightincharstopixels fontmetrics returns the number of pixels corresponding to the given number of horizontal dialog units p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param dlus the number of horizontal dialog units return the number of pixels protected int convert horizontaldl us to pixels int dlus test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert horizontaldl us to pixels font metrics dlus initializedialogunits converthorizontaldlustopixels fontmetrics converthorizontaldlustopixels fontmetrics returns the number of pixels corresponding to the given number of vertical dialog units p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param dlus the number of vertical dialog units return the number of pixels protected int convert verticaldl us to pixels int dlus test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert verticaldl us to pixels font metrics dlus initializedialogunits convertverticaldlustopixels fontmetrics convertverticaldlustopixels fontmetrics returns the number of pixels corresponding to the width of the given number of characters p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param chars the number of characters return the number of pixels protected int convert width in chars to pixels int chars test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert width in chars to pixels font metrics chars initializedialogunits convertwidthincharstopixels fontmetrics convertwidthincharstopixels fontmetrics the code dialog page code implementation of an code i dialog page code method does nothing subclasses may extend public void dispose deallocate swt resources if image null image dispose image null dialogpage idialogpage returns the top level control for this dialog page return the top level control public control get control return control getcontrol non javadoc method declared on i dialog page public string get description return description idialogpage getdescription returns the symbolic font name used by dialog pages return the symbolic font name protected string get dialog font name return j face resources dialog font getdialogfontname jfaceresources dialog_font non javadoc method declared on i dialog page public string get error message return error message idialogpage geterrormessage errormessage returns the default font to use for this dialog page return the font protected font get font return j face resources get font registry get get dialog font name getfont jfaceresources getfontregistry getdialogfontname public image get image if image null if image descriptor null image image descriptor create image return image getimage imagedescriptor imagedescriptor createimage non javadoc method declared on i dialog page public string get message return message idialogpage getmessage non javadoc method declared on i message provider public int get message type return message type imessageprovider getmessagetype messagetype returns this dialog page s shell convenience method for code get control get shell code this method may only be called after the page s control has been created return the shell public shell get shell return get control get shell getcontrol getshell getshell getcontrol getshell non javadoc method declared on i dialog page public string get title return title idialogpage gettitle returns the tool tip text for the widget with the given id p the default implementation of this framework method does nothing and returns code null code subclasses may override p param widget id the id of the widget for which hover help is requested return the tool tip text or code null code if none deprecated protected final string get tool tip text int widget id return nothing by default return null widgetid gettooltiptext widgetid initializes the computation of horizontal and vertical dialog units based on the size of current font p this method must be called before any of the dialog unit based conversion methods are called p param test control a control from which to obtain the current font protected void initialize dialog units control test control compute and store a font metric gc gc new gc test control gc set font j face resources get dialog font font metrics gc get font metrics gc dispose testcontrol initializedialogunits testcontrol testcontrol setfont jfaceresources getdialogfont fontmetrics getfontmetrics sets the code grid data code on the specified button to be one that is spaced for the current dialog page units the method code initialize dialog units code must be called once before calling this method for the first time param button the button to set the code grid data code return the code grid data code set on the specified button protected grid data set button layout data button button grid data data new grid data grid data horizontal align fill int width hint convert horizontaldl us to pixels i dialog constants button width point min size button compute size swt default swt default true data width hint math max width hint min size x button set layout data data return data griddata initializedialogunits griddata griddata griddata setbuttonlayoutdata griddata griddata griddata horizontal_align_fill widthhint converthorizontaldlustopixels idialogconstants button_width minsize computesize widthhint widthhint minsize setlayoutdata tests whether this page s ui content has already been created return code true code if the control has been created and code false code if not protected boolean is control created return control null iscontrolcreated this default implementation of an code i dialog page code method does nothing subclasses should override to take some action in response to a help request public void perform help no default help idialogpage performhelp set the control for the receiver param new control protected void set control control new control control new control newcontrol setcontrol newcontrol newcontrol non javadoc method declared on i dialog page public void set description string description this description description idialogpage setdescription sets or clears the error message for this page param new message the message or code null code to clear the error message public void set error message string new message error message new message newmessage seterrormessage newmessage errormessage newmessage public void set image descriptor image descriptor desc image descriptor desc if image null image dispose image null setimagedescriptor imagedescriptor imagedescriptor sets or clears the message for this page p this is a shortcut for code set message new mesasge none code p param new message the message or code null code to clear the message public void set message string new message set message new message none setmessage newmesasge newmessage setmessage newmessage setmessage newmessage sets the message for this page with an indication of what type of message it is p the valid message types are one of code none code code information code code warning code or code error code p p note that for backward compatibility a message of type code error code is different than an error message set using code set error message code an error message overrides the current message until the error message is cleared this method replaces the current message and does not affect the error message p param new message the message or code null code to clear the message param new type the message type since 2 0 public void set message string new message int new type message new message message type new type seterrormessage newmessage newtype setmessage newmessage newtype newmessage messagetype newtype the code dialog page code implementation of this code i dialog page code method remembers the title in an internal state variable subclasses may extend public void set title string title this title title dialogpage idialogpage settitle the code dialog page code implementation of this code i dialog page code method sets the control to the given visibility state subclasses may extend public void set visible boolean visible control set visible visible dialogpage idialogpage setvisible setvisible creates a new empty dialog page protected dialog page no initial behaviour dialogpage creates a new dialog page with the given title param title the title of this dialog page or code null code if none protected dialog page string title this title title dialogpage creates a new dialog page with the given title and image param title the title of this dialog page or code null code if none param image the image for this dialog page or code null code if none protected dialog page string title image descriptor image this title image descriptor image dialogpage imagedescriptor imagedescriptor returns the number of pixels corresponding to the height of the given number of characters p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param chars the number of characters return the number of pixels protected int convert height in chars to pixels int chars test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert height in chars to pixels font metrics chars initializedialogunits convertheightincharstopixels fontmetrics convertheightincharstopixels fontmetrics returns the number of pixels corresponding to the given number of horizontal dialog units p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param dlus the number of horizontal dialog units return the number of pixels protected int convert horizontaldl us to pixels int dlus test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert horizontaldl us to pixels font metrics dlus initializedialogunits converthorizontaldlustopixels fontmetrics converthorizontaldlustopixels fontmetrics returns the number of pixels corresponding to the given number of vertical dialog units p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param dlus the number of vertical dialog units return the number of pixels protected int convert verticaldl us to pixels int dlus test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert verticaldl us to pixels font metrics dlus initializedialogunits convertverticaldlustopixels fontmetrics convertverticaldlustopixels fontmetrics returns the number of pixels corresponding to the width of the given number of characters p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param chars the number of characters return the number of pixels protected int convert width in chars to pixels int chars test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert width in chars to pixels font metrics chars initializedialogunits convertwidthincharstopixels fontmetrics convertwidthincharstopixels fontmetrics the code dialog page code implementation of an code i dialog page code method does nothing subclasses may extend public void dispose deallocate swt resources if image null image dispose image null dialogpage idialogpage returns the top level control for this dialog page return the top level control public control get control return control getcontrol non javadoc method declared on i dialog page public string get description return description idialogpage getdescription returns the symbolic font name used by dialog pages return the symbolic font name protected string get dialog font name return j face resources dialog font getdialogfontname jfaceresources dialog_font non javadoc method declared on i dialog page public string get error message return error message idialogpage geterrormessage errormessage returns the default font to use for this dialog page return the font protected font get font return j face resources get font registry get get dialog font name getfont jfaceresources getfontregistry getdialogfontname public image get image if image null if image descriptor null image image descriptor create image return image getimage imagedescriptor imagedescriptor createimage non javadoc method declared on i dialog page public string get message return message idialogpage getmessage non javadoc method declared on i message provider public int get message type return message type imessageprovider getmessagetype messagetype returns this dialog page s shell convenience method for code get control get shell code this method may only be called after the page s control has been created return the shell public shell get shell return get control get shell getcontrol getshell getshell getcontrol getshell non javadoc method declared on i dialog page public string get title return title idialogpage gettitle returns the tool tip text for the widget with the given id p the default implementation of this framework method does nothing and returns code null code subclasses may override p param widget id the id of the widget for which hover help is requested return the tool tip text or code null code if none deprecated protected final string get tool tip text int widget id return nothing by default return null widgetid gettooltiptext widgetid initializes the computation of horizontal and vertical dialog units based on the size of current font p this method must be called before any of the dialog unit based conversion methods are called p param test control a control from which to obtain the current font protected void initialize dialog units control test control compute and store a font metric gc gc new gc test control gc set font j face resources get dialog font font metrics gc get font metrics gc dispose testcontrol initializedialogunits testcontrol testcontrol setfont jfaceresources getdialogfont fontmetrics getfontmetrics sets the code grid data code on the specified button to be one that is spaced for the current dialog page units the method code initialize dialog units code must be called once before calling this method for the first time param button the button to set the code grid data code return the code grid data code set on the specified button protected grid data set button layout data button button grid data data new grid data grid data horizontal align fill int width hint convert horizontaldl us to pixels i dialog constants button width point min size button compute size swt default swt default true data width hint math max width hint min size x button set layout data data return data griddata initializedialogunits griddata griddata griddata setbuttonlayoutdata griddata griddata griddata horizontal_align_fill widthhint converthorizontaldlustopixels idialogconstants button_width minsize computesize widthhint widthhint minsize setlayoutdata tests whether this page s ui content has already been created return code true code if the control has been created and code false code if not protected boolean is control created return control null iscontrolcreated this default implementation of an code i dialog page code method does nothing subclasses should override to take some action in response to a help request public void perform help no default help idialogpage performhelp set the control for the receiver param new control protected void set control control new control control new control newcontrol setcontrol newcontrol newcontrol non javadoc method declared on i dialog page public void set description string description this description description idialogpage setdescription sets or clears the error message for this page param new message the message or code null code to clear the error message public void set error message string new message error message new message newmessage seterrormessage newmessage errormessage newmessage public void set image descriptor image descriptor desc image descriptor desc if image null image dispose image null setimagedescriptor imagedescriptor imagedescriptor sets or clears the message for this page p this is a shortcut for code set message new mesasge none code p param new message the message or code null code to clear the message public void set message string new message set message new message none setmessage newmesasge newmessage setmessage newmessage setmessage newmessage sets the message for this page with an indication of what type of message it is p the valid message types are one of code none code code information code code warning code or code error code p p note that for backward compatibility a message of type code error code is different than an error message set using code set error message code an error message overrides the current message until the error message is cleared this method replaces the current message and does not affect the error message p param new message the message or code null code to clear the message param new type the message type since 2 0 public void set message string new message int new type message new message message type new type seterrormessage newmessage newtype setmessage newmessage newtype newmessage messagetype newtype the code dialog page code implementation of this code i dialog page code method remembers the title in an internal state variable subclasses may extend public void set title string title this title title dialogpage idialogpage settitle the code dialog page code implementation of this code i dialog page code method sets the control to the given visibility state subclasses may extend public void set visible boolean visible control set visible visible dialogpage idialogpage setvisible setvisible creates a new empty dialog page protected dialog page no initial behaviour dialogpage creates a new dialog page with the given title param title the title of this dialog page or code null code if none protected dialog page string title this title title dialogpage creates a new dialog page with the given title and image param title the title of this dialog page or code null code if none param image the image for this dialog page or code null code if none protected dialog page string title image descriptor image this title image descriptor image dialogpage imagedescriptor imagedescriptor returns the number of pixels corresponding to the height of the given number of characters p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param chars the number of characters return the number of pixels protected int convert height in chars to pixels int chars test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert height in chars to pixels font metrics chars initializedialogunits convertheightincharstopixels fontmetrics convertheightincharstopixels fontmetrics returns the number of pixels corresponding to the given number of horizontal dialog units p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param dlus the number of horizontal dialog units return the number of pixels protected int convert horizontaldl us to pixels int dlus test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert horizontaldl us to pixels font metrics dlus initializedialogunits converthorizontaldlustopixels fontmetrics converthorizontaldlustopixels fontmetrics returns the number of pixels corresponding to the given number of vertical dialog units p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param dlus the number of vertical dialog units return the number of pixels protected int convert verticaldl us to pixels int dlus test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert verticaldl us to pixels font metrics dlus initializedialogunits convertverticaldlustopixels fontmetrics convertverticaldlustopixels fontmetrics returns the number of pixels corresponding to the width of the given number of characters p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param chars the number of characters return the number of pixels protected int convert width in chars to pixels int chars test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert width in chars to pixels font metrics chars initializedialogunits convertwidthincharstopixels fontmetrics convertwidthincharstopixels fontmetrics the code dialog page code implementation of an code i dialog page code method does nothing subclasses may extend public void dispose deallocate swt resources if image null image dispose image null dialogpage idialogpage returns the top level control for this dialog page return the top level control public control get control return control getcontrol non javadoc method declared on i dialog page public string get description return description idialogpage getdescription returns the symbolic font name used by dialog pages return the symbolic font name protected string get dialog font name return j face resources dialog font getdialogfontname jfaceresources dialog_font non javadoc method declared on i dialog page public string get error message return error message idialogpage geterrormessage errormessage returns the default font to use for this dialog page return the font protected font get font return j face resources get font registry get get dialog font name getfont jfaceresources getfontregistry getdialogfontname public image get image if image null if image descriptor null image image descriptor create image return image getimage imagedescriptor imagedescriptor createimage non javadoc method declared on i dialog page public string get message return message idialogpage getmessage non javadoc method declared on i message provider public int get message type return message type imessageprovider getmessagetype messagetype returns this dialog page s shell convenience method for code get control get shell code this method may only be called after the page s control has been created return the shell public shell get shell return get control get shell getcontrol getshell getshell getcontrol getshell non javadoc method declared on i dialog page public string get title return title idialogpage gettitle returns the tool tip text for the widget with the given id p the default implementation of this framework method does nothing and returns code null code subclasses may override p param widget id the id of the widget for which hover help is requested return the tool tip text or code null code if none deprecated protected final string get tool tip text int widget id return nothing by default return null widgetid gettooltiptext widgetid initializes the computation of horizontal and vertical dialog units based on the size of current font p this method must be called before any of the dialog unit based conversion methods are called p param test control a control from which to obtain the current font protected void initialize dialog units control test control compute and store a font metric gc gc new gc test control gc set font j face resources get dialog font font metrics gc get font metrics gc dispose testcontrol initializedialogunits testcontrol testcontrol setfont jfaceresources getdialogfont fontmetrics getfontmetrics sets the code grid data code on the specified button to be one that is spaced for the current dialog page units the method code initialize dialog units code must be called once before calling this method for the first time param button the button to set the code grid data code return the code grid data code set on the specified button protected grid data set button layout data button button grid data data new grid data grid data horizontal align fill int width hint convert horizontaldl us to pixels i dialog constants button width point min size button compute size swt default swt default true data width hint math max width hint min size x button set layout data data return data griddata initializedialogunits griddata griddata griddata setbuttonlayoutdata griddata griddata griddata horizontal_align_fill widthhint converthorizontaldlustopixels idialogconstants button_width minsize computesize widthhint widthhint minsize setlayoutdata tests whether this page s ui content has already been created return code true code if the control has been created and code false code if not protected boolean is control created return control null iscontrolcreated this default implementation of an code i dialog page code method does nothing subclasses should override to take some action in response to a help request public void perform help no default help idialogpage performhelp set the control for the receiver param new control protected void set control control new control control new control newcontrol setcontrol newcontrol newcontrol non javadoc method declared on i dialog page public void set description string description this description description idialogpage setdescription sets or clears the error message for this page param new message the message or code null code to clear the error message public void set error message string new message error message new message newmessage seterrormessage newmessage errormessage newmessage public void set image descriptor image descriptor desc image descriptor desc if image null image dispose image null setimagedescriptor imagedescriptor imagedescriptor sets or clears the message for this page p this is a shortcut for code set message new mesasge none code p param new message the message or code null code to clear the message public void set message string new message set message new message none setmessage newmesasge newmessage setmessage newmessage setmessage newmessage sets the message for this page with an indication of what type of message it is p the valid message types are one of code none code code information code code warning code or code error code p p note that for backward compatibility a message of type code error code is different than an error message set using code set error message code an error message overrides the current message until the error message is cleared this method replaces the current message and does not affect the error message p param new message the message or code null code to clear the message param new type the message type since 2 0 public void set message string new message int new type message new message message type new type seterrormessage newmessage newtype setmessage newmessage newtype newmessage messagetype newtype the code dialog page code implementation of this code i dialog page code method remembers the title in an internal state variable subclasses may extend public void set title string title this title title dialogpage idialogpage settitle the code dialog page code implementation of this code i dialog page code method sets the control to the given visibility state subclasses may extend public void set visible boolean visible control set visible visible dialogpage idialogpage setvisible setvisible creates a new empty dialog page protected dialog page no initial behaviour dialogpage creates a new dialog page with the given title param title the title of this dialog page or code null code if none protected dialog page string title this title title dialogpage creates a new dialog page with the given title and image param title the title of this dialog page or code null code if none param image the image for this dialog page or code null code if none protected dialog page string title image descriptor image this title image descriptor image dialogpage imagedescriptor imagedescriptor returns the number of pixels corresponding to the height of the given number of characters p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param chars the number of characters return the number of pixels protected int convert height in chars to pixels int chars test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert height in chars to pixels font metrics chars initializedialogunits convertheightincharstopixels fontmetrics convertheightincharstopixels fontmetrics returns the number of pixels corresponding to the given number of horizontal dialog units p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param dlus the number of horizontal dialog units return the number of pixels protected int convert horizontaldl us to pixels int dlus test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert horizontaldl us to pixels font metrics dlus initializedialogunits converthorizontaldlustopixels fontmetrics converthorizontaldlustopixels fontmetrics returns the number of pixels corresponding to the given number of vertical dialog units p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param dlus the number of vertical dialog units return the number of pixels protected int convert verticaldl us to pixels int dlus test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert verticaldl us to pixels font metrics dlus initializedialogunits convertverticaldlustopixels fontmetrics convertverticaldlustopixels fontmetrics returns the number of pixels corresponding to the width of the given number of characters p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param chars the number of characters return the number of pixels protected int convert width in chars to pixels int chars test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert width in chars to pixels font metrics chars initializedialogunits convertwidthincharstopixels fontmetrics convertwidthincharstopixels fontmetrics the code dialog page code implementation of an code i dialog page code method does nothing subclasses may extend public void dispose deallocate swt resources if image null image dispose image null dialogpage idialogpage returns the top level control for this dialog page return the top level control public control get control return control getcontrol non javadoc method declared on i dialog page public string get description return description idialogpage getdescription returns the symbolic font name used by dialog pages return the symbolic font name protected string get dialog font name return j face resources dialog font getdialogfontname jfaceresources dialog_font non javadoc method declared on i dialog page public string get error message return error message idialogpage geterrormessage errormessage returns the default font to use for this dialog page return the font protected font get font return j face resources get font registry get get dialog font name getfont jfaceresources getfontregistry getdialogfontname public image get image if image null if image descriptor null image image descriptor create image return image getimage imagedescriptor imagedescriptor createimage non javadoc method declared on i dialog page public string get message return message idialogpage getmessage non javadoc method declared on i message provider public int get message type return message type imessageprovider getmessagetype messagetype returns this dialog page s shell convenience method for code get control get shell code this method may only be called after the page s control has been created return the shell public shell get shell return get control get shell getcontrol getshell getshell getcontrol getshell non javadoc method declared on i dialog page public string get title return title idialogpage gettitle returns the tool tip text for the widget with the given id p the default implementation of this framework method does nothing and returns code null code subclasses may override p param widget id the id of the widget for which hover help is requested return the tool tip text or code null code if none deprecated protected final string get tool tip text int widget id return nothing by default return null widgetid gettooltiptext widgetid initializes the computation of horizontal and vertical dialog units based on the size of current font p this method must be called before any of the dialog unit based conversion methods are called p param test control a control from which to obtain the current font protected void initialize dialog units control test control compute and store a font metric gc gc new gc test control gc set font j face resources get dialog font font metrics gc get font metrics gc dispose testcontrol initializedialogunits testcontrol testcontrol setfont jfaceresources getdialogfont fontmetrics getfontmetrics sets the code grid data code on the specified button to be one that is spaced for the current dialog page units the method code initialize dialog units code must be called once before calling this method for the first time param button the button to set the code grid data code return the code grid data code set on the specified button protected grid data set button layout data button button grid data data new grid data grid data horizontal align fill int width hint convert horizontaldl us to pixels i dialog constants button width point min size button compute size swt default swt default true data width hint math max width hint min size x button set layout data data return data griddata initializedialogunits griddata griddata griddata setbuttonlayoutdata griddata griddata griddata horizontal_align_fill widthhint converthorizontaldlustopixels idialogconstants button_width minsize computesize widthhint widthhint minsize setlayoutdata tests whether this page s ui content has already been created return code true code if the control has been created and code false code if not protected boolean is control created return control null iscontrolcreated this default implementation of an code i dialog page code method does nothing subclasses should override to take some action in response to a help request public void perform help no default help idialogpage performhelp set the control for the receiver param new control protected void set control control new control control new control newcontrol setcontrol newcontrol newcontrol non javadoc method declared on i dialog page public void set description string description this description description idialogpage setdescription sets or clears the error message for this page param new message the message or code null code to clear the error message public void set error message string new message error message new message newmessage seterrormessage newmessage errormessage newmessage public void set image descriptor image descriptor desc image descriptor desc if image null image dispose image null setimagedescriptor imagedescriptor imagedescriptor sets or clears the message for this page p this is a shortcut for code set message new mesasge none code p param new message the message or code null code to clear the message public void set message string new message set message new message none setmessage newmesasge newmessage setmessage newmessage setmessage newmessage sets the message for this page with an indication of what type of message it is p the valid message types are one of code none code code information code code warning code or code error code p p note that for backward compatibility a message of type code error code is different than an error message set using code set error message code an error message overrides the current message until the error message is cleared this method replaces the current message and does not affect the error message p param new message the message or code null code to clear the message param new type the message type since 2 0 public void set message string new message int new type message new message message type new type seterrormessage newmessage newtype setmessage newmessage newtype newmessage messagetype newtype the code dialog page code implementation of this code i dialog page code method remembers the title in an internal state variable subclasses may extend public void set title string title this title title dialogpage idialogpage settitle the code dialog page code implementation of this code i dialog page code method sets the control to the given visibility state subclasses may extend public void set visible boolean visible control set visible visible dialogpage idialogpage setvisible setvisible creates a new empty dialog page protected dialog page no initial behaviour dialogpage creates a new dialog page with the given title param title the title of this dialog page or code null code if none protected dialog page string title this title title dialogpage creates a new dialog page with the given title and image param title the title of this dialog page or code null code if none param image the image for this dialog page or code null code if none protected dialog page string title image descriptor image this title image descriptor image dialogpage imagedescriptor imagedescriptor returns the number of pixels corresponding to the height of the given number of characters p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param chars the number of characters return the number of pixels protected int convert height in chars to pixels int chars test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert height in chars to pixels font metrics chars initializedialogunits convertheightincharstopixels fontmetrics convertheightincharstopixels fontmetrics returns the number of pixels corresponding to the given number of horizontal dialog units p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param dlus the number of horizontal dialog units return the number of pixels protected int convert horizontaldl us to pixels int dlus test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert horizontaldl us to pixels font metrics dlus initializedialogunits converthorizontaldlustopixels fontmetrics converthorizontaldlustopixels fontmetrics returns the number of pixels corresponding to the given number of vertical dialog units p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param dlus the number of vertical dialog units return the number of pixels protected int convert verticaldl us to pixels int dlus test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert verticaldl us to pixels font metrics dlus initializedialogunits convertverticaldlustopixels fontmetrics convertverticaldlustopixels fontmetrics returns the number of pixels corresponding to the width of the given number of characters p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param chars the number of characters return the number of pixels protected int convert width in chars to pixels int chars test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert width in chars to pixels font metrics chars initializedialogunits convertwidthincharstopixels fontmetrics convertwidthincharstopixels fontmetrics the code dialog page code implementation of an code i dialog page code method does nothing subclasses may extend public void dispose deallocate swt resources if image null image dispose image null dialogpage idialogpage returns the top level control for this dialog page return the top level control public control get control return control getcontrol non javadoc method declared on i dialog page public string get description return description idialogpage getdescription returns the symbolic font name used by dialog pages return the symbolic font name protected string get dialog font name return j face resources dialog font getdialogfontname jfaceresources dialog_font non javadoc method declared on i dialog page public string get error message return error message idialogpage geterrormessage errormessage returns the default font to use for this dialog page return the font protected font get font return j face resources get font registry get get dialog font name getfont jfaceresources getfontregistry getdialogfontname public image get image if image null if image descriptor null image image descriptor create image return image getimage imagedescriptor imagedescriptor createimage non javadoc method declared on i dialog page public string get message return message idialogpage getmessage non javadoc method declared on i message provider public int get message type return message type imessageprovider getmessagetype messagetype returns this dialog page s shell convenience method for code get control get shell code this method may only be called after the page s control has been created return the shell public shell get shell return get control get shell getcontrol getshell getshell getcontrol getshell non javadoc method declared on i dialog page public string get title return title idialogpage gettitle returns the tool tip text for the widget with the given id p the default implementation of this framework method does nothing and returns code null code subclasses may override p param widget id the id of the widget for which hover help is requested return the tool tip text or code null code if none deprecated protected final string get tool tip text int widget id return nothing by default return null widgetid gettooltiptext widgetid initializes the computation of horizontal and vertical dialog units based on the size of current font p this method must be called before any of the dialog unit based conversion methods are called p param test control a control from which to obtain the current font protected void initialize dialog units control test control compute and store a font metric gc gc new gc test control gc set font j face resources get dialog font font metrics gc get font metrics gc dispose testcontrol initializedialogunits testcontrol testcontrol setfont jfaceresources getdialogfont fontmetrics getfontmetrics sets the code grid data code on the specified button to be one that is spaced for the current dialog page units the method code initialize dialog units code must be called once before calling this method for the first time param button the button to set the code grid data code return the code grid data code set on the specified button protected grid data set button layout data button button grid data data new grid data grid data horizontal align fill int width hint convert horizontaldl us to pixels i dialog constants button width point min size button compute size swt default swt default true data width hint math max width hint min size x button set layout data data return data griddata initializedialogunits griddata griddata griddata setbuttonlayoutdata griddata griddata griddata horizontal_align_fill widthhint converthorizontaldlustopixels idialogconstants button_width minsize computesize widthhint widthhint minsize setlayoutdata tests whether this page s ui content has already been created return code true code if the control has been created and code false code if not protected boolean is control created return control null iscontrolcreated this default implementation of an code i dialog page code method does nothing subclasses should override to take some action in response to a help request public void perform help no default help idialogpage performhelp set the control for the receiver param new control protected void set control control new control control new control newcontrol setcontrol newcontrol newcontrol non javadoc method declared on i dialog page public void set description string description this description description idialogpage setdescription sets or clears the error message for this page param new message the message or code null code to clear the error message public void set error message string new message error message new message newmessage seterrormessage newmessage errormessage newmessage public void set image descriptor image descriptor desc image descriptor desc if image null image dispose image null setimagedescriptor imagedescriptor imagedescriptor sets or clears the message for this page p this is a shortcut for code set message new mesasge none code p param new message the message or code null code to clear the message public void set message string new message set message new message none setmessage newmesasge newmessage setmessage newmessage setmessage newmessage sets the message for this page with an indication of what type of message it is p the valid message types are one of code none code code information code code warning code or code error code p p note that for backward compatibility a message of type code error code is different than an error message set using code set error message code an error message overrides the current message until the error message is cleared this method replaces the current message and does not affect the error message p param new message the message or code null code to clear the message param new type the message type since 2 0 public void set message string new message int new type message new message message type new type seterrormessage newmessage newtype setmessage newmessage newtype newmessage messagetype newtype the code dialog page code implementation of this code i dialog page code method remembers the title in an internal state variable subclasses may extend public void set title string title this title title dialogpage idialogpage settitle the code dialog page code implementation of this code i dialog page code method sets the control to the given visibility state subclasses may extend public void set visible boolean visible control set visible visible dialogpage idialogpage setvisible setvisible creates a new empty dialog page protected dialog page no initial behaviour dialogpage creates a new dialog page with the given title param title the title of this dialog page or code null code if none protected dialog page string title this title title dialogpage creates a new dialog page with the given title and image param title the title of this dialog page or code null code if none param image the image for this dialog page or code null code if none protected dialog page string title image descriptor image this title image descriptor image dialogpage imagedescriptor imagedescriptor returns the number of pixels corresponding to the height of the given number of characters p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param chars the number of characters return the number of pixels protected int convert height in chars to pixels int chars test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert height in chars to pixels font metrics chars initializedialogunits convertheightincharstopixels fontmetrics convertheightincharstopixels fontmetrics returns the number of pixels corresponding to the given number of horizontal dialog units p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param dlus the number of horizontal dialog units return the number of pixels protected int convert horizontaldl us to pixels int dlus test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert horizontaldl us to pixels font metrics dlus initializedialogunits converthorizontaldlustopixels fontmetrics converthorizontaldlustopixels fontmetrics returns the number of pixels corresponding to the given number of vertical dialog units p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param dlus the number of vertical dialog units return the number of pixels protected int convert verticaldl us to pixels int dlus test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert verticaldl us to pixels font metrics dlus initializedialogunits convertverticaldlustopixels fontmetrics convertverticaldlustopixels fontmetrics returns the number of pixels corresponding to the width of the given number of characters p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param chars the number of characters return the number of pixels protected int convert width in chars to pixels int chars test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert width in chars to pixels font metrics chars initializedialogunits convertwidthincharstopixels fontmetrics convertwidthincharstopixels fontmetrics the code dialog page code implementation of an code i dialog page code method does nothing subclasses may extend public void dispose deallocate swt resources if image null image dispose image null dialogpage idialogpage returns the top level control for this dialog page return the top level control public control get control return control getcontrol non javadoc method declared on i dialog page public string get description return description idialogpage getdescription returns the symbolic font name used by dialog pages return the symbolic font name protected string get dialog font name return j face resources dialog font getdialogfontname jfaceresources dialog_font non javadoc method declared on i dialog page public string get error message return error message idialogpage geterrormessage errormessage returns the default font to use for this dialog page return the font protected font get font return j face resources get font registry get get dialog font name getfont jfaceresources getfontregistry getdialogfontname public image get image if image null if image descriptor null image image descriptor create image return image getimage imagedescriptor imagedescriptor createimage non javadoc method declared on i dialog page public string get message return message idialogpage getmessage non javadoc method declared on i message provider public int get message type return message type imessageprovider getmessagetype messagetype returns this dialog page s shell convenience method for code get control get shell code this method may only be called after the page s control has been created return the shell public shell get shell return get control get shell getcontrol getshell getshell getcontrol getshell non javadoc method declared on i dialog page public string get title return title idialogpage gettitle returns the tool tip text for the widget with the given id p the default implementation of this framework method does nothing and returns code null code subclasses may override p param widget id the id of the widget for which hover help is requested return the tool tip text or code null code if none deprecated protected final string get tool tip text int widget id return nothing by default return null widgetid gettooltiptext widgetid initializes the computation of horizontal and vertical dialog units based on the size of current font p this method must be called before any of the dialog unit based conversion methods are called p param test control a control from which to obtain the current font protected void initialize dialog units control test control compute and store a font metric gc gc new gc test control gc set font j face resources get dialog font font metrics gc get font metrics gc dispose testcontrol initializedialogunits testcontrol testcontrol setfont jfaceresources getdialogfont fontmetrics getfontmetrics sets the code grid data code on the specified button to be one that is spaced for the current dialog page units the method code initialize dialog units code must be called once before calling this method for the first time param button the button to set the code grid data code return the code grid data code set on the specified button protected grid data set button layout data button button grid data data new grid data grid data horizontal align fill int width hint convert horizontaldl us to pixels i dialog constants button width point min size button compute size swt default swt default true data width hint math max width hint min size x button set layout data data return data griddata initializedialogunits griddata griddata griddata setbuttonlayoutdata griddata griddata griddata horizontal_align_fill widthhint converthorizontaldlustopixels idialogconstants button_width minsize computesize widthhint widthhint minsize setlayoutdata tests whether this page s ui content has already been created return code true code if the control has been created and code false code if not protected boolean is control created return control null iscontrolcreated this default implementation of an code i dialog page code method does nothing subclasses should override to take some action in response to a help request public void perform help no default help idialogpage performhelp set the control for the receiver param new control protected void set control control new control control new control newcontrol setcontrol newcontrol newcontrol non javadoc method declared on i dialog page public void set description string description this description description idialogpage setdescription sets or clears the error message for this page param new message the message or code null code to clear the error message public void set error message string new message error message new message newmessage seterrormessage newmessage errormessage newmessage public void set image descriptor image descriptor desc image descriptor desc if image null image dispose image null setimagedescriptor imagedescriptor imagedescriptor sets or clears the message for this page p this is a shortcut for code set message new mesasge none code p param new message the message or code null code to clear the message public void set message string new message set message new message none setmessage newmesasge newmessage setmessage newmessage setmessage newmessage sets the message for this page with an indication of what type of message it is p the valid message types are one of code none code code information code code warning code or code error code p p note that for backward compatibility a message of type code error code is different than an error message set using code set error message code an error message overrides the current message until the error message is cleared this method replaces the current message and does not affect the error message p param new message the message or code null code to clear the message param new type the message type since 2 0 public void set message string new message int new type message new message message type new type seterrormessage newmessage newtype setmessage newmessage newtype newmessage messagetype newtype the code dialog page code implementation of this code i dialog page code method remembers the title in an internal state variable subclasses may extend public void set title string title this title title dialogpage idialogpage settitle the code dialog page code implementation of this code i dialog page code method sets the control to the given visibility state subclasses may extend public void set visible boolean visible control set visible visible dialogpage idialogpage setvisible setvisible creates a new empty dialog page protected dialog page no initial behaviour dialogpage creates a new dialog page with the given title param title the title of this dialog page or code null code if none protected dialog page string title this title title dialogpage creates a new dialog page with the given title and image param title the title of this dialog page or code null code if none param image the image for this dialog page or code null code if none protected dialog page string title image descriptor image this title image descriptor image dialogpage imagedescriptor imagedescriptor returns the number of pixels corresponding to the height of the given number of characters p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param chars the number of characters return the number of pixels protected int convert height in chars to pixels int chars test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert height in chars to pixels font metrics chars initializedialogunits convertheightincharstopixels fontmetrics convertheightincharstopixels fontmetrics returns the number of pixels corresponding to the given number of horizontal dialog units p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param dlus the number of horizontal dialog units return the number of pixels protected int convert horizontaldl us to pixels int dlus test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert horizontaldl us to pixels font metrics dlus initializedialogunits converthorizontaldlustopixels fontmetrics converthorizontaldlustopixels fontmetrics returns the number of pixels corresponding to the given number of vertical dialog units p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param dlus the number of vertical dialog units return the number of pixels protected int convert verticaldl us to pixels int dlus test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert verticaldl us to pixels font metrics dlus initializedialogunits convertverticaldlustopixels fontmetrics convertverticaldlustopixels fontmetrics returns the number of pixels corresponding to the width of the given number of characters p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param chars the number of characters return the number of pixels protected int convert width in chars to pixels int chars test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert width in chars to pixels font metrics chars initializedialogunits convertwidthincharstopixels fontmetrics convertwidthincharstopixels fontmetrics the code dialog page code implementation of an code i dialog page code method does nothing subclasses may extend public void dispose deallocate swt resources if image null image dispose image null dialogpage idialogpage returns the top level control for this dialog page return the top level control public control get control return control getcontrol non javadoc method declared on i dialog page public string get description return description idialogpage getdescription returns the symbolic font name used by dialog pages return the symbolic font name protected string get dialog font name return j face resources dialog font getdialogfontname jfaceresources dialog_font non javadoc method declared on i dialog page public string get error message return error message idialogpage geterrormessage errormessage returns the default font to use for this dialog page return the font protected font get font return j face resources get font registry get get dialog font name getfont jfaceresources getfontregistry getdialogfontname public image get image if image null if image descriptor null image image descriptor create image return image getimage imagedescriptor imagedescriptor createimage non javadoc method declared on i dialog page public string get message return message idialogpage getmessage non javadoc method declared on i message provider public int get message type return message type imessageprovider getmessagetype messagetype returns this dialog page s shell convenience method for code get control get shell code this method may only be called after the page s control has been created return the shell public shell get shell return get control get shell getcontrol getshell getshell getcontrol getshell non javadoc method declared on i dialog page public string get title return title idialogpage gettitle returns the tool tip text for the widget with the given id p the default implementation of this framework method does nothing and returns code null code subclasses may override p param widget id the id of the widget for which hover help is requested return the tool tip text or code null code if none deprecated protected final string get tool tip text int widget id return nothing by default return null widgetid gettooltiptext widgetid initializes the computation of horizontal and vertical dialog units based on the size of current font p this method must be called before any of the dialog unit based conversion methods are called p param test control a control from which to obtain the current font protected void initialize dialog units control test control compute and store a font metric gc gc new gc test control gc set font j face resources get dialog font font metrics gc get font metrics gc dispose testcontrol initializedialogunits testcontrol testcontrol setfont jfaceresources getdialogfont fontmetrics getfontmetrics sets the code grid data code on the specified button to be one that is spaced for the current dialog page units the method code initialize dialog units code must be called once before calling this method for the first time param button the button to set the code grid data code return the code grid data code set on the specified button protected grid data set button layout data button button grid data data new grid data grid data horizontal align fill int width hint convert horizontaldl us to pixels i dialog constants button width point min size button compute size swt default swt default true data width hint math max width hint min size x button set layout data data return data griddata initializedialogunits griddata griddata griddata setbuttonlayoutdata griddata griddata griddata horizontal_align_fill widthhint converthorizontaldlustopixels idialogconstants button_width minsize computesize widthhint widthhint minsize setlayoutdata tests whether this page s ui content has already been created return code true code if the control has been created and code false code if not protected boolean is control created return control null iscontrolcreated this default implementation of an code i dialog page code method does nothing subclasses should override to take some action in response to a help request public void perform help no default help idialogpage performhelp set the control for the receiver param new control protected void set control control new control control new control newcontrol setcontrol newcontrol newcontrol non javadoc method declared on i dialog page public void set description string description this description description idialogpage setdescription sets or clears the error message for this page param new message the message or code null code to clear the error message public void set error message string new message error message new message newmessage seterrormessage newmessage errormessage newmessage public void set image descriptor image descriptor desc image descriptor desc if image null image dispose image null setimagedescriptor imagedescriptor imagedescriptor sets or clears the message for this page p this is a shortcut for code set message new mesasge none code p param new message the message or code null code to clear the message public void set message string new message set message new message none setmessage newmesasge newmessage setmessage newmessage setmessage newmessage sets the message for this page with an indication of what type of message it is p the valid message types are one of code none code code information code code warning code or code error code p p note that for backward compatibility a message of type code error code is different than an error message set using code set error message code an error message overrides the current message until the error message is cleared this method replaces the current message and does not affect the error message p param new message the message or code null code to clear the message param new type the message type since 2 0 public void set message string new message int new type message new message message type new type seterrormessage newmessage newtype setmessage newmessage newtype newmessage messagetype newtype the code dialog page code implementation of this code i dialog page code method remembers the title in an internal state variable subclasses may extend public void set title string title this title title dialogpage idialogpage settitle the code dialog page code implementation of this code i dialog page code method sets the control to the given visibility state subclasses may extend public void set visible boolean visible control set visible visible dialogpage idialogpage setvisible setvisible creates a new empty dialog page protected dialog page no initial behaviour dialogpage creates a new dialog page with the given title param title the title of this dialog page or code null code if none protected dialog page string title this title title dialogpage creates a new dialog page with the given title and image param title the title of this dialog page or code null code if none param image the image for this dialog page or code null code if none protected dialog page string title image descriptor image this title image descriptor image dialogpage imagedescriptor imagedescriptor returns the number of pixels corresponding to the height of the given number of characters p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param chars the number of characters return the number of pixels protected int convert height in chars to pixels int chars test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert height in chars to pixels font metrics chars initializedialogunits convertheightincharstopixels fontmetrics convertheightincharstopixels fontmetrics returns the number of pixels corresponding to the given number of horizontal dialog units p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param dlus the number of horizontal dialog units return the number of pixels protected int convert horizontaldl us to pixels int dlus test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert horizontaldl us to pixels font metrics dlus initializedialogunits converthorizontaldlustopixels fontmetrics converthorizontaldlustopixels fontmetrics returns the number of pixels corresponding to the given number of vertical dialog units p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param dlus the number of vertical dialog units return the number of pixels protected int convert verticaldl us to pixels int dlus test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert verticaldl us to pixels font metrics dlus initializedialogunits convertverticaldlustopixels fontmetrics convertverticaldlustopixels fontmetrics returns the number of pixels corresponding to the width of the given number of characters p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param chars the number of characters return the number of pixels protected int convert width in chars to pixels int chars test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert width in chars to pixels font metrics chars initializedialogunits convertwidthincharstopixels fontmetrics convertwidthincharstopixels fontmetrics the code dialog page code implementation of an code i dialog page code method does nothing subclasses may extend public void dispose deallocate swt resources if image null image dispose image null dialogpage idialogpage returns the top level control for this dialog page return the top level control public control get control return control getcontrol non javadoc method declared on i dialog page public string get description return description idialogpage getdescription returns the symbolic font name used by dialog pages return the symbolic font name protected string get dialog font name return j face resources dialog font getdialogfontname jfaceresources dialog_font non javadoc method declared on i dialog page public string get error message return error message idialogpage geterrormessage errormessage returns the default font to use for this dialog page return the font protected font get font return j face resources get font registry get get dialog font name getfont jfaceresources getfontregistry getdialogfontname public image get image if image null if image descriptor null image image descriptor create image return image getimage imagedescriptor imagedescriptor createimage non javadoc method declared on i dialog page public string get message return message idialogpage getmessage non javadoc method declared on i message provider public int get message type return message type imessageprovider getmessagetype messagetype returns this dialog page s shell convenience method for code get control get shell code this method may only be called after the page s control has been created return the shell public shell get shell return get control get shell getcontrol getshell getshell getcontrol getshell non javadoc method declared on i dialog page public string get title return title idialogpage gettitle returns the tool tip text for the widget with the given id p the default implementation of this framework method does nothing and returns code null code subclasses may override p param widget id the id of the widget for which hover help is requested return the tool tip text or code null code if none deprecated protected final string get tool tip text int widget id return nothing by default return null widgetid gettooltiptext widgetid initializes the computation of horizontal and vertical dialog units based on the size of current font p this method must be called before any of the dialog unit based conversion methods are called p param test control a control from which to obtain the current font protected void initialize dialog units control test control compute and store a font metric gc gc new gc test control gc set font j face resources get dialog font font metrics gc get font metrics gc dispose testcontrol initializedialogunits testcontrol testcontrol setfont jfaceresources getdialogfont fontmetrics getfontmetrics sets the code grid data code on the specified button to be one that is spaced for the current dialog page units the method code initialize dialog units code must be called once before calling this method for the first time param button the button to set the code grid data code return the code grid data code set on the specified button protected grid data set button layout data button button grid data data new grid data grid data horizontal align fill int width hint convert horizontaldl us to pixels i dialog constants button width point min size button compute size swt default swt default true data width hint math max width hint min size x button set layout data data return data griddata initializedialogunits griddata griddata griddata setbuttonlayoutdata griddata griddata griddata horizontal_align_fill widthhint converthorizontaldlustopixels idialogconstants button_width minsize computesize widthhint widthhint minsize setlayoutdata tests whether this page s ui content has already been created return code true code if the control has been created and code false code if not protected boolean is control created return control null iscontrolcreated this default implementation of an code i dialog page code method does nothing subclasses should override to take some action in response to a help request public void perform help no default help idialogpage performhelp set the control for the receiver param new control protected void set control control new control control new control newcontrol setcontrol newcontrol newcontrol non javadoc method declared on i dialog page public void set description string description this description description idialogpage setdescription sets or clears the error message for this page param new message the message or code null code to clear the error message public void set error message string new message error message new message newmessage seterrormessage newmessage errormessage newmessage public void set image descriptor image descriptor desc image descriptor desc if image null image dispose image null setimagedescriptor imagedescriptor imagedescriptor sets or clears the message for this page p this is a shortcut for code set message new mesasge none code p param new message the message or code null code to clear the message public void set message string new message set message new message none setmessage newmesasge newmessage setmessage newmessage setmessage newmessage sets the message for this page with an indication of what type of message it is p the valid message types are one of code none code code information code code warning code or code error code p p note that for backward compatibility a message of type code error code is different than an error message set using code set error message code an error message overrides the current message until the error message is cleared this method replaces the current message and does not affect the error message p param new message the message or code null code to clear the message param new type the message type since 2 0 public void set message string new message int new type message new message message type new type seterrormessage newmessage newtype setmessage newmessage newtype newmessage messagetype newtype the code dialog page code implementation of this code i dialog page code method remembers the title in an internal state variable subclasses may extend public void set title string title this title title dialogpage idialogpage settitle the code dialog page code implementation of this code i dialog page code method sets the control to the given visibility state subclasses may extend public void set visible boolean visible control set visible visible dialogpage idialogpage setvisible setvisible creates a new empty dialog page protected dialog page no initial behaviour dialogpage creates a new dialog page with the given title param title the title of this dialog page or code null code if none protected dialog page string title this title title dialogpage creates a new dialog page with the given title and image param title the title of this dialog page or code null code if none param image the image for this dialog page or code null code if none protected dialog page string title image descriptor image this title image descriptor image dialogpage imagedescriptor imagedescriptor returns the number of pixels corresponding to the height of the given number of characters p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param chars the number of characters return the number of pixels protected int convert height in chars to pixels int chars test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert height in chars to pixels font metrics chars initializedialogunits convertheightincharstopixels fontmetrics convertheightincharstopixels fontmetrics returns the number of pixels corresponding to the given number of horizontal dialog units p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param dlus the number of horizontal dialog units return the number of pixels protected int convert horizontaldl us to pixels int dlus test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert horizontaldl us to pixels font metrics dlus initializedialogunits converthorizontaldlustopixels fontmetrics converthorizontaldlustopixels fontmetrics returns the number of pixels corresponding to the given number of vertical dialog units p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param dlus the number of vertical dialog units return the number of pixels protected int convert verticaldl us to pixels int dlus test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert verticaldl us to pixels font metrics dlus initializedialogunits convertverticaldlustopixels fontmetrics convertverticaldlustopixels fontmetrics returns the number of pixels corresponding to the width of the given number of characters p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param chars the number of characters return the number of pixels protected int convert width in chars to pixels int chars test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert width in chars to pixels font metrics chars initializedialogunits convertwidthincharstopixels fontmetrics convertwidthincharstopixels fontmetrics the code dialog page code implementation of an code i dialog page code method does nothing subclasses may extend public void dispose deallocate swt resources if image null image dispose image null dialogpage idialogpage returns the top level control for this dialog page return the top level control public control get control return control getcontrol non javadoc method declared on i dialog page public string get description return description idialogpage getdescription returns the symbolic font name used by dialog pages return the symbolic font name protected string get dialog font name return j face resources dialog font getdialogfontname jfaceresources dialog_font non javadoc method declared on i dialog page public string get error message return error message idialogpage geterrormessage errormessage returns the default font to use for this dialog page return the font protected font get font return j face resources get font registry get get dialog font name getfont jfaceresources getfontregistry getdialogfontname public image get image if image null if image descriptor null image image descriptor create image return image getimage imagedescriptor imagedescriptor createimage non javadoc method declared on i dialog page public string get message return message idialogpage getmessage non javadoc method declared on i message provider public int get message type return message type imessageprovider getmessagetype messagetype returns this dialog page s shell convenience method for code get control get shell code this method may only be called after the page s control has been created return the shell public shell get shell return get control get shell getcontrol getshell getshell getcontrol getshell non javadoc method declared on i dialog page public string get title return title idialogpage gettitle returns the tool tip text for the widget with the given id p the default implementation of this framework method does nothing and returns code null code subclasses may override p param widget id the id of the widget for which hover help is requested return the tool tip text or code null code if none deprecated protected final string get tool tip text int widget id return nothing by default return null widgetid gettooltiptext widgetid initializes the computation of horizontal and vertical dialog units based on the size of current font p this method must be called before any of the dialog unit based conversion methods are called p param test control a control from which to obtain the current font protected void initialize dialog units control test control compute and store a font metric gc gc new gc test control gc set font j face resources get dialog font font metrics gc get font metrics gc dispose testcontrol initializedialogunits testcontrol testcontrol setfont jfaceresources getdialogfont fontmetrics getfontmetrics sets the code grid data code on the specified button to be one that is spaced for the current dialog page units the method code initialize dialog units code must be called once before calling this method for the first time param button the button to set the code grid data code return the code grid data code set on the specified button protected grid data set button layout data button button grid data data new grid data grid data horizontal align fill int width hint convert horizontaldl us to pixels i dialog constants button width point min size button compute size swt default swt default true data width hint math max width hint min size x button set layout data data return data griddata initializedialogunits griddata griddata griddata setbuttonlayoutdata griddata griddata griddata horizontal_align_fill widthhint converthorizontaldlustopixels idialogconstants button_width minsize computesize widthhint widthhint minsize setlayoutdata tests whether this page s ui content has already been created return code true code if the control has been created and code false code if not protected boolean is control created return control null iscontrolcreated this default implementation of an code i dialog page code method does nothing subclasses should override to take some action in response to a help request public void perform help no default help idialogpage performhelp set the control for the receiver param new control protected void set control control new control control new control newcontrol setcontrol newcontrol newcontrol non javadoc method declared on i dialog page public void set description string description this description description idialogpage setdescription sets or clears the error message for this page param new message the message or code null code to clear the error message public void set error message string new message error message new message newmessage seterrormessage newmessage errormessage newmessage public void set image descriptor image descriptor desc image descriptor desc if image null image dispose image null setimagedescriptor imagedescriptor imagedescriptor sets or clears the message for this page p this is a shortcut for code set message new mesasge none code p param new message the message or code null code to clear the message public void set message string new message set message new message none setmessage newmesasge newmessage setmessage newmessage setmessage newmessage sets the message for this page with an indication of what type of message it is p the valid message types are one of code none code code information code code warning code or code error code p p note that for backward compatibility a message of type code error code is different than an error message set using code set error message code an error message overrides the current message until the error message is cleared this method replaces the current message and does not affect the error message p param new message the message or code null code to clear the message param new type the message type since 2 0 public void set message string new message int new type message new message message type new type seterrormessage newmessage newtype setmessage newmessage newtype newmessage messagetype newtype the code dialog page code implementation of this code i dialog page code method remembers the title in an internal state variable subclasses may extend public void set title string title this title title dialogpage idialogpage settitle the code dialog page code implementation of this code i dialog page code method sets the control to the given visibility state subclasses may extend public void set visible boolean visible control set visible visible dialogpage idialogpage setvisible setvisible creates a new empty dialog page protected dialog page no initial behaviour dialogpage creates a new dialog page with the given title param title the title of this dialog page or code null code if none protected dialog page string title this title title dialogpage creates a new dialog page with the given title and image param title the title of this dialog page or code null code if none param image the image for this dialog page or code null code if none protected dialog page string title image descriptor image this title image descriptor image dialogpage imagedescriptor imagedescriptor returns the number of pixels corresponding to the height of the given number of characters p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param chars the number of characters return the number of pixels protected int convert height in chars to pixels int chars test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert height in chars to pixels font metrics chars initializedialogunits convertheightincharstopixels fontmetrics convertheightincharstopixels fontmetrics returns the number of pixels corresponding to the given number of horizontal dialog units p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param dlus the number of horizontal dialog units return the number of pixels protected int convert horizontaldl us to pixels int dlus test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert horizontaldl us to pixels font metrics dlus initializedialogunits converthorizontaldlustopixels fontmetrics converthorizontaldlustopixels fontmetrics returns the number of pixels corresponding to the given number of vertical dialog units p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param dlus the number of vertical dialog units return the number of pixels protected int convert verticaldl us to pixels int dlus test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert verticaldl us to pixels font metrics dlus initializedialogunits convertverticaldlustopixels fontmetrics convertverticaldlustopixels fontmetrics returns the number of pixels corresponding to the width of the given number of characters p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param chars the number of characters return the number of pixels protected int convert width in chars to pixels int chars test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert width in chars to pixels font metrics chars initializedialogunits convertwidthincharstopixels fontmetrics convertwidthincharstopixels fontmetrics the code dialog page code implementation of an code i dialog page code method does nothing subclasses may extend public void dispose deallocate swt resources if image null image dispose image null dialogpage idialogpage returns the top level control for this dialog page return the top level control public control get control return control getcontrol non javadoc method declared on i dialog page public string get description return description idialogpage getdescription returns the symbolic font name used by dialog pages return the symbolic font name protected string get dialog font name return j face resources dialog font getdialogfontname jfaceresources dialog_font non javadoc method declared on i dialog page public string get error message return error message idialogpage geterrormessage errormessage returns the default font to use for this dialog page return the font protected font get font return j face resources get font registry get get dialog font name getfont jfaceresources getfontregistry getdialogfontname public image get image if image null if image descriptor null image image descriptor create image return image getimage imagedescriptor imagedescriptor createimage non javadoc method declared on i dialog page public string get message return message idialogpage getmessage non javadoc method declared on i message provider public int get message type return message type imessageprovider getmessagetype messagetype returns this dialog page s shell convenience method for code get control get shell code this method may only be called after the page s control has been created return the shell public shell get shell return get control get shell getcontrol getshell getshell getcontrol getshell non javadoc method declared on i dialog page public string get title return title idialogpage gettitle returns the tool tip text for the widget with the given id p the default implementation of this framework method does nothing and returns code null code subclasses may override p param widget id the id of the widget for which hover help is requested return the tool tip text or code null code if none deprecated protected final string get tool tip text int widget id return nothing by default return null widgetid gettooltiptext widgetid initializes the computation of horizontal and vertical dialog units based on the size of current font p this method must be called before any of the dialog unit based conversion methods are called p param test control a control from which to obtain the current font protected void initialize dialog units control test control compute and store a font metric gc gc new gc test control gc set font j face resources get dialog font font metrics gc get font metrics gc dispose testcontrol initializedialogunits testcontrol testcontrol setfont jfaceresources getdialogfont fontmetrics getfontmetrics sets the code grid data code on the specified button to be one that is spaced for the current dialog page units the method code initialize dialog units code must be called once before calling this method for the first time param button the button to set the code grid data code return the code grid data code set on the specified button protected grid data set button layout data button button grid data data new grid data grid data horizontal align fill int width hint convert horizontaldl us to pixels i dialog constants button width point min size button compute size swt default swt default true data width hint math max width hint min size x button set layout data data return data griddata initializedialogunits griddata griddata griddata setbuttonlayoutdata griddata griddata griddata horizontal_align_fill widthhint converthorizontaldlustopixels idialogconstants button_width minsize computesize widthhint widthhint minsize setlayoutdata tests whether this page s ui content has already been created return code true code if the control has been created and code false code if not protected boolean is control created return control null iscontrolcreated this default implementation of an code i dialog page code method does nothing subclasses should override to take some action in response to a help request public void perform help no default help idialogpage performhelp set the control for the receiver param new control protected void set control control new control control new control newcontrol setcontrol newcontrol newcontrol non javadoc method declared on i dialog page public void set description string description this description description idialogpage setdescription sets or clears the error message for this page param new message the message or code null code to clear the error message public void set error message string new message error message new message newmessage seterrormessage newmessage errormessage newmessage public void set image descriptor image descriptor desc image descriptor desc if image null image dispose image null setimagedescriptor imagedescriptor imagedescriptor sets or clears the message for this page p this is a shortcut for code set message new mesasge none code p param new message the message or code null code to clear the message public void set message string new message set message new message none setmessage newmesasge newmessage setmessage newmessage setmessage newmessage sets the message for this page with an indication of what type of message it is p the valid message types are one of code none code code information code code warning code or code error code p p note that for backward compatibility a message of type code error code is different than an error message set using code set error message code an error message overrides the current message until the error message is cleared this method replaces the current message and does not affect the error message p param new message the message or code null code to clear the message param new type the message type since 2 0 public void set message string new message int new type message new message message type new type seterrormessage newmessage newtype setmessage newmessage newtype newmessage messagetype newtype the code dialog page code implementation of this code i dialog page code method remembers the title in an internal state variable subclasses may extend public void set title string title this title title dialogpage idialogpage settitle the code dialog page code implementation of this code i dialog page code method sets the control to the given visibility state subclasses may extend public void set visible boolean visible control set visible visible dialogpage idialogpage setvisible setvisible creates a new empty dialog page protected dialog page no initial behaviour dialogpage creates a new dialog page with the given title param title the title of this dialog page or code null code if none protected dialog page string title this title title dialogpage creates a new dialog page with the given title and image param title the title of this dialog page or code null code if none param image the image for this dialog page or code null code if none protected dialog page string title image descriptor image this title image descriptor image dialogpage imagedescriptor imagedescriptor returns the number of pixels corresponding to the height of the given number of characters p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param chars the number of characters return the number of pixels protected int convert height in chars to pixels int chars test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert height in chars to pixels font metrics chars initializedialogunits convertheightincharstopixels fontmetrics convertheightincharstopixels fontmetrics returns the number of pixels corresponding to the given number of horizontal dialog units p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param dlus the number of horizontal dialog units return the number of pixels protected int convert horizontaldl us to pixels int dlus test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert horizontaldl us to pixels font metrics dlus initializedialogunits converthorizontaldlustopixels fontmetrics converthorizontaldlustopixels fontmetrics returns the number of pixels corresponding to the given number of vertical dialog units p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param dlus the number of vertical dialog units return the number of pixels protected int convert verticaldl us to pixels int dlus test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert verticaldl us to pixels font metrics dlus initializedialogunits convertverticaldlustopixels fontmetrics convertverticaldlustopixels fontmetrics returns the number of pixels corresponding to the width of the given number of characters p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param chars the number of characters return the number of pixels protected int convert width in chars to pixels int chars test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert width in chars to pixels font metrics chars initializedialogunits convertwidthincharstopixels fontmetrics convertwidthincharstopixels fontmetrics the code dialog page code implementation of an code i dialog page code method does nothing subclasses may extend public void dispose deallocate swt resources if image null image dispose image null dialogpage idialogpage returns the top level control for this dialog page return the top level control public control get control return control getcontrol non javadoc method declared on i dialog page public string get description return description idialogpage getdescription returns the symbolic font name used by dialog pages return the symbolic font name protected string get dialog font name return j face resources dialog font getdialogfontname jfaceresources dialog_font non javadoc method declared on i dialog page public string get error message return error message idialogpage geterrormessage errormessage returns the default font to use for this dialog page return the font protected font get font return j face resources get font registry get get dialog font name getfont jfaceresources getfontregistry getdialogfontname public image get image if image null if image descriptor null image image descriptor create image return image getimage imagedescriptor imagedescriptor createimage non javadoc method declared on i dialog page public string get message return message idialogpage getmessage non javadoc method declared on i message provider public int get message type return message type imessageprovider getmessagetype messagetype returns this dialog page s shell convenience method for code get control get shell code this method may only be called after the page s control has been created return the shell public shell get shell return get control get shell getcontrol getshell getshell getcontrol getshell non javadoc method declared on i dialog page public string get title return title idialogpage gettitle returns the tool tip text for the widget with the given id p the default implementation of this framework method does nothing and returns code null code subclasses may override p param widget id the id of the widget for which hover help is requested return the tool tip text or code null code if none deprecated protected final string get tool tip text int widget id return nothing by default return null widgetid gettooltiptext widgetid initializes the computation of horizontal and vertical dialog units based on the size of current font p this method must be called before any of the dialog unit based conversion methods are called p param test control a control from which to obtain the current font protected void initialize dialog units control test control compute and store a font metric gc gc new gc test control gc set font j face resources get dialog font font metrics gc get font metrics gc dispose testcontrol initializedialogunits testcontrol testcontrol setfont jfaceresources getdialogfont fontmetrics getfontmetrics sets the code grid data code on the specified button to be one that is spaced for the current dialog page units the method code initialize dialog units code must be called once before calling this method for the first time param button the button to set the code grid data code return the code grid data code set on the specified button protected grid data set button layout data button button grid data data new grid data grid data horizontal align fill int width hint convert horizontaldl us to pixels i dialog constants button width point min size button compute size swt default swt default true data width hint math max width hint min size x button set layout data data return data griddata initializedialogunits griddata griddata griddata setbuttonlayoutdata griddata griddata griddata horizontal_align_fill widthhint converthorizontaldlustopixels idialogconstants button_width minsize computesize widthhint widthhint minsize setlayoutdata tests whether this page s ui content has already been created return code true code if the control has been created and code false code if not protected boolean is control created return control null iscontrolcreated this default implementation of an code i dialog page code method does nothing subclasses should override to take some action in response to a help request public void perform help no default help idialogpage performhelp set the control for the receiver param new control protected void set control control new control control new control newcontrol setcontrol newcontrol newcontrol non javadoc method declared on i dialog page public void set description string description this description description idialogpage setdescription sets or clears the error message for this page param new message the message or code null code to clear the error message public void set error message string new message error message new message newmessage seterrormessage newmessage errormessage newmessage public void set image descriptor image descriptor desc image descriptor desc if image null image dispose image null setimagedescriptor imagedescriptor imagedescriptor sets or clears the message for this page p this is a shortcut for code set message new mesasge none code p param new message the message or code null code to clear the message public void set message string new message set message new message none setmessage newmesasge newmessage setmessage newmessage setmessage newmessage sets the message for this page with an indication of what type of message it is p the valid message types are one of code none code code information code code warning code or code error code p p note that for backward compatibility a message of type code error code is different than an error message set using code set error message code an error message overrides the current message until the error message is cleared this method replaces the current message and does not affect the error message p param new message the message or code null code to clear the message param new type the message type since 2 0 public void set message string new message int new type message new message message type new type seterrormessage newmessage newtype setmessage newmessage newtype newmessage messagetype newtype the code dialog page code implementation of this code i dialog page code method remembers the title in an internal state variable subclasses may extend public void set title string title this title title dialogpage idialogpage settitle the code dialog page code implementation of this code i dialog page code method sets the control to the given visibility state subclasses may extend public void set visible boolean visible control set visible visible dialogpage idialogpage setvisible setvisible creates a new empty dialog page protected dialog page no initial behaviour dialogpage creates a new dialog page with the given title param title the title of this dialog page or code null code if none protected dialog page string title this title title dialogpage creates a new dialog page with the given title and image param title the title of this dialog page or code null code if none param image the image for this dialog page or code null code if none protected dialog page string title image descriptor image this title image descriptor image dialogpage imagedescriptor imagedescriptor returns the number of pixels corresponding to the height of the given number of characters p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param chars the number of characters return the number of pixels protected int convert height in chars to pixels int chars test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert height in chars to pixels font metrics chars initializedialogunits convertheightincharstopixels fontmetrics convertheightincharstopixels fontmetrics returns the number of pixels corresponding to the given number of horizontal dialog units p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param dlus the number of horizontal dialog units return the number of pixels protected int convert horizontaldl us to pixels int dlus test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert horizontaldl us to pixels font metrics dlus initializedialogunits converthorizontaldlustopixels fontmetrics converthorizontaldlustopixels fontmetrics returns the number of pixels corresponding to the given number of vertical dialog units p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param dlus the number of vertical dialog units return the number of pixels protected int convert verticaldl us to pixels int dlus test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert verticaldl us to pixels font metrics dlus initializedialogunits convertverticaldlustopixels fontmetrics convertverticaldlustopixels fontmetrics returns the number of pixels corresponding to the width of the given number of characters p this method may only be called after code initialize dialog units code has been called p p clients may call this framework method but should not override it p param chars the number of characters return the number of pixels protected int convert width in chars to pixels int chars test for failure to initialize for backward compatibility if font metrics null return 0 return dialog convert width in chars to pixels font metrics chars initializedialogunits convertwidthincharstopixels fontmetrics convertwidthincharstopixels fontmetrics the code dialog page code implementation of an code i dialog page code method does nothing subclasses may extend public void dispose deallocate swt resources if image null image dispose image null dialogpage idialogpage returns the top level control for this dialog page return the top level control public control get control return control getcontrol non javadoc method declared on i dialog page public string get description return description idialogpage getdescription returns the symbolic font name used by dialog pages return the symbolic font name protected string get dialog font name return j face resources dialog font getdialogfontname jfaceresources dialog_font non javadoc method declared on i dialog page public string get error message return error message idialogpage geterrormessage errormessage returns the default font to use for this dialog page return the font protected font get font return j face resources get font registry get get dialog font name getfont jfaceresources getfontregistry getdialogfontname public image get image if image null if image descriptor null image image descriptor create image return image getimage imagedescriptor imagedescriptor createimage non javadoc method declared on i dialog page public string get message return message idialogpage getmessage non javadoc method declared on i message provider public int get message type return message type imessageprovider getmessagetype messagetype returns this dialog page s shell convenience method for code get control get shell code this method may only be called after the page s control has been created return the shell public shell get shell return get control get shell getcontrol getshell getshell getcontrol getshell non javadoc method declared on i dialog page public string get title return title idialogpage gettitle returns the tool tip text for the widget with the given id p the default implementation of this framework method does nothing and returns code null code subclasses may override p param widget id the id of the widget for which hover help is requested return the tool tip text or code null code if none deprecated protected final string get tool tip text int widget id return nothing by default return null widgetid gettooltiptext widgetid initializes the computation of horizontal and vertical dialog units based on the size of current font p this method must be called before any of the dialog unit based conversion methods are called p param test control a control from which to obtain the current font protected void initialize dialog units control test control compute and store a font metric gc gc new gc test control gc set font j face resources get dialog font font metrics gc get font metrics gc dispose testcontrol initializedialogunits testcontrol testcontrol setfont jfaceresources getdialogfont fontmetrics getfontmetrics sets the code grid data code on the specified button to be one that is spaced for the current dialog page units the method code initialize dialog units code must be called once before calling this method for the first time param button the button to set the code grid data code return the code grid data code set on the specified button protected grid data set button layout data button button grid data data new grid data grid data horizontal align fill int width hint convert horizontaldl us to pixels i dialog constants button width point min size button compute size swt default swt default true data width hint math max width hint min size x button set layout data data return data griddata initializedialogunits griddata griddata griddata setbuttonlayoutdata griddata griddata griddata horizontal_align_fill widthhint converthorizontaldlustopixels idialogconstants button_width minsize computesize widthhint widthhint minsize setlayoutdata tests whether this page s ui content has already been created return code true code if the control has been created and code false code if not protected boolean is control created return control null iscontrolcreated this default implementation of an code i dialog page code method does nothing subclasses should override to take some action in response to a help request public void perform help no default help idialogpage performhelp set the control for the receiver param new control protected void set control control new control control new control newcontrol setcontrol newcontrol newcontrol non javadoc method declared on i dialog page public void set description string description this description description idialogpage setdescription sets or clears the error message for this page param new message the message or code null code to clear the error message public void set error message string new message error message new message newmessage seterrormessage newmessage errormessage newmessage public void set image descriptor image descriptor desc image descriptor desc if image null image dispose image null setimagedescriptor imagedescriptor imagedescriptor sets or clears the message for this page p this is a shortcut for code set message new mesasge none code p param new message the message or code null code to clear the message public void set message string new message set message new message none setmessage newmesasge newmessage setmessage newmessage setmessage newmessage sets the message for this page with an indication of what type of message it is p the valid message types are one of code none code code information code code warning code or code error code p p note that for backward compatibility a message of type code error code is different than an error message set using code set error message code an error message overrides the current message until the error message is cleared this method replaces the current message and does not affect the error message p param new message the message or code null code to clear the message param new type the message type since 2 0 public void set message string new message int new type message new message message type new type seterrormessage newmessage newtype setmessage newmessage newtype newmessage messagetype newtype the code dialog page code implementation of this code i dialog page code method remembers the title in an internal state variable subclasses may extend public void set title string title this title title dialogpage idialogpage settitle the code dialog page code implementation of this code i dialog page code method sets the control to the given visibility state subclasses may extend public void set visible boolean visible control set visible visible dialogpage idialogpage setvisible setvisible web browser util constructor comment public web browser util super webbrowserutil webbrowserutil returns true if we re running on windows return boolean public static boolean is windows string os system get property os name non nls 1 if os null os to lower case index of win 0 non nls 1 return true return false iswindows getproperty tolowercase indexof returns true if we re running on linux return boolean public static boolean is linux string os system get property os name non nls 1 if os null os to lower case index of lin 0 non nls 1 return true return false islinux getproperty tolowercase indexof open a dialog window param message java lang string public static void open error string message display d display get current if d null d display get default shell shell d get active shell message dialog open error shell messages error dialog title message openerror getcurrent getdefault getactiveshell messagedialog openerror errordialogtitle open a dialog window param message java lang string public static void open message string message display d display get current if d null d display get default shell shell d get active shell message dialog open information shell messages searching task name message openmessage getcurrent getdefault getactiveshell messagedialog openinformation searchingtaskname returns whether it should be possible to use the internal browser or not based on whether or not the org eclipse swt browser class can be found loaded if it can it means is is supported on the platform in which this plugin is running if not disable the ability to use the internal browser this method checks to see if it can new up a new external browser instance if the swt widget can not be bound to the particular operating system it throws an swt exception we catch that and set a boolean flag which represents whether or not we were successfully able to create a external browser instance instance or not if not don t bother adding the internal web external browser instance that uses this widget designed to be attemped only once and the flag set used throughout return boolean public static boolean can use internal web browser if we have already figured this out don t do it again if is internal browser operational null return is internal browser operational boolean value check for the class try class for name browser package name catch class not found exception e is internal browser operational new boolean false return false try loading it shell shell null try shell new shell platformui get workbench get display new browser shell swt none is internal browser operational new boolean true return true catch throwable t web browserui plugin get instance get log log new status i status warning web browserui plugin plugin id 0 internal browser is not available t get message null non nls 1 is internal browser operational new boolean false return false finally if shell null shell dispose externalbrowserinstance swtexception externalbrowserinstance externalbrowserinstance canuseinternalwebbrowser isinternalbrowseroperational isinternalbrowseroperational booleanvalue forname browser_package_name classnotfoundexception isinternalbrowseroperational getworkbench getdisplay isinternalbrowseroperational webbrowseruiplugin getinstance getlog istatus webbrowseruiplugin plugin_id getmessage isinternalbrowseroperational public static boolean can use system browser disabling system browser on solaris due to bug 94497 if platform os solaris equals platform getos return false return program find program html null non nls 1 canusesystembrowser os_solaris findprogram public static list get external browser paths list paths new array list iterator iterator browser manager get instance get web browsers iterator while iterator has next i browser descriptor wb i browser descriptor iterator next if wb null wb get location null paths add wb get location to lower case return paths getexternalbrowserpaths arraylist browsermanager getinstance getwebbrowsers hasnext ibrowserdescriptor ibrowserdescriptor getlocation getlocation tolowercase add any supported external web browsers found after an arbitrary check in specific paths public static void add found browsers list list list paths get external browser paths string os platform getos file roots get usable drives file list roots int root size roots length math min roots length 2 just check the first two drives i browser ext browsers web browserui plugin get browsers int size browsers length for int i 0 i size i if browsers i get default locations null browsers i getos to lower case index of os 0 for int k 0 k root size k int size2 browsers i get default locations length for int j 0 j size2 j string location browsers i get default locations j try file f new file roots k location if paths contains f get absolute path to lower case if f exists browser descriptor browser new browser descriptor browser name browsers i get name browser location f get absolute path browser parameters browsers i get parameters list add browser j size2 catch exception e ignore addfoundbrowsers getexternalbrowserpaths getusabledrives listroots rootsize ibrowserext webbrowseruiplugin getbrowsers getdefaultlocations tolowercase indexof rootsize getdefaultlocations getdefaultlocations getabsolutepath tolowercase browserdescriptor browserdescriptor getname getabsolutepath getparameters private static file get usable drives file roots if platform getos equals platform os win32 return roots array list list new array list for int i 0 i roots length i string path roots i get absolute path if path null path to lower case starts with a path to lower case starts with b non nls 1 non nls 2 continue list add roots i return file list to array new file list size getusabledrives os_win32 arraylist arraylist getabsolutepath tolowercase startswith tolowercase startswith toarray create an external web browser if the file matches the default known browsers param file return an external browser working copy public static i browser descriptor working copy create external browser file file if file null file is file return null string executable file get name i browser ext browsers web browserui plugin get browsers int size browsers length for int i 0 i size i if executable equals browsers i get executable i browser descriptor working copy browser browser manager get instance create external web browser browser set name browsers i get name browser set location file get absolute path browser set parameters browsers i get parameters return browser return null ibrowserdescriptorworkingcopy createexternalbrowser isfile getname ibrowserext webbrowseruiplugin getbrowsers getexecutable ibrowserdescriptorworkingcopy browsermanager getinstance createexternalwebbrowser setname getname setlocation getabsolutepath setparameters getparameters encodes browser style in the secondary id as id style param browser id param style return secondary id public static string encode style string browser id int style return browser id style sep style browserid secondaryid encodestyle browserid browserid style_sep decodes secondary id into a browser style param secondary id return style public static int decode style string secondary id if secondary id null int sep secondary id last index of style sep if sep 1 string stoken secondary id substring sep 1 try return integer parse int stoken catch number format exception e ignore return default style secondaryid decodestyle secondaryid secondaryid secondaryid lastindexof style_sep secondaryid parseint numberformatexception default_style public static string decode id string encoded id int sep encoded id last index of style sep if sep 1 return encoded id substring 0 sep return encoded id decodeid encodedid encodedid lastindexof style_sep encodedid encodedid block instantiation private platformui do nothing returns the workbench fails if the workbench has not been created yet return the workbench public static i workbench get workbench if workbench get instance null app forgot to call create and run workbench beforehand throw new illegal state exception workbench messages platformui noworkbench return workbench get instance iworkbench getworkbench getinstance createandrunworkbench illegalstateexception workbenchmessages platformui_noworkbench getinstance returns whether link create and run workbench create and run workbench has been called to create the workbench and the workbench has yet to terminate return code true code if the workbench has been created and is still running and code false code if the workbench has not yet been created or has completed since 3 0 public static boolean is workbench running return workbench get instance null workbench get instance is running createandrunworkbench createandrunworkbench isworkbenchrunning getinstance getinstance isrunning creates the workbench and associates it with the given display and workbench advisor and runs the workbench ui this entails processing and dispatching events until the workbench is closed or restarted p this method is intended to be called by the main class the application fails if the workbench ui has already been created p p use link create display create display to create the display to pass in p p note that this method is intended to be called by the application code org eclipse core boot i platform runnable code it must be called exactly once and early on before anyone else asks code get workbench code for the workbench p param display the display to be used for all ui interactions with the workbench param advisor the application specific advisor that configures and specializes the workbench return return code link return ok return ok for normal exit link return restart return restart if the workbench was terminated with a call to link i workbench restart i workbench restart link return unstartable return unstartable if the workbench could not be started link return emergency close return emergency close if the ui quit because of an emergency other values reserved for future use since 3 0 public static int create and run workbench display display workbench advisor advisor return workbench create and run workbench display advisor createdisplay createdisplay iplatformrunnable getworkbench return_ok return_ok return_restart return_restart iworkbench iworkbench return_unstartable return_unstartable return_emergency_close return_emergency_close createandrunworkbench workbenchadvisor createandrunworkbench creates the code display code to be used by the workbench it is the caller s responsibility to dispose the resulting code display code not the workbench s return the display since 3 0 public static display create display return workbench create display createdisplay createdisplay returns the testable object facade for use by the test harness p important this method is only for use by the test harness applications and regular plug ins should not call this method p return the testable object facade since 3 0 public static testable object get testable object return workbench get workbench testable testableobject gettestableobject getworkbenchtestable returns the preference store used for publicly settable workbench preferences constants for these preferences are defined on link org eclipse ui i workbench preference constants return the workbench public preference store since 3 0 public static i preference store get preference store return pref util getapi preference store iworkbenchpreferenceconstants ipreferencestore getpreferencestore prefutil getapipreferencestore block instantiation private platformui do nothing returns the workbench fails if the workbench has not been created yet return the workbench public static i workbench get workbench if workbench get instance null app forgot to call create and run workbench beforehand throw new illegal state exception workbench messages platformui noworkbench return workbench get instance iworkbench getworkbench getinstance createandrunworkbench illegalstateexception workbenchmessages platformui_noworkbench getinstance returns whether link create and run workbench create and run workbench has been called to create the workbench and the workbench has yet to terminate return code true code if the workbench has been created and is still running and code false code if the workbench has not yet been created or has completed since 3 0 public static boolean is workbench running return workbench get instance null workbench get instance is running createandrunworkbench createandrunworkbench isworkbenchrunning getinstance getinstance isrunning creates the workbench and associates it with the given display and workbench advisor and runs the workbench ui this entails processing and dispatching events until the workbench is closed or restarted p this method is intended to be called by the main class the application fails if the workbench ui has already been created p p use link create display create display to create the display to pass in p p note that this method is intended to be called by the application code org eclipse core boot i platform runnable code it must be called exactly once and early on before anyone else asks code get workbench code for the workbench p param display the display to be used for all ui interactions with the workbench param advisor the application specific advisor that configures and specializes the workbench return return code link return ok return ok for normal exit link return restart return restart if the workbench was terminated with a call to link i workbench restart i workbench restart link return unstartable return unstartable if the workbench could not be started link return emergency close return emergency close if the ui quit because of an emergency other values reserved for future use since 3 0 public static int create and run workbench display display workbench advisor advisor return workbench create and run workbench display advisor createdisplay createdisplay iplatformrunnable getworkbench return_ok return_ok return_restart return_restart iworkbench iworkbench return_unstartable return_unstartable return_emergency_close return_emergency_close createandrunworkbench workbenchadvisor createandrunworkbench creates the code display code to be used by the workbench it is the caller s responsibility to dispose the resulting code display code not the workbench s return the display since 3 0 public static display create display return workbench create display createdisplay createdisplay returns the testable object facade for use by the test harness p important this method is only for use by the test harness applications and regular plug ins should not call this method p return the testable object facade since 3 0 public static testable object get testable object return workbench get workbench testable testableobject gettestableobject getworkbenchtestable returns the preference store used for publicly settable workbench preferences constants for these preferences are defined on link org eclipse ui i workbench preference constants return the workbench public preference store since 3 0 public static i preference store get preference store return pref util getapi preference store iworkbenchpreferenceconstants ipreferencestore getpreferencestore prefutil getapipreferencestore block instantiation private platformui do nothing returns the workbench fails if the workbench has not been created yet return the workbench public static i workbench get workbench if workbench get instance null app forgot to call create and run workbench beforehand throw new illegal state exception workbench messages platformui noworkbench return workbench get instance iworkbench getworkbench getinstance createandrunworkbench illegalstateexception workbenchmessages platformui_noworkbench getinstance returns whether link create and run workbench create and run workbench has been called to create the workbench and the workbench has yet to terminate return code true code if the workbench has been created and is still running and code false code if the workbench has not yet been created or has completed since 3 0 public static boolean is workbench running return workbench get instance null workbench get instance is running createandrunworkbench createandrunworkbench isworkbenchrunning getinstance getinstance isrunning creates the workbench and associates it with the given display and workbench advisor and runs the workbench ui this entails processing and dispatching events until the workbench is closed or restarted p this method is intended to be called by the main class the application fails if the workbench ui has already been created p p use link create display create display to create the display to pass in p p note that this method is intended to be called by the application code org eclipse core boot i platform runnable code it must be called exactly once and early on before anyone else asks code get workbench code for the workbench p param display the display to be used for all ui interactions with the workbench param advisor the application specific advisor that configures and specializes the workbench return return code link return ok return ok for normal exit link return restart return restart if the workbench was terminated with a call to link i workbench restart i workbench restart link return unstartable return unstartable if the workbench could not be started link return emergency close return emergency close if the ui quit because of an emergency other values reserved for future use since 3 0 public static int create and run workbench display display workbench advisor advisor return workbench create and run workbench display advisor createdisplay createdisplay iplatformrunnable getworkbench return_ok return_ok return_restart return_restart iworkbench iworkbench return_unstartable return_unstartable return_emergency_close return_emergency_close createandrunworkbench workbenchadvisor createandrunworkbench creates the code display code to be used by the workbench it is the caller s responsibility to dispose the resulting code display code not the workbench s return the display since 3 0 public static display create display return workbench create display createdisplay createdisplay returns the testable object facade for use by the test harness p important this method is only for use by the test harness applications and regular plug ins should not call this method p return the testable object facade since 3 0 public static testable object get testable object return workbench get workbench testable testableobject gettestableobject getworkbenchtestable returns the preference store used for publicly settable workbench preferences constants for these preferences are defined on link org eclipse ui i workbench preference constants return the workbench public preference store since 3 0 public static i preference store get preference store return pref util getapi preference store iworkbenchpreferenceconstants ipreferencestore getpreferencestore prefutil getapipreferencestore block instantiation private platformui do nothing returns the workbench fails if the workbench has not been created yet return the workbench public static i workbench get workbench if workbench get instance null app forgot to call create and run workbench beforehand throw new illegal state exception workbench messages platformui noworkbench return workbench get instance iworkbench getworkbench getinstance createandrunworkbench illegalstateexception workbenchmessages platformui_noworkbench getinstance returns whether link create and run workbench create and run workbench has been called to create the workbench and the workbench has yet to terminate return code true code if the workbench has been created and is still running and code false code if the workbench has not yet been created or has completed since 3 0 public static boolean is workbench running return workbench get instance null workbench get instance is running createandrunworkbench createandrunworkbench isworkbenchrunning getinstance getinstance isrunning creates the workbench and associates it with the given display and workbench advisor and runs the workbench ui this entails processing and dispatching events until the workbench is closed or restarted p this method is intended to be called by the main class the application fails if the workbench ui has already been created p p use link create display create display to create the display to pass in p p note that this method is intended to be called by the application code org eclipse core boot i platform runnable code it must be called exactly once and early on before anyone else asks code get workbench code for the workbench p param display the display to be used for all ui interactions with the workbench param advisor the application specific advisor that configures and specializes the workbench return return code link return ok return ok for normal exit link return restart return restart if the workbench was terminated with a call to link i workbench restart i workbench restart link return unstartable return unstartable if the workbench could not be started link return emergency close return emergency close if the ui quit because of an emergency other values reserved for future use since 3 0 public static int create and run workbench display display workbench advisor advisor return workbench create and run workbench display advisor createdisplay createdisplay iplatformrunnable getworkbench return_ok return_ok return_restart return_restart iworkbench iworkbench return_unstartable return_unstartable return_emergency_close return_emergency_close createandrunworkbench workbenchadvisor createandrunworkbench creates the code display code to be used by the workbench it is the caller s responsibility to dispose the resulting code display code not the workbench s return the display since 3 0 public static display create display return workbench create display createdisplay createdisplay returns the testable object facade for use by the test harness p important this method is only for use by the test harness applications and regular plug ins should not call this method p return the testable object facade since 3 0 public static testable object get testable object return workbench get workbench testable testableobject gettestableobject getworkbenchtestable returns the preference store used for publicly settable workbench preferences constants for these preferences are defined on link org eclipse ui i workbench preference constants return the workbench public preference store since 3 0 public static i preference store get preference store return pref util getapi preference store iworkbenchpreferenceconstants ipreferencestore getpreferencestore prefutil getapipreferencestore block instantiation private platformui do nothing returns the workbench fails if the workbench has not been created yet return the workbench public static i workbench get workbench if workbench get instance null app forgot to call create and run workbench beforehand throw new illegal state exception workbench messages platformui noworkbench return workbench get instance iworkbench getworkbench getinstance createandrunworkbench illegalstateexception workbenchmessages platformui_noworkbench getinstance returns whether link create and run workbench create and run workbench has been called to create the workbench and the workbench has yet to terminate return code true code if the workbench has been created and is still running and code false code if the workbench has not yet been created or has completed since 3 0 public static boolean is workbench running return workbench get instance null workbench get instance is running createandrunworkbench createandrunworkbench isworkbenchrunning getinstance getinstance isrunning creates the workbench and associates it with the given display and workbench advisor and runs the workbench ui this entails processing and dispatching events until the workbench is closed or restarted p this method is intended to be called by the main class the application fails if the workbench ui has already been created p p use link create display create display to create the display to pass in p p note that this method is intended to be called by the application code org eclipse core boot i platform runnable code it must be called exactly once and early on before anyone else asks code get workbench code for the workbench p param display the display to be used for all ui interactions with the workbench param advisor the application specific advisor that configures and specializes the workbench return return code link return ok return ok for normal exit link return restart return restart if the workbench was terminated with a call to link i workbench restart i workbench restart link return unstartable return unstartable if the workbench could not be started link return emergency close return emergency close if the ui quit because of an emergency other values reserved for future use since 3 0 public static int create and run workbench display display workbench advisor advisor return workbench create and run workbench display advisor createdisplay createdisplay iplatformrunnable getworkbench return_ok return_ok return_restart return_restart iworkbench iworkbench return_unstartable return_unstartable return_emergency_close return_emergency_close createandrunworkbench workbenchadvisor createandrunworkbench creates the code display code to be used by the workbench it is the caller s responsibility to dispose the resulting code display code not the workbench s return the display since 3 0 public static display create display return workbench create display createdisplay createdisplay returns the testable object facade for use by the test harness p important this method is only for use by the test harness applications and regular plug ins should not call this method p return the testable object facade since 3 0 public static testable object get testable object return workbench get workbench testable testableobject gettestableobject getworkbenchtestable returns the preference store used for publicly settable workbench preferences constants for these preferences are defined on link org eclipse ui i workbench preference constants return the workbench public preference store since 3 0 public static i preference store get preference store return pref util getapi preference store iworkbenchpreferenceconstants ipreferencestore getpreferencestore prefutil getapipreferencestore block instantiation private platformui do nothing returns the workbench fails if the workbench has not been created yet return the workbench public static i workbench get workbench if workbench get instance null app forgot to call create and run workbench beforehand throw new illegal state exception workbench messages platformui noworkbench return workbench get instance iworkbench getworkbench getinstance createandrunworkbench illegalstateexception workbenchmessages platformui_noworkbench getinstance returns whether link create and run workbench create and run workbench has been called to create the workbench and the workbench has yet to terminate return code true code if the workbench has been created and is still running and code false code if the workbench has not yet been created or has completed since 3 0 public static boolean is workbench running return workbench get instance null workbench get instance is running createandrunworkbench createandrunworkbench isworkbenchrunning getinstance getinstance isrunning creates the workbench and associates it with the given display and workbench advisor and runs the workbench ui this entails processing and dispatching events until the workbench is closed or restarted p this method is intended to be called by the main class the application fails if the workbench ui has already been created p p use link create display create display to create the display to pass in p p note that this method is intended to be called by the application code org eclipse core boot i platform runnable code it must be called exactly once and early on before anyone else asks code get workbench code for the workbench p param display the display to be used for all ui interactions with the workbench param advisor the application specific advisor that configures and specializes the workbench return return code link return ok return ok for normal exit link return restart return restart if the workbench was terminated with a call to link i workbench restart i workbench restart link return unstartable return unstartable if the workbench could not be started link return emergency close return emergency close if the ui quit because of an emergency other values reserved for future use since 3 0 public static int create and run workbench display display workbench advisor advisor return workbench create and run workbench display advisor createdisplay createdisplay iplatformrunnable getworkbench return_ok return_ok return_restart return_restart iworkbench iworkbench return_unstartable return_unstartable return_emergency_close return_emergency_close createandrunworkbench workbenchadvisor createandrunworkbench creates the code display code to be used by the workbench it is the caller s responsibility to dispose the resulting code display code not the workbench s return the display since 3 0 public static display create display return workbench create display createdisplay createdisplay returns the testable object facade for use by the test harness p important this method is only for use by the test harness applications and regular plug ins should not call this method p return the testable object facade since 3 0 public static testable object get testable object return workbench get workbench testable testableobject gettestableobject getworkbenchtestable returns the preference store used for publicly settable workbench preferences constants for these preferences are defined on link org eclipse ui i workbench preference constants return the workbench public preference store since 3 0 public static i preference store get preference store return pref util getapi preference store iworkbenchpreferenceconstants ipreferencestore getpreferencestore prefutil getapipreferencestore block instantiation private platformui do nothing returns the workbench fails if the workbench has not been created yet return the workbench public static i workbench get workbench if workbench get instance null app forgot to call create and run workbench beforehand throw new illegal state exception workbench messages platformui noworkbench return workbench get instance iworkbench getworkbench getinstance createandrunworkbench illegalstateexception workbenchmessages platformui_noworkbench getinstance returns whether link create and run workbench create and run workbench has been called to create the workbench and the workbench has yet to terminate return code true code if the workbench has been created and is still running and code false code if the workbench has not yet been created or has completed since 3 0 public static boolean is workbench running return workbench get instance null workbench get instance is running createandrunworkbench createandrunworkbench isworkbenchrunning getinstance getinstance isrunning creates the workbench and associates it with the given display and workbench advisor and runs the workbench ui this entails processing and dispatching events until the workbench is closed or restarted p this method is intended to be called by the main class the application fails if the workbench ui has already been created p p use link create display create display to create the display to pass in p p note that this method is intended to be called by the application code org eclipse core boot i platform runnable code it must be called exactly once and early on before anyone else asks code get workbench code for the workbench p param display the display to be used for all ui interactions with the workbench param advisor the application specific advisor that configures and specializes the workbench return return code link return ok return ok for normal exit link return restart return restart if the workbench was terminated with a call to link i workbench restart i workbench restart link return unstartable return unstartable if the workbench could not be started link return emergency close return emergency close if the ui quit because of an emergency other values reserved for future use since 3 0 public static int create and run workbench display display workbench advisor advisor return workbench create and run workbench display advisor createdisplay createdisplay iplatformrunnable getworkbench return_ok return_ok return_restart return_restart iworkbench iworkbench return_unstartable return_unstartable return_emergency_close return_emergency_close createandrunworkbench workbenchadvisor createandrunworkbench creates the code display code to be used by the workbench it is the caller s responsibility to dispose the resulting code display code not the workbench s return the display since 3 0 public static display create display return workbench create display createdisplay createdisplay returns the testable object facade for use by the test harness p important this method is only for use by the test harness applications and regular plug ins should not call this method p return the testable object facade since 3 0 public static testable object get testable object return workbench get workbench testable testableobject gettestableobject getworkbenchtestable returns the preference store used for publicly settable workbench preferences constants for these preferences are defined on link org eclipse ui i workbench preference constants return the workbench public preference store since 3 0 public static i preference store get preference store return pref util getapi preference store iworkbenchpreferenceconstants ipreferencestore getpreferencestore prefutil getapipreferencestore block instantiation private platformui do nothing returns the workbench fails if the workbench has not been created yet return the workbench public static i workbench get workbench if workbench get instance null app forgot to call create and run workbench beforehand throw new illegal state exception workbench messages platformui noworkbench return workbench get instance iworkbench getworkbench getinstance createandrunworkbench illegalstateexception workbenchmessages platformui_noworkbench getinstance returns whether link create and run workbench create and run workbench has been called to create the workbench and the workbench has yet to terminate return code true code if the workbench has been created and is still running and code false code if the workbench has not yet been created or has completed since 3 0 public static boolean is workbench running return workbench get instance null workbench get instance is running createandrunworkbench createandrunworkbench isworkbenchrunning getinstance getinstance isrunning creates the workbench and associates it with the given display and workbench advisor and runs the workbench ui this entails processing and dispatching events until the workbench is closed or restarted p this method is intended to be called by the main class the application fails if the workbench ui has already been created p p use link create display create display to create the display to pass in p p note that this method is intended to be called by the application code org eclipse core boot i platform runnable code it must be called exactly once and early on before anyone else asks code get workbench code for the workbench p param display the display to be used for all ui interactions with the workbench param advisor the application specific advisor that configures and specializes the workbench return return code link return ok return ok for normal exit link return restart return restart if the workbench was terminated with a call to link i workbench restart i workbench restart link return unstartable return unstartable if the workbench could not be started link return emergency close return emergency close if the ui quit because of an emergency other values reserved for future use since 3 0 public static int create and run workbench display display workbench advisor advisor return workbench create and run workbench display advisor createdisplay createdisplay iplatformrunnable getworkbench return_ok return_ok return_restart return_restart iworkbench iworkbench return_unstartable return_unstartable return_emergency_close return_emergency_close createandrunworkbench workbenchadvisor createandrunworkbench creates the code display code to be used by the workbench it is the caller s responsibility to dispose the resulting code display code not the workbench s return the display since 3 0 public static display create display return workbench create display createdisplay createdisplay returns the testable object facade for use by the test harness p important this method is only for use by the test harness applications and regular plug ins should not call this method p return the testable object facade since 3 0 public static testable object get testable object return workbench get workbench testable testableobject gettestableobject getworkbenchtestable returns the preference store used for publicly settable workbench preferences constants for these preferences are defined on link org eclipse ui i workbench preference constants return the workbench public preference store since 3 0 public static i preference store get preference store return pref util getapi preference store iworkbenchpreferenceconstants ipreferencestore getpreferencestore prefutil getapipreferencestore block instantiation private platformui do nothing returns the workbench fails if the workbench has not been created yet return the workbench public static i workbench get workbench if workbench get instance null app forgot to call create and run workbench beforehand throw new illegal state exception workbench messages platformui noworkbench return workbench get instance iworkbench getworkbench getinstance createandrunworkbench illegalstateexception workbenchmessages platformui_noworkbench getinstance returns whether link create and run workbench create and run workbench has been called to create the workbench and the workbench has yet to terminate return code true code if the workbench has been created and is still running and code false code if the workbench has not yet been created or has completed since 3 0 public static boolean is workbench running return workbench get instance null workbench get instance is running createandrunworkbench createandrunworkbench isworkbenchrunning getinstance getinstance isrunning creates the workbench and associates it with the given display and workbench advisor and runs the workbench ui this entails processing and dispatching events until the workbench is closed or restarted p this method is intended to be called by the main class the application fails if the workbench ui has already been created p p use link create display create display to create the display to pass in p p note that this method is intended to be called by the application code org eclipse core boot i platform runnable code it must be called exactly once and early on before anyone else asks code get workbench code for the workbench p param display the display to be used for all ui interactions with the workbench param advisor the application specific advisor that configures and specializes the workbench return return code link return ok return ok for normal exit link return restart return restart if the workbench was terminated with a call to link i workbench restart i workbench restart link return unstartable return unstartable if the workbench could not be started link return emergency close return emergency close if the ui quit because of an emergency other values reserved for future use since 3 0 public static int create and run workbench display display workbench advisor advisor return workbench create and run workbench display advisor createdisplay createdisplay iplatformrunnable getworkbench return_ok return_ok return_restart return_restart iworkbench iworkbench return_unstartable return_unstartable return_emergency_close return_emergency_close createandrunworkbench workbenchadvisor createandrunworkbench creates the code display code to be used by the workbench it is the caller s responsibility to dispose the resulting code display code not the workbench s return the display since 3 0 public static display create display return workbench create display createdisplay createdisplay returns the testable object facade for use by the test harness p important this method is only for use by the test harness applications and regular plug ins should not call this method p return the testable object facade since 3 0 public static testable object get testable object return workbench get workbench testable testableobject gettestableobject getworkbenchtestable returns the preference store used for publicly settable workbench preferences constants for these preferences are defined on link org eclipse ui i workbench preference constants return the workbench public preference store since 3 0 public static i preference store get preference store return pref util getapi preference store iworkbenchpreferenceconstants ipreferencestore getpreferencestore prefutil getapipreferencestore block instantiation private platformui do nothing returns the workbench fails if the workbench has not been created yet return the workbench public static i workbench get workbench if workbench get instance null app forgot to call create and run workbench beforehand throw new illegal state exception workbench messages platformui noworkbench return workbench get instance iworkbench getworkbench getinstance createandrunworkbench illegalstateexception workbenchmessages platformui_noworkbench getinstance returns whether link create and run workbench create and run workbench has been called to create the workbench and the workbench has yet to terminate return code true code if the workbench has been created and is still running and code false code if the workbench has not yet been created or has completed since 3 0 public static boolean is workbench running return workbench get instance null workbench get instance is running createandrunworkbench createandrunworkbench isworkbenchrunning getinstance getinstance isrunning creates the workbench and associates it with the given display and workbench advisor and runs the workbench ui this entails processing and dispatching events until the workbench is closed or restarted p this method is intended to be called by the main class the application fails if the workbench ui has already been created p p use link create display create display to create the display to pass in p p note that this method is intended to be called by the application code org eclipse core boot i platform runnable code it must be called exactly once and early on before anyone else asks code get workbench code for the workbench p param display the display to be used for all ui interactions with the workbench param advisor the application specific advisor that configures and specializes the workbench return return code link return ok return ok for normal exit link return restart return restart if the workbench was terminated with a call to link i workbench restart i workbench restart link return unstartable return unstartable if the workbench could not be started link return emergency close return emergency close if the ui quit because of an emergency other values reserved for future use since 3 0 public static int create and run workbench display display workbench advisor advisor return workbench create and run workbench display advisor createdisplay createdisplay iplatformrunnable getworkbench return_ok return_ok return_restart return_restart iworkbench iworkbench return_unstartable return_unstartable return_emergency_close return_emergency_close createandrunworkbench workbenchadvisor createandrunworkbench creates the code display code to be used by the workbench it is the caller s responsibility to dispose the resulting code display code not the workbench s return the display since 3 0 public static display create display return workbench create display createdisplay createdisplay returns the testable object facade for use by the test harness p important this method is only for use by the test harness applications and regular plug ins should not call this method p return the testable object facade since 3 0 public static testable object get testable object return workbench get workbench testable testableobject gettestableobject getworkbenchtestable returns the preference store used for publicly settable workbench preferences constants for these preferences are defined on link org eclipse ui i workbench preference constants return the workbench public preference store since 3 0 public static i preference store get preference store return pref util getapi preference store iworkbenchpreferenceconstants ipreferencestore getpreferencestore prefutil getapipreferencestore block instantiation private platformui do nothing returns the workbench fails if the workbench has not been created yet return the workbench public static i workbench get workbench if workbench get instance null app forgot to call create and run workbench beforehand throw new illegal state exception workbench messages platformui noworkbench return workbench get instance iworkbench getworkbench getinstance createandrunworkbench illegalstateexception workbenchmessages platformui_noworkbench getinstance returns whether link create and run workbench create and run workbench has been called to create the workbench and the workbench has yet to terminate return code true code if the workbench has been created and is still running and code false code if the workbench has not yet been created or has completed since 3 0 public static boolean is workbench running return workbench get instance null workbench get instance is running createandrunworkbench createandrunworkbench isworkbenchrunning getinstance getinstance isrunning creates the workbench and associates it with the given display and workbench advisor and runs the workbench ui this entails processing and dispatching events until the workbench is closed or restarted p this method is intended to be called by the main class the application fails if the workbench ui has already been created p p use link create display create display to create the display to pass in p p note that this method is intended to be called by the application code org eclipse core boot i platform runnable code it must be called exactly once and early on before anyone else asks code get workbench code for the workbench p param display the display to be used for all ui interactions with the workbench param advisor the application specific advisor that configures and specializes the workbench return return code link return ok return ok for normal exit link return restart return restart if the workbench was terminated with a call to link i workbench restart i workbench restart link return unstartable return unstartable if the workbench could not be started link return emergency close return emergency close if the ui quit because of an emergency other values reserved for future use since 3 0 public static int create and run workbench display display workbench advisor advisor return workbench create and run workbench display advisor createdisplay createdisplay iplatformrunnable getworkbench return_ok return_ok return_restart return_restart iworkbench iworkbench return_unstartable return_unstartable return_emergency_close return_emergency_close createandrunworkbench workbenchadvisor createandrunworkbench creates the code display code to be used by the workbench it is the caller s responsibility to dispose the resulting code display code not the workbench s return the display since 3 0 public static display create display return workbench create display createdisplay createdisplay returns the testable object facade for use by the test harness p important this method is only for use by the test harness applications and regular plug ins should not call this method p return the testable object facade since 3 0 public static testable object get testable object return workbench get workbench testable testableobject gettestableobject getworkbenchtestable returns the preference store used for publicly settable workbench preferences constants for these preferences are defined on link org eclipse ui i workbench preference constants return the workbench public preference store since 3 0 public static i preference store get preference store return pref util getapi preference store iworkbenchpreferenceconstants ipreferencestore getpreferencestore prefutil getapipreferencestore block instantiation private platformui do nothing returns the workbench fails if the workbench has not been created yet return the workbench public static i workbench get workbench if workbench get instance null app forgot to call create and run workbench beforehand throw new illegal state exception workbench messages platformui noworkbench return workbench get instance iworkbench getworkbench getinstance createandrunworkbench illegalstateexception workbenchmessages platformui_noworkbench getinstance returns whether link create and run workbench create and run workbench has been called to create the workbench and the workbench has yet to terminate return code true code if the workbench has been created and is still running and code false code if the workbench has not yet been created or has completed since 3 0 public static boolean is workbench running return workbench get instance null workbench get instance is running createandrunworkbench createandrunworkbench isworkbenchrunning getinstance getinstance isrunning creates the workbench and associates it with the given display and workbench advisor and runs the workbench ui this entails processing and dispatching events until the workbench is closed or restarted p this method is intended to be called by the main class the application fails if the workbench ui has already been created p p use link create display create display to create the display to pass in p p note that this method is intended to be called by the application code org eclipse core boot i platform runnable code it must be called exactly once and early on before anyone else asks code get workbench code for the workbench p param display the display to be used for all ui interactions with the workbench param advisor the application specific advisor that configures and specializes the workbench return return code link return ok return ok for normal exit link return restart return restart if the workbench was terminated with a call to link i workbench restart i workbench restart link return unstartable return unstartable if the workbench could not be started link return emergency close return emergency close if the ui quit because of an emergency other values reserved for future use since 3 0 public static int create and run workbench display display workbench advisor advisor return workbench create and run workbench display advisor createdisplay createdisplay iplatformrunnable getworkbench return_ok return_ok return_restart return_restart iworkbench iworkbench return_unstartable return_unstartable return_emergency_close return_emergency_close createandrunworkbench workbenchadvisor createandrunworkbench creates the code display code to be used by the workbench it is the caller s responsibility to dispose the resulting code display code not the workbench s return the display since 3 0 public static display create display return workbench create display createdisplay createdisplay returns the testable object facade for use by the test harness p important this method is only for use by the test harness applications and regular plug ins should not call this method p return the testable object facade since 3 0 public static testable object get testable object return workbench get workbench testable testableobject gettestableobject getworkbenchtestable returns the preference store used for publicly settable workbench preferences constants for these preferences are defined on link org eclipse ui i workbench preference constants return the workbench public preference store since 3 0 public static i preference store get preference store return pref util getapi preference store iworkbenchpreferenceconstants ipreferencestore getpreferencestore prefutil getapipreferencestore block instantiation private platformui do nothing returns the workbench fails if the workbench has not been created yet return the workbench public static i workbench get workbench if workbench get instance null app forgot to call create and run workbench beforehand throw new illegal state exception workbench messages platformui noworkbench return workbench get instance iworkbench getworkbench getinstance createandrunworkbench illegalstateexception workbenchmessages platformui_noworkbench getinstance returns whether link create and run workbench create and run workbench has been called to create the workbench and the workbench has yet to terminate return code true code if the workbench has been created and is still running and code false code if the workbench has not yet been created or has completed since 3 0 public static boolean is workbench running return workbench get instance null workbench get instance is running createandrunworkbench createandrunworkbench isworkbenchrunning getinstance getinstance isrunning creates the workbench and associates it with the given display and workbench advisor and runs the workbench ui this entails processing and dispatching events until the workbench is closed or restarted p this method is intended to be called by the main class the application fails if the workbench ui has already been created p p use link create display create display to create the display to pass in p p note that this method is intended to be called by the application code org eclipse core boot i platform runnable code it must be called exactly once and early on before anyone else asks code get workbench code for the workbench p param display the display to be used for all ui interactions with the workbench param advisor the application specific advisor that configures and specializes the workbench return return code link return ok return ok for normal exit link return restart return restart if the workbench was terminated with a call to link i workbench restart i workbench restart link return unstartable return unstartable if the workbench could not be started link return emergency close return emergency close if the ui quit because of an emergency other values reserved for future use since 3 0 public static int create and run workbench display display workbench advisor advisor return workbench create and run workbench display advisor createdisplay createdisplay iplatformrunnable getworkbench return_ok return_ok return_restart return_restart iworkbench iworkbench return_unstartable return_unstartable return_emergency_close return_emergency_close createandrunworkbench workbenchadvisor createandrunworkbench creates the code display code to be used by the workbench it is the caller s responsibility to dispose the resulting code display code not the workbench s return the display since 3 0 public static display create display return workbench create display createdisplay createdisplay returns the testable object facade for use by the test harness p important this method is only for use by the test harness applications and regular plug ins should not call this method p return the testable object facade since 3 0 public static testable object get testable object return workbench get workbench testable testableobject gettestableobject getworkbenchtestable returns the preference store used for publicly settable workbench preferences constants for these preferences are defined on link org eclipse ui i workbench preference constants return the workbench public preference store since 3 0 public static i preference store get preference store return pref util getapi preference store iworkbenchpreferenceconstants ipreferencestore getpreferencestore prefutil getapipreferencestore block instantiation private platformui do nothing returns the workbench fails if the workbench has not been created yet return the workbench public static i workbench get workbench if workbench get instance null app forgot to call create and run workbench beforehand throw new illegal state exception workbench messages platformui noworkbench return workbench get instance iworkbench getworkbench getinstance createandrunworkbench illegalstateexception workbenchmessages platformui_noworkbench getinstance returns whether link create and run workbench create and run workbench has been called to create the workbench and the workbench has yet to terminate return code true code if the workbench has been created and is still running and code false code if the workbench has not yet been created or has completed since 3 0 public static boolean is workbench running return workbench get instance null workbench get instance is running createandrunworkbench createandrunworkbench isworkbenchrunning getinstance getinstance isrunning creates the workbench and associates it with the given display and workbench advisor and runs the workbench ui this entails processing and dispatching events until the workbench is closed or restarted p this method is intended to be called by the main class the application fails if the workbench ui has already been created p p use link create display create display to create the display to pass in p p note that this method is intended to be called by the application code org eclipse core boot i platform runnable code it must be called exactly once and early on before anyone else asks code get workbench code for the workbench p param display the display to be used for all ui interactions with the workbench param advisor the application specific advisor that configures and specializes the workbench return return code link return ok return ok for normal exit link return restart return restart if the workbench was terminated with a call to link i workbench restart i workbench restart link return unstartable return unstartable if the workbench could not be started link return emergency close return emergency close if the ui quit because of an emergency other values reserved for future use since 3 0 public static int create and run workbench display display workbench advisor advisor return workbench create and run workbench display advisor createdisplay createdisplay iplatformrunnable getworkbench return_ok return_ok return_restart return_restart iworkbench iworkbench return_unstartable return_unstartable return_emergency_close return_emergency_close createandrunworkbench workbenchadvisor createandrunworkbench creates the code display code to be used by the workbench it is the caller s responsibility to dispose the resulting code display code not the workbench s return the display since 3 0 public static display create display return workbench create display createdisplay createdisplay returns the testable object facade for use by the test harness p important this method is only for use by the test harness applications and regular plug ins should not call this method p return the testable object facade since 3 0 public static testable object get testable object return workbench get workbench testable testableobject gettestableobject getworkbenchtestable returns the preference store used for publicly settable workbench preferences constants for these preferences are defined on link org eclipse ui i workbench preference constants return the workbench public preference store since 3 0 public static i preference store get preference store return pref util getapi preference store iworkbenchpreferenceconstants ipreferencestore getpreferencestore prefutil getapipreferencestore block instantiation private platformui do nothing returns the workbench fails if the workbench has not been created yet return the workbench public static i workbench get workbench if workbench get instance null app forgot to call create and run workbench beforehand throw new illegal state exception workbench messages platformui noworkbench return workbench get instance iworkbench getworkbench getinstance createandrunworkbench illegalstateexception workbenchmessages platformui_noworkbench getinstance returns whether link create and run workbench create and run workbench has been called to create the workbench and the workbench has yet to terminate return code true code if the workbench has been created and is still running and code false code if the workbench has not yet been created or has completed since 3 0 public static boolean is workbench running return workbench get instance null workbench get instance is running createandrunworkbench createandrunworkbench isworkbenchrunning getinstance getinstance isrunning creates the workbench and associates it with the given display and workbench advisor and runs the workbench ui this entails processing and dispatching events until the workbench is closed or restarted p this method is intended to be called by the main class the application fails if the workbench ui has already been created p p use link create display create display to create the display to pass in p p note that this method is intended to be called by the application code org eclipse core boot i platform runnable code it must be called exactly once and early on before anyone else asks code get workbench code for the workbench p param display the display to be used for all ui interactions with the workbench param advisor the application specific advisor that configures and specializes the workbench return return code link return ok return ok for normal exit link return restart return restart if the workbench was terminated with a call to link i workbench restart i workbench restart link return unstartable return unstartable if the workbench could not be started link return emergency close return emergency close if the ui quit because of an emergency other values reserved for future use since 3 0 public static int create and run workbench display display workbench advisor advisor return workbench create and run workbench display advisor createdisplay createdisplay iplatformrunnable getworkbench return_ok return_ok return_restart return_restart iworkbench iworkbench return_unstartable return_unstartable return_emergency_close return_emergency_close createandrunworkbench workbenchadvisor createandrunworkbench creates the code display code to be used by the workbench it is the caller s responsibility to dispose the resulting code display code not the workbench s return the display since 3 0 public static display create display return workbench create display createdisplay createdisplay returns the testable object facade for use by the test harness p important this method is only for use by the test harness applications and regular plug ins should not call this method p return the testable object facade since 3 0 public static testable object get testable object return workbench get workbench testable testableobject gettestableobject getworkbenchtestable returns the preference store used for publicly settable workbench preferences constants for these preferences are defined on link org eclipse ui i workbench preference constants return the workbench public preference store since 3 0 public static i preference store get preference store return pref util getapi preference store iworkbenchpreferenceconstants ipreferencestore getpreferencestore prefutil getapipreferencestore block instantiation private platformui do nothing returns the workbench fails if the workbench has not been created yet return the workbench public static i workbench get workbench if workbench get instance null app forgot to call create and run workbench beforehand throw new illegal state exception workbench messages platformui noworkbench return workbench get instance iworkbench getworkbench getinstance createandrunworkbench illegalstateexception workbenchmessages platformui_noworkbench getinstance returns whether link create and run workbench create and run workbench has been called to create the workbench and the workbench has yet to terminate return code true code if the workbench has been created and is still running and code false code if the workbench has not yet been created or has completed since 3 0 public static boolean is workbench running return workbench get instance null workbench get instance is running createandrunworkbench createandrunworkbench isworkbenchrunning getinstance getinstance isrunning creates the workbench and associates it with the given display and workbench advisor and runs the workbench ui this entails processing and dispatching events until the workbench is closed or restarted p this method is intended to be called by the main class the application fails if the workbench ui has already been created p p use link create display create display to create the display to pass in p p note that this method is intended to be called by the application code org eclipse core boot i platform runnable code it must be called exactly once and early on before anyone else asks code get workbench code for the workbench p param display the display to be used for all ui interactions with the workbench param advisor the application specific advisor that configures and specializes the workbench return return code link return ok return ok for normal exit link return restart return restart if the workbench was terminated with a call to link i workbench restart i workbench restart link return unstartable return unstartable if the workbench could not be started link return emergency close return emergency close if the ui quit because of an emergency other values reserved for future use since 3 0 public static int create and run workbench display display workbench advisor advisor return workbench create and run workbench display advisor createdisplay createdisplay iplatformrunnable getworkbench return_ok return_ok return_restart return_restart iworkbench iworkbench return_unstartable return_unstartable return_emergency_close return_emergency_close createandrunworkbench workbenchadvisor createandrunworkbench creates the code display code to be used by the workbench it is the caller s responsibility to dispose the resulting code display code not the workbench s return the display since 3 0 public static display create display return workbench create display createdisplay createdisplay returns the testable object facade for use by the test harness p important this method is only for use by the test harness applications and regular plug ins should not call this method p return the testable object facade since 3 0 public static testable object get testable object return workbench get workbench testable testableobject gettestableobject getworkbenchtestable returns the preference store used for publicly settable workbench preferences constants for these preferences are defined on link org eclipse ui i workbench preference constants return the workbench public preference store since 3 0 public static i preference store get preference store return pref util getapi preference store iworkbenchpreferenceconstants ipreferencestore getpreferencestore prefutil getapipreferencestore block instantiation private platformui do nothing returns the workbench fails if the workbench has not been created yet return the workbench public static i workbench get workbench if workbench get instance null app forgot to call create and run workbench beforehand throw new illegal state exception workbench messages platformui noworkbench return workbench get instance iworkbench getworkbench getinstance createandrunworkbench illegalstateexception workbenchmessages platformui_noworkbench getinstance returns whether link create and run workbench create and run workbench has been called to create the workbench and the workbench has yet to terminate return code true code if the workbench has been created and is still running and code false code if the workbench has not yet been created or has completed since 3 0 public static boolean is workbench running return workbench get instance null workbench get instance is running createandrunworkbench createandrunworkbench isworkbenchrunning getinstance getinstance isrunning creates the workbench and associates it with the given display and workbench advisor and runs the workbench ui this entails processing and dispatching events until the workbench is closed or restarted p this method is intended to be called by the main class the application fails if the workbench ui has already been created p p use link create display create display to create the display to pass in p p note that this method is intended to be called by the application code org eclipse core boot i platform runnable code it must be called exactly once and early on before anyone else asks code get workbench code for the workbench p param display the display to be used for all ui interactions with the workbench param advisor the application specific advisor that configures and specializes the workbench return return code link return ok return ok for normal exit link return restart return restart if the workbench was terminated with a call to link i workbench restart i workbench restart link return unstartable return unstartable if the workbench could not be started link return emergency close return emergency close if the ui quit because of an emergency other values reserved for future use since 3 0 public static int create and run workbench display display workbench advisor advisor return workbench create and run workbench display advisor createdisplay createdisplay iplatformrunnable getworkbench return_ok return_ok return_restart return_restart iworkbench iworkbench return_unstartable return_unstartable return_emergency_close return_emergency_close createandrunworkbench workbenchadvisor createandrunworkbench creates the code display code to be used by the workbench it is the caller s responsibility to dispose the resulting code display code not the workbench s return the display since 3 0 public static display create display return workbench create display createdisplay createdisplay returns the testable object facade for use by the test harness p important this method is only for use by the test harness applications and regular plug ins should not call this method p return the testable object facade since 3 0 public static testable object get testable object return workbench get workbench testable testableobject gettestableobject getworkbenchtestable returns the preference store used for publicly settable workbench preferences constants for these preferences are defined on link org eclipse ui i workbench preference constants return the workbench public preference store since 3 0 public static i preference store get preference store return pref util getapi preference store iworkbenchpreferenceconstants ipreferencestore getpreferencestore prefutil getapipreferencestore block instantiation private platformui do nothing returns the workbench fails if the workbench has not been created yet return the workbench public static i workbench get workbench if workbench get instance null app forgot to call create and run workbench beforehand throw new illegal state exception workbench messages platformui noworkbench return workbench get instance iworkbench getworkbench getinstance createandrunworkbench illegalstateexception workbenchmessages platformui_noworkbench getinstance returns whether link create and run workbench create and run workbench has been called to create the workbench and the workbench has yet to terminate return code true code if the workbench has been created and is still running and code false code if the workbench has not yet been created or has completed since 3 0 public static boolean is workbench running return workbench get instance null workbench get instance is running createandrunworkbench createandrunworkbench isworkbenchrunning getinstance getinstance isrunning creates the workbench and associates it with the given display and workbench advisor and runs the workbench ui this entails processing and dispatching events until the workbench is closed or restarted p this method is intended to be called by the main class the application fails if the workbench ui has already been created p p use link create display create display to create the display to pass in p p note that this method is intended to be called by the application code org eclipse core boot i platform runnable code it must be called exactly once and early on before anyone else asks code get workbench code for the workbench p param display the display to be used for all ui interactions with the workbench param advisor the application specific advisor that configures and specializes the workbench return return code link return ok return ok for normal exit link return restart return restart if the workbench was terminated with a call to link i workbench restart i workbench restart link return unstartable return unstartable if the workbench could not be started link return emergency close return emergency close if the ui quit because of an emergency other values reserved for future use since 3 0 public static int create and run workbench display display workbench advisor advisor return workbench create and run workbench display advisor createdisplay createdisplay iplatformrunnable getworkbench return_ok return_ok return_restart return_restart iworkbench iworkbench return_unstartable return_unstartable return_emergency_close return_emergency_close createandrunworkbench workbenchadvisor createandrunworkbench creates the code display code to be used by the workbench it is the caller s responsibility to dispose the resulting code display code not the workbench s return the display since 3 0 public static display create display return workbench create display createdisplay createdisplay returns the testable object facade for use by the test harness p important this method is only for use by the test harness applications and regular plug ins should not call this method p return the testable object facade since 3 0 public static testable object get testable object return workbench get workbench testable testableobject gettestableobject getworkbenchtestable returns the preference store used for publicly settable workbench preferences constants for these preferences are defined on link org eclipse ui i workbench preference constants return the workbench public preference store since 3 0 public static i preference store get preference store return pref util getapi preference store iworkbenchpreferenceconstants ipreferencestore getpreferencestore prefutil getapipreferencestore block instantiation private platformui do nothing returns the workbench fails if the workbench has not been created yet return the workbench public static i workbench get workbench if workbench get instance null app forgot to call create and run workbench beforehand throw new illegal state exception workbench messages platformui noworkbench return workbench get instance iworkbench getworkbench getinstance createandrunworkbench illegalstateexception workbenchmessages platformui_noworkbench getinstance returns whether link create and run workbench create and run workbench has been called to create the workbench and the workbench has yet to terminate return code true code if the workbench has been created and is still running and code false code if the workbench has not yet been created or has completed since 3 0 public static boolean is workbench running return workbench get instance null workbench get instance is running createandrunworkbench createandrunworkbench isworkbenchrunning getinstance getinstance isrunning creates the workbench and associates it with the given display and workbench advisor and runs the workbench ui this entails processing and dispatching events until the workbench is closed or restarted p this method is intended to be called by the main class the application fails if the workbench ui has already been created p p use link create display create display to create the display to pass in p p note that this method is intended to be called by the application code org eclipse core boot i platform runnable code it must be called exactly once and early on before anyone else asks code get workbench code for the workbench p param display the display to be used for all ui interactions with the workbench param advisor the application specific advisor that configures and specializes the workbench return return code link return ok return ok for normal exit link return restart return restart if the workbench was terminated with a call to link i workbench restart i workbench restart link return unstartable return unstartable if the workbench could not be started link return emergency close return emergency close if the ui quit because of an emergency other values reserved for future use since 3 0 public static int create and run workbench display display workbench advisor advisor return workbench create and run workbench display advisor createdisplay createdisplay iplatformrunnable getworkbench return_ok return_ok return_restart return_restart iworkbench iworkbench return_unstartable return_unstartable return_emergency_close return_emergency_close createandrunworkbench workbenchadvisor createandrunworkbench creates the code display code to be used by the workbench it is the caller s responsibility to dispose the resulting code display code not the workbench s return the display since 3 0 public static display create display return workbench create display createdisplay createdisplay returns the testable object facade for use by the test harness p important this method is only for use by the test harness applications and regular plug ins should not call this method p return the testable object facade since 3 0 public static testable object get testable object return workbench get workbench testable testableobject gettestableobject getworkbenchtestable returns the preference store used for publicly settable workbench preferences constants for these preferences are defined on link org eclipse ui i workbench preference constants return the workbench public preference store since 3 0 public static i preference store get preference store return pref util getapi preference store iworkbenchpreferenceconstants ipreferencestore getpreferencestore prefutil getapipreferencestore block instantiation private platformui do nothing returns the workbench fails if the workbench has not been created yet return the workbench public static i workbench get workbench if workbench get instance null app forgot to call create and run workbench beforehand throw new illegal state exception workbench messages platformui noworkbench return workbench get instance iworkbench getworkbench getinstance createandrunworkbench illegalstateexception workbenchmessages platformui_noworkbench getinstance returns whether link create and run workbench create and run workbench has been called to create the workbench and the workbench has yet to terminate return code true code if the workbench has been created and is still running and code false code if the workbench has not yet been created or has completed since 3 0 public static boolean is workbench running return workbench get instance null workbench get instance is running createandrunworkbench createandrunworkbench isworkbenchrunning getinstance getinstance isrunning creates the workbench and associates it with the given display and workbench advisor and runs the workbench ui this entails processing and dispatching events until the workbench is closed or restarted p this method is intended to be called by the main class the application fails if the workbench ui has already been created p p use link create display create display to create the display to pass in p p note that this method is intended to be called by the application code org eclipse core boot i platform runnable code it must be called exactly once and early on before anyone else asks code get workbench code for the workbench p param display the display to be used for all ui interactions with the workbench param advisor the application specific advisor that configures and specializes the workbench return return code link return ok return ok for normal exit link return restart return restart if the workbench was terminated with a call to link i workbench restart i workbench restart link return unstartable return unstartable if the workbench could not be started link return emergency close return emergency close if the ui quit because of an emergency other values reserved for future use since 3 0 public static int create and run workbench display display workbench advisor advisor return workbench create and run workbench display advisor createdisplay createdisplay iplatformrunnable getworkbench return_ok return_ok return_restart return_restart iworkbench iworkbench return_unstartable return_unstartable return_emergency_close return_emergency_close createandrunworkbench workbenchadvisor createandrunworkbench creates the code display code to be used by the workbench it is the caller s responsibility to dispose the resulting code display code not the workbench s return the display since 3 0 public static display create display return workbench create display createdisplay createdisplay returns the testable object facade for use by the test harness p important this method is only for use by the test harness applications and regular plug ins should not call this method p return the testable object facade since 3 0 public static testable object get testable object return workbench get workbench testable testableobject gettestableobject getworkbenchtestable returns the preference store used for publicly settable workbench preferences constants for these preferences are defined on link org eclipse ui i workbench preference constants return the workbench public preference store since 3 0 public static i preference store get preference store return pref util getapi preference store iworkbenchpreferenceconstants ipreferencestore getpreferencestore prefutil getapipreferencestore block instantiation private platformui do nothing returns the workbench fails if the workbench has not been created yet return the workbench public static i workbench get workbench if workbench get instance null app forgot to call create and run workbench beforehand throw new illegal state exception workbench messages platformui noworkbench return workbench get instance iworkbench getworkbench getinstance createandrunworkbench illegalstateexception workbenchmessages platformui_noworkbench getinstance returns whether link create and run workbench create and run workbench has been called to create the workbench and the workbench has yet to terminate return code true code if the workbench has been created and is still running and code false code if the workbench has not yet been created or has completed since 3 0 public static boolean is workbench running return workbench get instance null workbench get instance is running createandrunworkbench createandrunworkbench isworkbenchrunning getinstance getinstance isrunning creates the workbench and associates it with the given display and workbench advisor and runs the workbench ui this entails processing and dispatching events until the workbench is closed or restarted p this method is intended to be called by the main class the application fails if the workbench ui has already been created p p use link create display create display to create the display to pass in p p note that this method is intended to be called by the application code org eclipse core boot i platform runnable code it must be called exactly once and early on before anyone else asks code get workbench code for the workbench p param display the display to be used for all ui interactions with the workbench param advisor the application specific advisor that configures and specializes the workbench return return code link return ok return ok for normal exit link return restart return restart if the workbench was terminated with a call to link i workbench restart i workbench restart link return unstartable return unstartable if the workbench could not be started link return emergency close return emergency close if the ui quit because of an emergency other values reserved for future use since 3 0 public static int create and run workbench display display workbench advisor advisor return workbench create and run workbench display advisor createdisplay createdisplay iplatformrunnable getworkbench return_ok return_ok return_restart return_restart iworkbench iworkbench return_unstartable return_unstartable return_emergency_close return_emergency_close createandrunworkbench workbenchadvisor createandrunworkbench creates the code display code to be used by the workbench it is the caller s responsibility to dispose the resulting code display code not the workbench s return the display since 3 0 public static display create display return workbench create display createdisplay createdisplay returns the testable object facade for use by the test harness p important this method is only for use by the test harness applications and regular plug ins should not call this method p return the testable object facade since 3 0 public static testable object get testable object return workbench get workbench testable testableobject gettestableobject getworkbenchtestable returns the preference store used for publicly settable workbench preferences constants for these preferences are defined on link org eclipse ui i workbench preference constants return the workbench public preference store since 3 0 public static i preference store get preference store return pref util getapi preference store iworkbenchpreferenceconstants ipreferencestore getpreferencestore prefutil getapipreferencestore block instantiation private platformui do nothing returns the workbench fails if the workbench has not been created yet return the workbench public static i workbench get workbench if workbench get instance null app forgot to call create and run workbench beforehand throw new illegal state exception workbench messages platformui noworkbench return workbench get instance iworkbench getworkbench getinstance createandrunworkbench illegalstateexception workbenchmessages platformui_noworkbench getinstance returns whether link create and run workbench create and run workbench has been called to create the workbench and the workbench has yet to terminate return code true code if the workbench has been created and is still running and code false code if the workbench has not yet been created or has completed since 3 0 public static boolean is workbench running return workbench get instance null workbench get instance is running createandrunworkbench createandrunworkbench isworkbenchrunning getinstance getinstance isrunning creates the workbench and associates it with the given display and workbench advisor and runs the workbench ui this entails processing and dispatching events until the workbench is closed or restarted p this method is intended to be called by the main class the application fails if the workbench ui has already been created p p use link create display create display to create the display to pass in p p note that this method is intended to be called by the application code org eclipse core boot i platform runnable code it must be called exactly once and early on before anyone else asks code get workbench code for the workbench p param display the display to be used for all ui interactions with the workbench param advisor the application specific advisor that configures and specializes the workbench return return code link return ok return ok for normal exit link return restart return restart if the workbench was terminated with a call to link i workbench restart i workbench restart link return unstartable return unstartable if the workbench could not be started link return emergency close return emergency close if the ui quit because of an emergency other values reserved for future use since 3 0 public static int create and run workbench display display workbench advisor advisor return workbench create and run workbench display advisor createdisplay createdisplay iplatformrunnable getworkbench return_ok return_ok return_restart return_restart iworkbench iworkbench return_unstartable return_unstartable return_emergency_close return_emergency_close createandrunworkbench workbenchadvisor createandrunworkbench creates the code display code to be used by the workbench it is the caller s responsibility to dispose the resulting code display code not the workbench s return the display since 3 0 public static display create display return workbench create display createdisplay createdisplay returns the testable object facade for use by the test harness p important this method is only for use by the test harness applications and regular plug ins should not call this method p return the testable object facade since 3 0 public static testable object get testable object return workbench get workbench testable testableobject gettestableobject getworkbenchtestable returns the preference store used for publicly settable workbench preferences constants for these preferences are defined on link org eclipse ui i workbench preference constants return the workbench public preference store since 3 0 public static i preference store get preference store return pref util getapi preference store iworkbenchpreferenceconstants ipreferencestore getpreferencestore prefutil getapipreferencestore block instantiation private platformui do nothing returns the workbench fails if the workbench has not been created yet return the workbench public static i workbench get workbench if workbench get instance null app forgot to call create and run workbench beforehand throw new illegal state exception workbench messages platformui noworkbench return workbench get instance iworkbench getworkbench getinstance createandrunworkbench illegalstateexception workbenchmessages platformui_noworkbench getinstance returns whether link create and run workbench create and run workbench has been called to create the workbench and the workbench has yet to terminate return code true code if the workbench has been created and is still running and code false code if the workbench has not yet been created or has completed since 3 0 public static boolean is workbench running return workbench get instance null workbench get instance is running createandrunworkbench createandrunworkbench isworkbenchrunning getinstance getinstance isrunning creates the workbench and associates it with the given display and workbench advisor and runs the workbench ui this entails processing and dispatching events until the workbench is closed or restarted p this method is intended to be called by the main class the application fails if the workbench ui has already been created p p use link create display create display to create the display to pass in p p note that this method is intended to be called by the application code org eclipse core boot i platform runnable code it must be called exactly once and early on before anyone else asks code get workbench code for the workbench p param display the display to be used for all ui interactions with the workbench param advisor the application specific advisor that configures and specializes the workbench return return code link return ok return ok for normal exit link return restart return restart if the workbench was terminated with a call to link i workbench restart i workbench restart link return unstartable return unstartable if the workbench could not be started link return emergency close return emergency close if the ui quit because of an emergency other values reserved for future use since 3 0 public static int create and run workbench display display workbench advisor advisor return workbench create and run workbench display advisor createdisplay createdisplay iplatformrunnable getworkbench return_ok return_ok return_restart return_restart iworkbench iworkbench return_unstartable return_unstartable return_emergency_close return_emergency_close createandrunworkbench workbenchadvisor createandrunworkbench creates the code display code to be used by the workbench it is the caller s responsibility to dispose the resulting code display code not the workbench s return the display since 3 0 public static display create display return workbench create display createdisplay createdisplay returns the testable object facade for use by the test harness p important this method is only for use by the test harness applications and regular plug ins should not call this method p return the testable object facade since 3 0 public static testable object get testable object return workbench get workbench testable testableobject gettestableobject getworkbenchtestable returns the preference store used for publicly settable workbench preferences constants for these preferences are defined on link org eclipse ui i workbench preference constants return the workbench public preference store since 3 0 public static i preference store get preference store return pref util getapi preference store iworkbenchpreferenceconstants ipreferencestore getpreferencestore prefutil getapipreferencestore block instantiation private platformui do nothing returns the workbench fails if the workbench has not been created yet return the workbench public static i workbench get workbench if workbench get instance null app forgot to call create and run workbench beforehand throw new illegal state exception workbench messages platformui noworkbench return workbench get instance iworkbench getworkbench getinstance createandrunworkbench illegalstateexception workbenchmessages platformui_noworkbench getinstance returns whether link create and run workbench create and run workbench has been called to create the workbench and the workbench has yet to terminate return code true code if the workbench has been created and is still running and code false code if the workbench has not yet been created or has completed since 3 0 public static boolean is workbench running return workbench get instance null workbench get instance is running createandrunworkbench createandrunworkbench isworkbenchrunning getinstance getinstance isrunning creates the workbench and associates it with the given display and workbench advisor and runs the workbench ui this entails processing and dispatching events until the workbench is closed or restarted p this method is intended to be called by the main class the application fails if the workbench ui has already been created p p use link create display create display to create the display to pass in p p note that this method is intended to be called by the application code org eclipse core boot i platform runnable code it must be called exactly once and early on before anyone else asks code get workbench code for the workbench p param display the display to be used for all ui interactions with the workbench param advisor the application specific advisor that configures and specializes the workbench return return code link return ok return ok for normal exit link return restart return restart if the workbench was terminated with a call to link i workbench restart i workbench restart link return unstartable return unstartable if the workbench could not be started link return emergency close return emergency close if the ui quit because of an emergency other values reserved for future use since 3 0 public static int create and run workbench display display workbench advisor advisor return workbench create and run workbench display advisor createdisplay createdisplay iplatformrunnable getworkbench return_ok return_ok return_restart return_restart iworkbench iworkbench return_unstartable return_unstartable return_emergency_close return_emergency_close createandrunworkbench workbenchadvisor createandrunworkbench creates the code display code to be used by the workbench it is the caller s responsibility to dispose the resulting code display code not the workbench s return the display since 3 0 public static display create display return workbench create display createdisplay createdisplay returns the testable object facade for use by the test harness p important this method is only for use by the test harness applications and regular plug ins should not call this method p return the testable object facade since 3 0 public static testable object get testable object return workbench get workbench testable testableobject gettestableobject getworkbenchtestable returns the preference store used for publicly settable workbench preferences constants for these preferences are defined on link org eclipse ui i workbench preference constants return the workbench public preference store since 3 0 public static i preference store get preference store return pref util getapi preference store iworkbenchpreferenceconstants ipreferencestore getpreferencestore prefutil getapipreferencestore block instantiation private platformui do nothing returns the workbench fails if the workbench has not been created yet return the workbench public static i workbench get workbench if workbench get instance null app forgot to call create and run workbench beforehand throw new illegal state exception workbench messages platformui noworkbench return workbench get instance iworkbench getworkbench getinstance createandrunworkbench illegalstateexception workbenchmessages platformui_noworkbench getinstance returns whether link create and run workbench create and run workbench has been called to create the workbench and the workbench has yet to terminate return code true code if the workbench has been created and is still running and code false code if the workbench has not yet been created or has completed since 3 0 public static boolean is workbench running return workbench get instance null workbench get instance is running createandrunworkbench createandrunworkbench isworkbenchrunning getinstance getinstance isrunning creates the workbench and associates it with the given display and workbench advisor and runs the workbench ui this entails processing and dispatching events until the workbench is closed or restarted p this method is intended to be called by the main class the application fails if the workbench ui has already been created p p use link create display create display to create the display to pass in p p note that this method is intended to be called by the application code org eclipse core boot i platform runnable code it must be called exactly once and early on before anyone else asks code get workbench code for the workbench p param display the display to be used for all ui interactions with the workbench param advisor the application specific advisor that configures and specializes the workbench return return code link return ok return ok for normal exit link return restart return restart if the workbench was terminated with a call to link i workbench restart i workbench restart link return unstartable return unstartable if the workbench could not be started link return emergency close return emergency close if the ui quit because of an emergency other values reserved for future use since 3 0 public static int create and run workbench display display workbench advisor advisor return workbench create and run workbench display advisor createdisplay createdisplay iplatformrunnable getworkbench return_ok return_ok return_restart return_restart iworkbench iworkbench return_unstartable return_unstartable return_emergency_close return_emergency_close createandrunworkbench workbenchadvisor createandrunworkbench creates the code display code to be used by the workbench it is the caller s responsibility to dispose the resulting code display code not the workbench s return the display since 3 0 public static display create display return workbench create display createdisplay createdisplay returns the testable object facade for use by the test harness p important this method is only for use by the test harness applications and regular plug ins should not call this method p return the testable object facade since 3 0 public static testable object get testable object return workbench get workbench testable testableobject gettestableobject getworkbenchtestable returns the preference store used for publicly settable workbench preferences constants for these preferences are defined on link org eclipse ui i workbench preference constants return the workbench public preference store since 3 0 public static i preference store get preference store return pref util getapi preference store iworkbenchpreferenceconstants ipreferencestore getpreferencestore prefutil getapipreferencestore creates a new preference page with an empty title and no image protected preference page this non nls 1 preferencepage creates a new preference page with the given title and no image param title the title of this preference page protected preference page string title super title preferencepage creates a new abstract preference page with the given title and image param title the title of this preference page param image the image for this preference page or code null code if none protected preference page string title image descriptor image super title image preferencepage imagedescriptor computes the size for this page s ui control p the default implementation of this code i preference page code method returns the size set by code set size code if no size has been set but the page has a ui control the framework method code do compute size code is called to compute the size p return the size of the preference page encoded as code new point width height code or code 0 0 code if the page doesn t currently have any ui component public point compute size if size null return size control control get control if control null size do compute size return size return new point 0 0 ipreferencepage setsize docomputesize computesize getcontrol docomputesize contributes additional buttons to the given composite p the default implementation of this framework hook method does nothing subclasses should override this method to contribute buttons to this page s button bar for each button a subclass contributes it must also increase the parent s grid layout number of columns by one that is pre grid layout parent get layout num columns pre p param parent the button bar protected void contribute buttons composite parent gridlayout getlayout numcolumns contributebuttons creates and returns the swt control for the customized body of this preference page under the given parent composite p this framework method must be implemented by concrete subclasses any subclass returning a code composite code object whose code layout code has default margins for example a code grid layout code are expected to set the margins of this code layout code to 0 pixels p param parent the parent composite return the new control gridlayout the code preference page code implementation of this code i dialog page code method creates a description label and button bar for the page it calls code create contents code to create the custom contents of the page p if a subclass that overrides this method creates a code composite code that has a layout with default margins for example a code grid layout code it is expected to set the margins of this code layout code to 0 pixels public void create control composite parent grid data gd composite content new composite parent swt none set control content grid layout layout new grid layout layout margin width 0 layout margin height 0 content set layout layout apply the font on creation for backward compatibility apply dialog font content initialize the dialog units initialize dialog units content description label create description label content if description label null description label set layout data new grid data grid data fill horizontal body create contents content if body null null is not a valid return value but support graceful failure body set layout data new grid data grid data fill both composite button bar new composite content swt none layout new grid layout layout num columns 0 layout margin height 0 layout margin width 0 layout make columns equal width false button bar set layout layout gd new grid data grid data horizontal align end button bar set layout data gd contribute buttons button bar if create default and apply button layout num columns layout num columns 2 string labels j face resources get strings new string defaults apply non nls 2 non nls 1 int width hint convert horizontaldl us to pixels i dialog constants button width defaults button new button button bar swt push defaults button set text labels 0 dialog apply dialog font defaults button grid data data new grid data grid data horizontal align fill point min button size defaults button compute size swt default swt default true data width hint math max width hint min button size x defaults button set layout data data defaults button add selection listener new selection adapter public void widget selected selection event e perform defaults apply button new button button bar swt push apply button set text labels 1 dialog apply dialog font apply button data new grid data grid data horizontal align fill min button size apply button compute size swt default swt default true data width hint math max width hint min button size x apply button set layout data data apply button add selection listener new selection adapter public void widget selected selection event e perform apply apply button set enabled is valid apply dialog font button bar else check if there are any other buttons on the button bar if not throw away the button bar composite otherwise there is an unusually large button bar if button bar get children length 1 button bar dispose preferencepage idialogpage createcontents gridlayout createcontrol griddata setcontrol gridlayout gridlayout marginwidth marginheight setlayout applydialogfont initializedialogunits descriptionlabel createdescriptionlabel descriptionlabel descriptionlabel setlayoutdata griddata griddata fill_horizontal createcontents setlayoutdata griddata griddata fill_both buttonbar gridlayout numcolumns marginheight marginwidth makecolumnsequalwidth buttonbar setlayout griddata griddata horizontal_align_end buttonbar setlayoutdata contributebuttons buttonbar createdefaultandapplybutton numcolumns numcolumns jfaceresources getstrings widthhint converthorizontaldlustopixels idialogconstants button_width defaultsbutton buttonbar defaultsbutton settext applydialogfont defaultsbutton griddata griddata griddata horizontal_align_fill minbuttonsize defaultsbutton computesize widthhint widthhint minbuttonsize defaultsbutton setlayoutdata defaultsbutton addselectionlistener selectionadapter widgetselected selectionevent performdefaults applybutton buttonbar applybutton settext applydialogfont applybutton griddata griddata horizontal_align_fill minbuttonsize applybutton computesize widthhint widthhint minbuttonsize applybutton setlayoutdata applybutton addselectionlistener selectionadapter widgetselected selectionevent performapply applybutton setenabled isvalid applydialogfont buttonbar buttonbar getchildren buttonbar apply the dialog font to the composite and it s children if it is set subclasses may override if they wish to set the font themselves param composite protected void apply dialog font composite composite dialog apply dialog font composite applydialogfont applydialogfont creates and returns an swt label under the given composite param parent the parent composite return the new label protected label create description label composite parent label result null string description get description if description null result new label parent swt wrap result set font parent get font result set text description return result createdescriptionlabel getdescription setfont getfont settext computes the size needed by this page s ui control p all pages should override this method and set the appropriate sizes of their widgets and then call code super do compute size code p return the size of the preference page encoded as code new point width height code protected point do compute size if description label null body null point body size body compute size swt default swt default true grid data gd grid data description label get layout data gd width hint body size x return get control compute size swt default swt default true docomputesize docomputesize descriptionlabel bodysize computesize griddata griddata descriptionlabel getlayoutdata widthhint bodysize getcontrol computesize returns the preference store of this preference page p this is a framework hook method for subclasses to return a page specific preference store the default implementation returns code null code p return the preference store or code null code if none protected i preference store do get preference store return null ipreferencestore dogetpreferencestore returns the container of this page return the preference page container or code null code if this page has yet to be added to a container public i preference page container get container return container ipreferencepagecontainer getcontainer returns the preference store of this preference page return the preference store or code null code if none public i preference store get preference store if preference store null preference store do get preference store if preference store null return preference store else if container null return container get preference store return null ipreferencestore getpreferencestore preferencestore preferencestore dogetpreferencestore preferencestore preferencestore getpreferencestore the preference page implementation of an code i preference page code method returns whether this preference page is valid preference pages are considered valid by default call code set valid false code to make a page invalid public boolean is valid return is valid ipreferencepage setvalid isvalid isvalid suppresses creation of the standard default and apply buttons for this page p subclasses wishing a preference page wihthout these buttons should call this framework method before the page s control has been created p protected void no default and apply button create default and apply button false nodefaultandapplybutton createdefaultandapplybutton the code preference page code implementation of this code i preference page code method returns code true code if the page is valid public boolean ok to leave return is valid preferencepage ipreferencepage oktoleave isvalid performs special processing when this page s apply button has been pressed p this is a framework hook method for sublcasses to do special things when the apply button has been pressed the default implementation of this framework method simply calls code perform ok code to simulate the pressing of the page s ok button p see perform ok protected void perform apply perform ok performok performok performapply performok the preference page implementation of an code i preference page code method performs special processing when this page s cancel button has been pressed p this is a framework hook method for sublcasses to do special things when the cancel button has been pressed the default implementation of this framework method does nothing and returns code true code public boolean perform cancel return true ipreferencepage performcancel performs special processing when this page s defaults button has been pressed p this is a framework hook method for subclasses to do special things when the defaults button has been pressed subclasses may override but should call code super perform defaults code p protected void perform defaults update apply button performdefaults performdefaults updateapplybutton method declared on i preference page subclasses should override public boolean perform ok return true ipreferencepage performok non javadoc method declared on i preference page public void set container i preference page container container this container container ipreferencepage setcontainer ipreferencepagecontainer sets the preference store for this preference page p if preference store is set to null get preference store will invoke do get preference store the next time it is called p param store the preference store or code null code see get preference store public void set preference store i preference store store preference store store preferencestore getpreferencestore dogetpreferencestore getpreferencestore setpreferencestore ipreferencestore preferencestore public void set size point ui size control control get control if control null control set size ui size size ui size setsize uisize getcontrol setsize uisize uisize the code preference page code implementation of this code i dialog page code method extends the code dialog page code implementation to update the preference page container title subclasses may extend public void set title string title super set title title if get container null get container update title preferencepage idialogpage dialogpage settitle settitle getcontainer getcontainer updatetitle sets whether this page is valid the enable state of the container buttons and the apply button is updated when a page s valid state changes p param b the new valid state public void set valid boolean b boolean old value is valid is valid b if old value is valid update container state if get container null get container update buttons update page state update apply button setvalid oldvalue isvalid isvalid oldvalue isvalid getcontainer getcontainer updatebuttons updateapplybutton returns a string suitable for debugging purpose only public string to string return get title tostring gettitle updates the enabled state of the apply button to reflect whether this page is valid protected void update apply button if apply button null apply button set enabled is valid updateapplybutton applybutton applybutton setenabled isvalid creates a composite with a highlighted note entry and a message text this is designed to take up the full width of the page param font the font to use param composite the parent composite param title the title of the note param message the message for the note return the composite for the note protected composite create note composite font font composite composite string title string message composite message composite new composite composite swt none grid layout message layout new grid layout message layout num columns 2 message layout margin width 0 message layout margin height 0 message composite set layout message layout message composite set layout data new grid data grid data horizontal align fill message composite set font font final label note label new label message composite swt bold note label set text title note label set font j face resources get banner font note label set layout data new grid data grid data vertical align beginning final i property change listener font listener new i property change listener public void property change property change event event if j face resources banner font equals event get property note label set font j face resources get font j face resources banner font j face resources get font registry add listener font listener note label add dispose listener new dispose listener public void widget disposed dispose event event j face resources get font registry remove listener font listener label message label new label message composite swt wrap message label set text message message label set font font return message composite createnotecomposite messagecomposite gridlayout messagelayout gridlayout messagelayout numcolumns messagelayout marginwidth messagelayout marginheight messagecomposite setlayout messagelayout messagecomposite setlayoutdata griddata griddata horizontal_align_fill messagecomposite setfont notelabel messagecomposite notelabel settext notelabel setfont jfaceresources getbannerfont notelabel setlayoutdata griddata griddata vertical_align_beginning ipropertychangelistener fontlistener ipropertychangelistener propertychange propertychangeevent jfaceresources banner_font getproperty notelabel setfont jfaceresources getfont jfaceresources banner_font jfaceresources getfontregistry addlistener fontlistener notelabel adddisposelistener disposelistener widgetdisposed disposeevent jfaceresources getfontregistry removelistener fontlistener messagelabel messagecomposite messagelabel settext messagelabel setfont messagecomposite returns the apply button return the apply button protected button get apply button return apply button getapplybutton applybutton returns the restore defaults button return the restore defaults button protected button get defaults button return defaults button getdefaultsbutton defaultsbutton see org eclipse jface dialogs i dialog page perform help public void perform help get control notify listeners swt help new event idialogpage performhelp performhelp getcontrol notifylisteners apply the data to the receiver by default do nothing param data since 3 1 public void apply data object data applydata public void set error message string new message super set error message new message if get container null get container update message seterrormessage newmessage seterrormessage newmessage getcontainer getcontainer updatemessage public void set message string new message int new type super set message new message new type if get container null get container update message setmessage newmessage newtype setmessage newmessage newtype getcontainer getcontainer updatemessage creates a new preference page with an empty title and no image protected preference page this non nls 1 preferencepage creates a new preference page with the given title and no image param title the title of this preference page protected preference page string title super title preferencepage creates a new abstract preference page with the given title and image param title the title of this preference page param image the image for this preference page or code null code if none protected preference page string title image descriptor image super title image preferencepage imagedescriptor computes the size for this page s ui control p the default implementation of this code i preference page code method returns the size set by code set size code if no size has been set but the page has a ui control the framework method code do compute size code is called to compute the size p return the size of the preference page encoded as code new point width height code or code 0 0 code if the page doesn t currently have any ui component public point compute size if size null return size control control get control if control null size do compute size return size return new point 0 0 ipreferencepage setsize docomputesize computesize getcontrol docomputesize contributes additional buttons to the given composite p the default implementation of this framework hook method does nothing subclasses should override this method to contribute buttons to this page s button bar for each button a subclass contributes it must also increase the parent s grid layout number of columns by one that is pre grid layout parent get layout num columns pre p param parent the button bar protected void contribute buttons composite parent gridlayout getlayout numcolumns contributebuttons creates and returns the swt control for the customized body of this preference page under the given parent composite p this framework method must be implemented by concrete subclasses any subclass returning a code composite code object whose code layout code has default margins for example a code grid layout code are expected to set the margins of this code layout code to 0 pixels p param parent the parent composite return the new control gridlayout the code preference page code implementation of this code i dialog page code method creates a description label and button bar for the page it calls code create contents code to create the custom contents of the page p if a subclass that overrides this method creates a code composite code that has a layout with default margins for example a code grid layout code it is expected to set the margins of this code layout code to 0 pixels public void create control composite parent grid data gd composite content new composite parent swt none set control content grid layout layout new grid layout layout margin width 0 layout margin height 0 content set layout layout apply the font on creation for backward compatibility apply dialog font content initialize the dialog units initialize dialog units content description label create description label content if description label null description label set layout data new grid data grid data fill horizontal body create contents content if body null null is not a valid return value but support graceful failure body set layout data new grid data grid data fill both composite button bar new composite content swt none layout new grid layout layout num columns 0 layout margin height 0 layout margin width 0 layout make columns equal width false button bar set layout layout gd new grid data grid data horizontal align end button bar set layout data gd contribute buttons button bar if create default and apply button layout num columns layout num columns 2 string labels j face resources get strings new string defaults apply non nls 2 non nls 1 int width hint convert horizontaldl us to pixels i dialog constants button width defaults button new button button bar swt push defaults button set text labels 0 dialog apply dialog font defaults button grid data data new grid data grid data horizontal align fill point min button size defaults button compute size swt default swt default true data width hint math max width hint min button size x defaults button set layout data data defaults button add selection listener new selection adapter public void widget selected selection event e perform defaults apply button new button button bar swt push apply button set text labels 1 dialog apply dialog font apply button data new grid data grid data horizontal align fill min button size apply button compute size swt default swt default true data width hint math max width hint min button size x apply button set layout data data apply button add selection listener new selection adapter public void widget selected selection event e perform apply apply button set enabled is valid apply dialog font button bar else check if there are any other buttons on the button bar if not throw away the button bar composite otherwise there is an unusually large button bar if button bar get children length 1 button bar dispose preferencepage idialogpage createcontents gridlayout createcontrol griddata setcontrol gridlayout gridlayout marginwidth marginheight setlayout applydialogfont initializedialogunits descriptionlabel createdescriptionlabel descriptionlabel descriptionlabel setlayoutdata griddata griddata fill_horizontal createcontents setlayoutdata griddata griddata fill_both buttonbar gridlayout numcolumns marginheight marginwidth makecolumnsequalwidth buttonbar setlayout griddata griddata horizontal_align_end buttonbar setlayoutdata contributebuttons buttonbar createdefaultandapplybutton numcolumns numcolumns jfaceresources getstrings widthhint converthorizontaldlustopixels idialogconstants button_width defaultsbutton buttonbar defaultsbutton settext applydialogfont defaultsbutton griddata griddata griddata horizontal_align_fill minbuttonsize defaultsbutton computesize widthhint widthhint minbuttonsize defaultsbutton setlayoutdata defaultsbutton addselectionlistener selectionadapter widgetselected selectionevent performdefaults applybutton buttonbar applybutton settext applydialogfont applybutton griddata griddata horizontal_align_fill minbuttonsize applybutton computesize widthhint widthhint minbuttonsize applybutton setlayoutdata applybutton addselectionlistener selectionadapter widgetselected selectionevent performapply applybutton setenabled isvalid applydialogfont buttonbar buttonbar getchildren buttonbar apply the dialog font to the composite and it s children if it is set subclasses may override if they wish to set the font themselves param composite protected void apply dialog font composite composite dialog apply dialog font composite applydialogfont applydialogfont creates and returns an swt label under the given composite param parent the parent composite return the new label protected label create description label composite parent label result null string description get description if description null result new label parent swt wrap result set font parent get font result set text description return result createdescriptionlabel getdescription setfont getfont settext computes the size needed by this page s ui control p all pages should override this method and set the appropriate sizes of their widgets and then call code super do compute size code p return the size of the preference page encoded as code new point width height code protected point do compute size if description label null body null point body size body compute size swt default swt default true grid data gd grid data description label get layout data gd width hint body size x return get control compute size swt default swt default true docomputesize docomputesize descriptionlabel bodysize computesize griddata griddata descriptionlabel getlayoutdata widthhint bodysize getcontrol computesize returns the preference store of this preference page p this is a framework hook method for subclasses to return a page specific preference store the default implementation returns code null code p return the preference store or code null code if none protected i preference store do get preference store return null ipreferencestore dogetpreferencestore returns the container of this page return the preference page container or code null code if this page has yet to be added to a container public i preference page container get container return container ipreferencepagecontainer getcontainer returns the preference store of this preference page return the preference store or code null code if none public i preference store get preference store if preference store null preference store do get preference store if preference store null return preference store else if container null return container get preference store return null ipreferencestore getpreferencestore preferencestore preferencestore dogetpreferencestore preferencestore preferencestore getpreferencestore the preference page implementation of an code i preference page code method returns whether this preference page is valid preference pages are considered valid by default call code set valid false code to make a page invalid public boolean is valid return is valid ipreferencepage setvalid isvalid isvalid suppresses creation of the standard default and apply buttons for this page p subclasses wishing a preference page wihthout these buttons should call this framework method before the page s control has been created p protected void no default and apply button create default and apply button false nodefaultandapplybutton createdefaultandapplybutton the code preference page code implementation of this code i preference page code method returns code true code if the page is valid public boolean ok to leave return is valid preferencepage ipreferencepage oktoleave isvalid performs special processing when this page s apply button has been pressed p this is a framework hook method for sublcasses to do special things when the apply button has been pressed the default implementation of this framework method simply calls code perform ok code to simulate the pressing of the page s ok button p see perform ok protected void perform apply perform ok performok performok performapply performok the preference page implementation of an code i preference page code method performs special processing when this page s cancel button has been pressed p this is a framework hook method for sublcasses to do special things when the cancel button has been pressed the default implementation of this framework method does nothing and returns code true code public boolean perform cancel return true ipreferencepage performcancel performs special processing when this page s defaults button has been pressed p this is a framework hook method for subclasses to do special things when the defaults button has been pressed subclasses may override but should call code super perform defaults code p protected void perform defaults update apply button performdefaults performdefaults updateapplybutton method declared on i preference page subclasses should override public boolean perform ok return true ipreferencepage performok non javadoc method declared on i preference page public void set container i preference page container container this container container ipreferencepage setcontainer ipreferencepagecontainer sets the preference store for this preference page p if preference store is set to null get preference store will invoke do get preference store the next time it is called p param store the preference store or code null code see get preference store public void set preference store i preference store store preference store store preferencestore getpreferencestore dogetpreferencestore getpreferencestore setpreferencestore ipreferencestore preferencestore public void set size point ui size control control get control if control null control set size ui size size ui size setsize uisize getcontrol setsize uisize uisize the code preference page code implementation of this code i dialog page code method extends the code dialog page code implementation to update the preference page container title subclasses may extend public void set title string title super set title title if get container null get container update title preferencepage idialogpage dialogpage settitle settitle getcontainer getcontainer updatetitle sets whether this page is valid the enable state of the container buttons and the apply button is updated when a page s valid state changes p param b the new valid state public void set valid boolean b boolean old value is valid is valid b if old value is valid update container state if get container null get container update buttons update page state update apply button setvalid oldvalue isvalid isvalid oldvalue isvalid getcontainer getcontainer updatebuttons updateapplybutton returns a string suitable for debugging purpose only public string to string return get title tostring gettitle updates the enabled state of the apply button to reflect whether this page is valid protected void update apply button if apply button null apply button set enabled is valid updateapplybutton applybutton applybutton setenabled isvalid creates a composite with a highlighted note entry and a message text this is designed to take up the full width of the page param font the font to use param composite the parent composite param title the title of the note param message the message for the note return the composite for the note protected composite create note composite font font composite composite string title string message composite message composite new composite composite swt none grid layout message layout new grid layout message layout num columns 2 message layout margin width 0 message layout margin height 0 message composite set layout message layout message composite set layout data new grid data grid data horizontal align fill message composite set font font final label note label new label message composite swt bold note label set text title note label set font j face resources get banner font note label set layout data new grid data grid data vertical align beginning final i property change listener font listener new i property change listener public void property change property change event event if j face resources banner font equals event get property note label set font j face resources get font j face resources banner font j face resources get font registry add listener font listener note label add dispose listener new dispose listener public void widget disposed dispose event event j face resources get font registry remove listener font listener label message label new label message composite swt wrap message label set text message message label set font font return message composite createnotecomposite messagecomposite gridlayout messagelayout gridlayout messagelayout numcolumns messagelayout marginwidth messagelayout marginheight messagecomposite setlayout messagelayout messagecomposite setlayoutdata griddata griddata horizontal_align_fill messagecomposite setfont notelabel messagecomposite notelabel settext notelabel setfont jfaceresources getbannerfont notelabel setlayoutdata griddata griddata vertical_align_beginning ipropertychangelistener fontlistener ipropertychangelistener propertychange propertychangeevent jfaceresources banner_font getproperty notelabel setfont jfaceresources getfont jfaceresources banner_font jfaceresources getfontregistry addlistener fontlistener notelabel adddisposelistener disposelistener widgetdisposed disposeevent jfaceresources getfontregistry removelistener fontlistener messagelabel messagecomposite messagelabel settext messagelabel setfont messagecomposite returns the apply button return the apply button protected button get apply button return apply button getapplybutton applybutton returns the restore defaults button return the restore defaults button protected button get defaults button return defaults button getdefaultsbutton defaultsbutton see org eclipse jface dialogs i dialog page perform help public void perform help get control notify listeners swt help new event idialogpage performhelp performhelp getcontrol notifylisteners apply the data to the receiver by default do nothing param data since 3 1 public void apply data object data applydata public void set error message string new message super set error message new message if get container null get container update message seterrormessage newmessage seterrormessage newmessage getcontainer getcontainer updatemessage public void set message string new message int new type super set message new message new type if get container null get container update message setmessage newmessage newtype setmessage newmessage newtype getcontainer getcontainer updatemessage creates a new preference page with an empty title and no image protected preference page this non nls 1 preferencepage creates a new preference page with the given title and no image param title the title of this preference page protected preference page string title super title preferencepage creates a new abstract preference page with the given title and image param title the title of this preference page param image the image for this preference page or code null code if none protected preference page string title image descriptor image super title image preferencepage imagedescriptor computes the size for this page s ui control p the default implementation of this code i preference page code method returns the size set by code set size code if no size has been set but the page has a ui control the framework method code do compute size code is called to compute the size p return the size of the preference page encoded as code new point width height code or code 0 0 code if the page doesn t currently have any ui component public point compute size if size null return size control control get control if control null size do compute size return size return new point 0 0 ipreferencepage setsize docomputesize computesize getcontrol docomputesize contributes additional buttons to the given composite p the default implementation of this framework hook method does nothing subclasses should override this method to contribute buttons to this page s button bar for each button a subclass contributes it must also increase the parent s grid layout number of columns by one that is pre grid layout parent get layout num columns pre p param parent the button bar protected void contribute buttons composite parent gridlayout getlayout numcolumns contributebuttons creates and returns the swt control for the customized body of this preference page under the given parent composite p this framework method must be implemented by concrete subclasses any subclass returning a code composite code object whose code layout code has default margins for example a code grid layout code are expected to set the margins of this code layout code to 0 pixels p param parent the parent composite return the new control gridlayout the code preference page code implementation of this code i dialog page code method creates a description label and button bar for the page it calls code create contents code to create the custom contents of the page p if a subclass that overrides this method creates a code composite code that has a layout with default margins for example a code grid layout code it is expected to set the margins of this code layout code to 0 pixels public void create control composite parent grid data gd composite content new composite parent swt none set control content grid layout layout new grid layout layout margin width 0 layout margin height 0 content set layout layout apply the font on creation for backward compatibility apply dialog font content initialize the dialog units initialize dialog units content description label create description label content if description label null description label set layout data new grid data grid data fill horizontal body create contents content if body null null is not a valid return value but support graceful failure body set layout data new grid data grid data fill both composite button bar new composite content swt none layout new grid layout layout num columns 0 layout margin height 0 layout margin width 0 layout make columns equal width false button bar set layout layout gd new grid data grid data horizontal align end button bar set layout data gd contribute buttons button bar if create default and apply button layout num columns layout num columns 2 string labels j face resources get strings new string defaults apply non nls 2 non nls 1 int width hint convert horizontaldl us to pixels i dialog constants button width defaults button new button button bar swt push defaults button set text labels 0 dialog apply dialog font defaults button grid data data new grid data grid data horizontal align fill point min button size defaults button compute size swt default swt default true data width hint math max width hint min button size x defaults button set layout data data defaults button add selection listener new selection adapter public void widget selected selection event e perform defaults apply button new button button bar swt push apply button set text labels 1 dialog apply dialog font apply button data new grid data grid data horizontal align fill min button size apply button compute size swt default swt default true data width hint math max width hint min button size x apply button set layout data data apply button add selection listener new selection adapter public void widget selected selection event e perform apply apply button set enabled is valid apply dialog font button bar else check if there are any other buttons on the button bar if not throw away the button bar composite otherwise there is an unusually large button bar if button bar get children length 1 button bar dispose preferencepage idialogpage createcontents gridlayout createcontrol griddata setcontrol gridlayout gridlayout marginwidth marginheight setlayout applydialogfont initializedialogunits descriptionlabel createdescriptionlabel descriptionlabel descriptionlabel setlayoutdata griddata griddata fill_horizontal createcontents setlayoutdata griddata griddata fill_both buttonbar gridlayout numcolumns marginheight marginwidth makecolumnsequalwidth buttonbar setlayout griddata griddata horizontal_align_end buttonbar setlayoutdata contributebuttons buttonbar createdefaultandapplybutton numcolumns numcolumns jfaceresources getstrings widthhint converthorizontaldlustopixels idialogconstants button_width defaultsbutton buttonbar defaultsbutton settext applydialogfont defaultsbutton griddata griddata griddata horizontal_align_fill minbuttonsize defaultsbutton computesize widthhint widthhint minbuttonsize defaultsbutton setlayoutdata defaultsbutton addselectionlistener selectionadapter widgetselected selectionevent performdefaults applybutton buttonbar applybutton settext applydialogfont applybutton griddata griddata horizontal_align_fill minbuttonsize applybutton computesize widthhint widthhint minbuttonsize applybutton setlayoutdata applybutton addselectionlistener selectionadapter widgetselected selectionevent performapply applybutton setenabled isvalid applydialogfont buttonbar buttonbar getchildren buttonbar defaults button set layout data data defaults button add selection listener new selection adapter public void widget selected selection event e perform defaults defaultsbutton setlayoutdata defaultsbutton addselectionlistener selectionadapter widgetselected selectionevent performdefaults apply button set layout data data apply button add selection listener new selection adapter public void widget selected selection event e perform apply applybutton setlayoutdata applybutton addselectionlistener selectionadapter widgetselected selectionevent performapply apply the dialog font to the composite and it s children if it is set subclasses may override if they wish to set the font themselves param composite protected void apply dialog font composite composite dialog apply dialog font composite applydialogfont applydialogfont creates and returns an swt label under the given composite param parent the parent composite return the new label protected label create description label composite parent label result null string description get description if description null result new label parent swt wrap result set font parent get font result set text description return result createdescriptionlabel getdescription setfont getfont settext computes the size needed by this page s ui control p all pages should override this method and set the appropriate sizes of their widgets and then call code super do compute size code p return the size of the preference page encoded as code new point width height code protected point do compute size if description label null body null point body size body compute size swt default swt default true grid data gd grid data description label get layout data gd width hint body size x return get control compute size swt default swt default true docomputesize docomputesize descriptionlabel bodysize computesize griddata griddata descriptionlabel getlayoutdata widthhint bodysize getcontrol computesize returns the preference store of this preference page p this is a framework hook method for subclasses to return a page specific preference store the default implementation returns code null code p return the preference store or code null code if none protected i preference store do get preference store return null ipreferencestore dogetpreferencestore returns the container of this page return the preference page container or code null code if this page has yet to be added to a container public i preference page container get container return container ipreferencepagecontainer getcontainer returns the preference store of this preference page return the preference store or code null code if none public i preference store get preference store if preference store null preference store do get preference store if preference store null return preference store else if container null return container get preference store return null ipreferencestore getpreferencestore preferencestore preferencestore dogetpreferencestore preferencestore preferencestore getpreferencestore the preference page implementation of an code i preference page code method returns whether this preference page is valid preference pages are considered valid by default call code set valid false code to make a page invalid public boolean is valid return is valid ipreferencepage setvalid isvalid isvalid suppresses creation of the standard default and apply buttons for this page p subclasses wishing a preference page wihthout these buttons should call this framework method before the page s control has been created p protected void no default and apply button create default and apply button false nodefaultandapplybutton createdefaultandapplybutton the code preference page code implementation of this code i preference page code method returns code true code if the page is valid public boolean ok to leave return is valid preferencepage ipreferencepage oktoleave isvalid performs special processing when this page s apply button has been pressed p this is a framework hook method for sublcasses to do special things when the apply button has been pressed the default implementation of this framework method simply calls code perform ok code to simulate the pressing of the page s ok button p see perform ok protected void perform apply perform ok performok performok performapply performok the preference page implementation of an code i preference page code method performs special processing when this page s cancel button has been pressed p this is a framework hook method for sublcasses to do special things when the cancel button has been pressed the default implementation of this framework method does nothing and returns code true code public boolean perform cancel return true ipreferencepage performcancel performs special processing when this page s defaults button has been pressed p this is a framework hook method for subclasses to do special things when the defaults button has been pressed subclasses may override but should call code super perform defaults code p protected void perform defaults update apply button performdefaults performdefaults updateapplybutton method declared on i preference page subclasses should override public boolean perform ok return true ipreferencepage performok non javadoc method declared on i preference page public void set container i preference page container container this container container ipreferencepage setcontainer ipreferencepagecontainer sets the preference store for this preference page p if preference store is set to null get preference store will invoke do get preference store the next time it is called p param store the preference store or code null code see get preference store public void set preference store i preference store store preference store store preferencestore getpreferencestore dogetpreferencestore getpreferencestore setpreferencestore ipreferencestore preferencestore public void set size point ui size control control get control if control null control set size ui size size ui size setsize uisize getcontrol setsize uisize uisize the code preference page code implementation of this code i dialog page code method extends the code dialog page code implementation to update the preference page container title subclasses may extend public void set title string title super set title title if get container null get container update title preferencepage idialogpage dialogpage settitle settitle getcontainer getcontainer updatetitle sets whether this page is valid the enable state of the container buttons and the apply button is updated when a page s valid state changes p param b the new valid state public void set valid boolean b boolean old value is valid is valid b if old value is valid update container state if get container null get container update buttons update page state update apply button setvalid oldvalue isvalid isvalid oldvalue isvalid getcontainer getcontainer updatebuttons updateapplybutton returns a string suitable for debugging purpose only public string to string return get title tostring gettitle updates the enabled state of the apply button to reflect whether this page is valid protected void update apply button if apply button null apply button set enabled is valid updateapplybutton applybutton applybutton setenabled isvalid creates a composite with a highlighted note entry and a message text this is designed to take up the full width of the page param font the font to use param composite the parent composite param title the title of the note param message the message for the note return the composite for the note protected composite create note composite font font composite composite string title string message composite message composite new composite composite swt none grid layout message layout new grid layout message layout num columns 2 message layout margin width 0 message layout margin height 0 message composite set layout message layout message composite set layout data new grid data grid data horizontal align fill message composite set font font final label note label new label message composite swt bold note label set text title note label set font j face resources get banner font note label set layout data new grid data grid data vertical align beginning final i property change listener font listener new i property change listener public void property change property change event event if j face resources banner font equals event get property note label set font j face resources get font j face resources banner font j face resources get font registry add listener font listener note label add dispose listener new dispose listener public void widget disposed dispose event event j face resources get font registry remove listener font listener label message label new label message composite swt wrap message label set text message message label set font font return message composite createnotecomposite messagecomposite gridlayout messagelayout gridlayout messagelayout numcolumns messagelayout marginwidth messagelayout marginheight messagecomposite setlayout messagelayout messagecomposite setlayoutdata griddata griddata horizontal_align_fill messagecomposite setfont notelabel messagecomposite notelabel settext notelabel setfont jfaceresources getbannerfont notelabel setlayoutdata griddata griddata vertical_align_beginning ipropertychangelistener fontlistener ipropertychangelistener propertychange propertychangeevent jfaceresources banner_font getproperty notelabel setfont jfaceresources getfont jfaceresources banner_font jfaceresources getfontregistry addlistener fontlistener notelabel adddisposelistener disposelistener widgetdisposed disposeevent jfaceresources getfontregistry removelistener fontlistener messagelabel messagecomposite messagelabel settext messagelabel setfont messagecomposite final i property change listener font listener new i property change listener public void property change property change event event if j face resources banner font equals event get property note label set font j face resources get font j face resources banner font ipropertychangelistener fontlistener ipropertychangelistener propertychange propertychangeevent jfaceresources banner_font getproperty notelabel setfont jfaceresources getfont jfaceresources banner_font j face resources get font registry add listener font listener note label add dispose listener new dispose listener public void widget disposed dispose event event j face resources get font registry remove listener font listener jfaceresources getfontregistry addlistener fontlistener notelabel adddisposelistener disposelistener widgetdisposed disposeevent jfaceresources getfontregistry removelistener fontlistener returns the apply button return the apply button protected button get apply button return apply button getapplybutton applybutton returns the restore defaults button return the restore defaults button protected button get defaults button return defaults button getdefaultsbutton defaultsbutton see org eclipse jface dialogs i dialog page perform help public void perform help get control notify listeners swt help new event idialogpage performhelp performhelp getcontrol notifylisteners apply the data to the receiver by default do nothing param data since 3 1 public void apply data object data applydata public void set error message string new message super set error message new message if get container null get container update message seterrormessage newmessage seterrormessage newmessage getcontainer getcontainer updatemessage public void set message string new message int new type super set message new message new type if get container null get container update message setmessage newmessage newtype setmessage newmessage newtype getcontainer getcontainer updatemessage creates a new preference page with an empty title and no image protected preference page this non nls 1 preferencepage creates a new preference page with the given title and no image param title the title of this preference page protected preference page string title super title preferencepage creates a new abstract preference page with the given title and image param title the title of this preference page param image the image for this preference page or code null code if none protected preference page string title image descriptor image super title image preferencepage imagedescriptor computes the size for this page s ui control p the default implementation of this code i preference page code method returns the size set by code set size code if no size has been set but the page has a ui control the framework method code do compute size code is called to compute the size p return the size of the preference page encoded as code new point width height code or code 0 0 code if the page doesn t currently have any ui component public point compute size if size null return size control control get control if control null size do compute size return size return new point 0 0 ipreferencepage setsize docomputesize computesize getcontrol docomputesize contributes additional buttons to the given composite p the default implementation of this framework hook method does nothing subclasses should override this method to contribute buttons to this page s button bar for each button a subclass contributes it must also increase the parent s grid layout number of columns by one that is pre grid layout parent get layout num columns pre p param parent the button bar protected void contribute buttons composite parent gridlayout getlayout numcolumns contributebuttons creates and returns the swt control for the customized body of this preference page under the given parent composite p this framework method must be implemented by concrete subclasses any subclass returning a code composite code object whose code layout code has default margins for example a code grid layout code are expected to set the margins of this code layout code to 0 pixels p param parent the parent composite return the new control gridlayout the code preference page code implementation of this code i dialog page code method creates a description label and button bar for the page it calls code create contents code to create the custom contents of the page p if a subclass that overrides this method creates a code composite code that has a layout with default margins for example a code grid layout code it is expected to set the margins of this code layout code to 0 pixels public void create control composite parent grid data gd composite content new composite parent swt none set control content grid layout layout new grid layout layout margin width 0 layout margin height 0 content set layout layout apply the font on creation for backward compatibility apply dialog font content initialize the dialog units initialize dialog units content description label create description label content if description label null description label set layout data new grid data grid data fill horizontal body create contents content if body null null is not a valid return value but support graceful failure body set layout data new grid data grid data fill both composite button bar new composite content swt none layout new grid layout layout num columns 0 layout margin height 0 layout margin width 0 layout make columns equal width false button bar set layout layout gd new grid data grid data horizontal align end button bar set layout data gd contribute buttons button bar if create default and apply button layout num columns layout num columns 2 string labels j face resources get strings new string defaults apply non nls 2 non nls 1 int width hint convert horizontaldl us to pixels i dialog constants button width defaults button new button button bar swt push defaults button set text labels 0 dialog apply dialog font defaults button grid data data new grid data grid data horizontal align fill point min button size defaults button compute size swt default swt default true data width hint math max width hint min button size x defaults button set layout data data defaults button add selection listener new selection adapter public void widget selected selection event e perform defaults apply button new button button bar swt push apply button set text labels 1 dialog apply dialog font apply button data new grid data grid data horizontal align fill min button size apply button compute size swt default swt default true data width hint math max width hint min button size x apply button set layout data data apply button add selection listener new selection adapter public void widget selected selection event e perform apply apply button set enabled is valid apply dialog font button bar else check if there are any other buttons on the button bar if not throw away the button bar composite otherwise there is an unusually large button bar if button bar get children length 1 button bar dispose preferencepage idialogpage createcontents gridlayout createcontrol griddata setcontrol gridlayout gridlayout marginwidth marginheight setlayout applydialogfont initializedialogunits descriptionlabel createdescriptionlabel descriptionlabel descriptionlabel setlayoutdata griddata griddata fill_horizontal createcontents setlayoutdata griddata griddata fill_both buttonbar gridlayout numcolumns marginheight marginwidth makecolumnsequalwidth buttonbar setlayout griddata griddata horizontal_align_end buttonbar setlayoutdata contributebuttons buttonbar createdefaultandapplybutton numcolumns numcolumns jfaceresources getstrings widthhint converthorizontaldlustopixels idialogconstants button_width defaultsbutton buttonbar defaultsbutton settext applydialogfont defaultsbutton griddata griddata griddata horizontal_align_fill minbuttonsize defaultsbutton computesize widthhint widthhint minbuttonsize defaultsbutton setlayoutdata defaultsbutton addselectionlistener selectionadapter widgetselected selectionevent performdefaults applybutton buttonbar applybutton settext applydialogfont applybutton griddata griddata horizontal_align_fill minbuttonsize applybutton computesize widthhint widthhint minbuttonsize applybutton setlayoutdata applybutton addselectionlistener selectionadapter widgetselected selectionevent performapply applybutton setenabled isvalid applydialogfont buttonbar buttonbar getchildren buttonbar defaults button set layout data data defaults button add selection listener new selection adapter public void widget selected selection event e perform defaults defaultsbutton setlayoutdata defaultsbutton addselectionlistener selectionadapter widgetselected selectionevent performdefaults apply button set layout data data apply button add selection listener new selection adapter public void widget selected selection event e perform apply applybutton setlayoutdata applybutton addselectionlistener selectionadapter widgetselected selectionevent performapply apply the dialog font to the composite and it s children if it is set subclasses may override if they wish to set the font themselves param composite protected void apply dialog font composite composite dialog apply dialog font composite applydialogfont applydialogfont creates and returns an swt label under the given composite param parent the parent composite return the new label protected label create description label composite parent label result null string description get description if description null result new label parent swt wrap result set font parent get font result set text description return result createdescriptionlabel getdescription setfont getfont settext computes the size needed by this page s ui control p all pages should override this method and set the appropriate sizes of their widgets and then call code super do compute size code p return the size of the preference page encoded as code new point width height code protected point do compute size if description label null body null point body size body compute size swt default swt default true grid data gd grid data description label get layout data gd width hint body size x return get control compute size swt default swt default true docomputesize docomputesize descriptionlabel bodysize computesize griddata griddata descriptionlabel getlayoutdata widthhint bodysize getcontrol computesize returns the preference store of this preference page p this is a framework hook method for subclasses to return a page specific preference store the default implementation returns code null code p return the preference store or code null code if none protected i preference store do get preference store return null ipreferencestore dogetpreferencestore returns the container of this page return the preference page container or code null code if this page has yet to be added to a container public i preference page container get container return container ipreferencepagecontainer getcontainer returns the preference store of this preference page return the preference store or code null code if none public i preference store get preference store if preference store null preference store do get preference store if preference store null return preference store else if container null return container get preference store return null ipreferencestore getpreferencestore preferencestore preferencestore dogetpreferencestore preferencestore preferencestore getpreferencestore the preference page implementation of an code i preference page code method returns whether this preference page is valid preference pages are considered valid by default call code set valid false code to make a page invalid public boolean is valid return is valid ipreferencepage setvalid isvalid isvalid suppresses creation of the standard default and apply buttons for this page p subclasses wishing a preference page wihthout these buttons should call this framework method before the page s control has been created p protected void no default and apply button create default and apply button false nodefaultandapplybutton createdefaultandapplybutton the code preference page code implementation of this code i preference page code method returns code true code if the page is valid public boolean ok to leave return is valid preferencepage ipreferencepage oktoleave isvalid performs special processing when this page s apply button has been pressed p this is a framework hook method for sublcasses to do special things when the apply button has been pressed the default implementation of this framework method simply calls code perform ok code to simulate the pressing of the page s ok button p see perform ok protected void perform apply perform ok performok performok performapply performok the preference page implementation of an code i preference page code method performs special processing when this page s cancel button has been pressed p this is a framework hook method for sublcasses to do special things when the cancel button has been pressed the default implementation of this framework method does nothing and returns code true code public boolean perform cancel return true ipreferencepage performcancel performs special processing when this page s defaults button has been pressed p this is a framework hook method for subclasses to do special things when the defaults button has been pressed subclasses may override but should call code super perform defaults code p protected void perform defaults update apply button performdefaults performdefaults updateapplybutton method declared on i preference page subclasses should override public boolean perform ok return true ipreferencepage performok non javadoc method declared on i preference page public void set container i preference page container container this container container ipreferencepage setcontainer ipreferencepagecontainer sets the preference store for this preference page p if preference store is set to null get preference store will invoke do get preference store the next time it is called p param store the preference store or code null code see get preference store public void set preference store i preference store store preference store store preferencestore getpreferencestore dogetpreferencestore getpreferencestore setpreferencestore ipreferencestore preferencestore public void set size point ui size control control get control if control null control set size ui size size ui size setsize uisize getcontrol setsize uisize uisize the code preference page code implementation of this code i dialog page code method extends the code dialog page code implementation to update the preference page container title subclasses may extend public void set title string title super set title title if get container null get container update title preferencepage idialogpage dialogpage settitle settitle getcontainer getcontainer updatetitle sets whether this page is valid the enable state of the container buttons and the apply button is updated when a page s valid state changes p param b the new valid state public void set valid boolean b boolean old value is valid is valid b if old value is valid update container state if get container null get container update buttons update page state update apply button setvalid oldvalue isvalid isvalid oldvalue isvalid getcontainer getcontainer updatebuttons updateapplybutton returns a string suitable for debugging purpose only public string to string return get title tostring gettitle updates the enabled state of the apply button to reflect whether this page is valid protected void update apply button if apply button null apply button set enabled is valid updateapplybutton applybutton applybutton setenabled isvalid creates a composite with a highlighted note entry and a message text this is designed to take up the full width of the page param font the font to use param composite the parent composite param title the title of the note param message the message for the note return the composite for the note protected composite create note composite font font composite composite string title string message composite message composite new composite composite swt none grid layout message layout new grid layout message layout num columns 2 message layout margin width 0 message layout margin height 0 message composite set layout message layout message composite set layout data new grid data grid data horizontal align fill message composite set font font final label note label new label message composite swt bold note label set text title note label set font j face resources get banner font note label set layout data new grid data grid data vertical align beginning final i property change listener font listener new i property change listener public void property change property change event event if j face resources banner font equals event get property note label set font j face resources get font j face resources banner font j face resources get font registry add listener font listener note label add dispose listener new dispose listener public void widget disposed dispose event event j face resources get font registry remove listener font listener label message label new label message composite swt wrap message label set text message message label set font font return message composite createnotecomposite messagecomposite gridlayout messagelayout gridlayout messagelayout numcolumns messagelayout marginwidth messagelayout marginheight messagecomposite setlayout messagelayout messagecomposite setlayoutdata griddata griddata horizontal_align_fill messagecomposite setfont notelabel messagecomposite notelabel settext notelabel setfont jfaceresources getbannerfont notelabel setlayoutdata griddata griddata vertical_align_beginning ipropertychangelistener fontlistener ipropertychangelistener propertychange propertychangeevent jfaceresources banner_font getproperty notelabel setfont jfaceresources getfont jfaceresources banner_font jfaceresources getfontregistry addlistener fontlistener notelabel adddisposelistener disposelistener widgetdisposed disposeevent jfaceresources getfontregistry removelistener fontlistener messagelabel messagecomposite messagelabel settext messagelabel setfont messagecomposite final i property change listener font listener new i property change listener public void property change property change event event if j face resources banner font equals event get property note label set font j face resources get font j face resources banner font ipropertychangelistener fontlistener ipropertychangelistener propertychange propertychangeevent jfaceresources banner_font getproperty notelabel setfont jfaceresources getfont jfaceresources banner_font j face resources get font registry add listener font listener note label add dispose listener new dispose listener public void widget disposed dispose event event j face resources get font registry remove listener font listener jfaceresources getfontregistry addlistener fontlistener notelabel adddisposelistener disposelistener widgetdisposed disposeevent jfaceresources getfontregistry removelistener fontlistener returns the apply button return the apply button protected button get apply button return apply button getapplybutton applybutton returns the restore defaults button return the restore defaults button protected button get defaults button return defaults button getdefaultsbutton defaultsbutton see org eclipse jface dialogs i dialog page perform help public void perform help get control notify listeners swt help new event idialogpage performhelp performhelp getcontrol notifylisteners apply the data to the receiver by default do nothing param data since 3 1 public void apply data object data applydata public void set error message string new message super set error message new message if get container null get container update message seterrormessage newmessage seterrormessage newmessage getcontainer getcontainer updatemessage public void set message string new message int new type super set message new message new type if get container null get container update message setmessage newmessage newtype setmessage newmessage newtype getcontainer getcontainer updatemessage creates a new preference page with an empty title and no image protected preference page this non nls 1 preferencepage creates a new preference page with the given title and no image param title the title of this preference page protected preference page string title super title preferencepage creates a new abstract preference page with the given title and image param title the title of this preference page param image the image for this preference page or code null code if none protected preference page string title image descriptor image super title image preferencepage imagedescriptor computes the size for this page s ui control p the default implementation of this code i preference page code method returns the size set by code set size code if no size has been set but the page has a ui control the framework method code do compute size code is called to compute the size p return the size of the preference page encoded as code new point width height code or code 0 0 code if the page doesn t currently have any ui component public point compute size if size null return size control control get control if control null size do compute size return size return new point 0 0 ipreferencepage setsize docomputesize computesize getcontrol docomputesize contributes additional buttons to the given composite p the default implementation of this framework hook method does nothing subclasses should override this method to contribute buttons to this page s button bar for each button a subclass contributes it must also increase the parent s grid layout number of columns by one that is pre grid layout parent get layout num columns pre p param parent the button bar protected void contribute buttons composite parent gridlayout getlayout numcolumns contributebuttons creates and returns the swt control for the customized body of this preference page under the given parent composite p this framework method must be implemented by concrete subclasses any subclass returning a code composite code object whose code layout code has default margins for example a code grid layout code are expected to set the margins of this code layout code to 0 pixels p param parent the parent composite return the new control gridlayout the code preference page code implementation of this code i dialog page code method creates a description label and button bar for the page it calls code create contents code to create the custom contents of the page p if a subclass that overrides this method creates a code composite code that has a layout with default margins for example a code grid layout code it is expected to set the margins of this code layout code to 0 pixels public void create control composite parent grid data gd composite content new composite parent swt none set control content grid layout layout new grid layout layout margin width 0 layout margin height 0 content set layout layout apply the font on creation for backward compatibility apply dialog font content initialize the dialog units initialize dialog units content description label create description label content if description label null description label set layout data new grid data grid data fill horizontal body create contents content if body null null is not a valid return value but support graceful failure body set layout data new grid data grid data fill both composite button bar new composite content swt none layout new grid layout layout num columns 0 layout margin height 0 layout margin width 0 layout make columns equal width false button bar set layout layout gd new grid data grid data horizontal align end button bar set layout data gd contribute buttons button bar if create default and apply button layout num columns layout num columns 2 string labels j face resources get strings new string defaults apply non nls 2 non nls 1 int width hint convert horizontaldl us to pixels i dialog constants button width defaults button new button button bar swt push defaults button set text labels 0 dialog apply dialog font defaults button grid data data new grid data grid data horizontal align fill point min button size defaults button compute size swt default swt default true data width hint math max width hint min button size x defaults button set layout data data defaults button add selection listener new selection adapter public void widget selected selection event e perform defaults apply button new button button bar swt push apply button set text labels 1 dialog apply dialog font apply button data new grid data grid data horizontal align fill min button size apply button compute size swt default swt default true data width hint math max width hint min button size x apply button set layout data data apply button add selection listener new selection adapter public void widget selected selection event e perform apply apply button set enabled is valid apply dialog font button bar else check if there are any other buttons on the button bar if not throw away the button bar composite otherwise there is an unusually large button bar if button bar get children length 1 button bar dispose preferencepage idialogpage createcontents gridlayout createcontrol griddata setcontrol gridlayout gridlayout marginwidth marginheight setlayout applydialogfont initializedialogunits descriptionlabel createdescriptionlabel descriptionlabel descriptionlabel setlayoutdata griddata griddata fill_horizontal createcontents setlayoutdata griddata griddata fill_both buttonbar gridlayout numcolumns marginheight marginwidth makecolumnsequalwidth buttonbar setlayout griddata griddata horizontal_align_end buttonbar setlayoutdata contributebuttons buttonbar createdefaultandapplybutton numcolumns numcolumns jfaceresources getstrings widthhint converthorizontaldlustopixels idialogconstants button_width defaultsbutton buttonbar defaultsbutton settext applydialogfont defaultsbutton griddata griddata griddata horizontal_align_fill minbuttonsize defaultsbutton computesize widthhint widthhint minbuttonsize defaultsbutton setlayoutdata defaultsbutton addselectionlistener selectionadapter widgetselected selectionevent performdefaults applybutton buttonbar applybutton settext applydialogfont applybutton griddata griddata horizontal_align_fill minbuttonsize applybutton computesize widthhint widthhint minbuttonsize applybutton setlayoutdata applybutton addselectionlistener selectionadapter widgetselected selectionevent performapply applybutton setenabled isvalid applydialogfont buttonbar buttonbar getchildren buttonbar apply the dialog font to the composite and it s children if it is set subclasses may override if they wish to set the font themselves param composite protected void apply dialog font composite composite dialog apply dialog font composite applydialogfont applydialogfont creates and returns an swt label under the given composite param parent the parent composite return the new label protected label create description label composite parent label result null string description get description if description null result new label parent swt wrap result set font parent get font result set text description return result createdescriptionlabel getdescription setfont getfont settext computes the size needed by this page s ui control p all pages should override this method and set the appropriate sizes of their widgets and then call code super do compute size code p return the size of the preference page encoded as code new point width height code protected point do compute size if description label null body null point body size body compute size swt default swt default true grid data gd grid data description label get layout data gd width hint body size x return get control compute size swt default swt default true docomputesize docomputesize descriptionlabel bodysize computesize griddata griddata descriptionlabel getlayoutdata widthhint bodysize getcontrol computesize returns the preference store of this preference page p this is a framework hook method for subclasses to return a page specific preference store the default implementation returns code null code p return the preference store or code null code if none protected i preference store do get preference store return null ipreferencestore dogetpreferencestore returns the container of this page return the preference page container or code null code if this page has yet to be added to a container public i preference page container get container return container ipreferencepagecontainer getcontainer returns the preference store of this preference page return the preference store or code null code if none public i preference store get preference store if preference store null preference store do get preference store if preference store null return preference store else if container null return container get preference store return null ipreferencestore getpreferencestore preferencestore preferencestore dogetpreferencestore preferencestore preferencestore getpreferencestore the preference page implementation of an code i preference page code method returns whether this preference page is valid preference pages are considered valid by default call code set valid false code to make a page invalid public boolean is valid return is valid ipreferencepage setvalid isvalid isvalid suppresses creation of the standard default and apply buttons for this page p subclasses wishing a preference page wihthout these buttons should call this framework method before the page s control has been created p protected void no default and apply button create default and apply button false nodefaultandapplybutton createdefaultandapplybutton the code preference page code implementation of this code i preference page code method returns code true code if the page is valid public boolean ok to leave return is valid preferencepage ipreferencepage oktoleave isvalid performs special processing when this page s apply button has been pressed p this is a framework hook method for sublcasses to do special things when the apply button has been pressed the default implementation of this framework method simply calls code perform ok code to simulate the pressing of the page s ok button p see perform ok protected void perform apply perform ok performok performok performapply performok the preference page implementation of an code i preference page code method performs special processing when this page s cancel button has been pressed p this is a framework hook method for sublcasses to do special things when the cancel button has been pressed the default implementation of this framework method does nothing and returns code true code public boolean perform cancel return true ipreferencepage performcancel performs special processing when this page s defaults button has been pressed p this is a framework hook method for subclasses to do special things when the defaults button has been pressed subclasses may override but should call code super perform defaults code p protected void perform defaults update apply button performdefaults performdefaults updateapplybutton method declared on i preference page subclasses should override public boolean perform ok return true ipreferencepage performok non javadoc method declared on i preference page public void set container i preference page container container this container container ipreferencepage setcontainer ipreferencepagecontainer sets the preference store for this preference page p if preference store is set to null get preference store will invoke do get preference store the next time it is called p param store the preference store or code null code see get preference store public void set preference store i preference store store preference store store preferencestore getpreferencestore dogetpreferencestore getpreferencestore setpreferencestore ipreferencestore preferencestore public void set size point ui size control control get control if control null control set size ui size size ui size setsize uisize getcontrol setsize uisize uisize the code preference page code implementation of this code i dialog page code method extends the code dialog page code implementation to update the preference page container title subclasses may extend public void set title string title super set title title if get container null get container update title preferencepage idialogpage dialogpage settitle settitle getcontainer getcontainer updatetitle sets whether this page is valid the enable state of the container buttons and the apply button is updated when a page s valid state changes p param b the new valid state public void set valid boolean b boolean old value is valid is valid b if old value is valid update container state if get container null get container update buttons update page state update apply button setvalid oldvalue isvalid isvalid oldvalue isvalid getcontainer getcontainer updatebuttons updateapplybutton returns a string suitable for debugging purpose only public string to string return get title tostring gettitle updates the enabled state of the apply button to reflect whether this page is valid protected void update apply button if apply button null apply button set enabled is valid updateapplybutton applybutton applybutton setenabled isvalid creates a composite with a highlighted note entry and a message text this is designed to take up the full width of the page param font the font to use param composite the parent composite param title the title of the note param message the message for the note return the composite for the note protected composite create note composite font font composite composite string title string message composite message composite new composite composite swt none grid layout message layout new grid layout message layout num columns 2 message layout margin width 0 message layout margin height 0 message composite set layout message layout message composite set layout data new grid data grid data horizontal align fill message composite set font font final label note label new label message composite swt bold note label set text title note label set font j face resources get banner font note label set layout data new grid data grid data vertical align beginning final i property change listener font listener new i property change listener public void property change property change event event if j face resources banner font equals event get property note label set font j face resources get font j face resources banner font j face resources get font registry add listener font listener note label add dispose listener new dispose listener public void widget disposed dispose event event j face resources get font registry remove listener font listener label message label new label message composite swt wrap message label set text message message label set font font return message composite createnotecomposite messagecomposite gridlayout messagelayout gridlayout messagelayout numcolumns messagelayout marginwidth messagelayout marginheight messagecomposite setlayout messagelayout messagecomposite setlayoutdata griddata griddata horizontal_align_fill messagecomposite setfont notelabel messagecomposite notelabel settext notelabel setfont jfaceresources getbannerfont notelabel setlayoutdata griddata griddata vertical_align_beginning ipropertychangelistener fontlistener ipropertychangelistener propertychange propertychangeevent jfaceresources banner_font getproperty notelabel setfont jfaceresources getfont jfaceresources banner_font jfaceresources getfontregistry addlistener fontlistener notelabel adddisposelistener disposelistener widgetdisposed disposeevent jfaceresources getfontregistry removelistener fontlistener messagelabel messagecomposite messagelabel settext messagelabel setfont messagecomposite returns the apply button return the apply button protected button get apply button return apply button getapplybutton applybutton returns the restore defaults button return the restore defaults button protected button get defaults button return defaults button getdefaultsbutton defaultsbutton see org eclipse jface dialogs i dialog page perform help public void perform help get control notify listeners swt help new event idialogpage performhelp performhelp getcontrol notifylisteners apply the data to the receiver by default do nothing param data since 3 1 public void apply data object data applydata public void set error message string new message super set error message new message if get container null get container update message seterrormessage newmessage seterrormessage newmessage getcontainer getcontainer updatemessage public void set message string new message int new type super set message new message new type if get container null get container update message setmessage newmessage newtype setmessage newmessage newtype getcontainer getcontainer updatemessage creates a new preference page with an empty title and no image protected preference page this non nls 1 preferencepage creates a new preference page with the given title and no image param title the title of this preference page protected preference page string title super title preferencepage creates a new abstract preference page with the given title and image param title the title of this preference page param image the image for this preference page or code null code if none protected preference page string title image descriptor image super title image preferencepage imagedescriptor computes the size for this page s ui control p the default implementation of this code i preference page code method returns the size set by code set size code if no size has been set but the page has a ui control the framework method code do compute size code is called to compute the size p return the size of the preference page encoded as code new point width height code or code 0 0 code if the page doesn t currently have any ui component public point compute size if size null return size control control get control if control null size do compute size return size return new point 0 0 ipreferencepage setsize docomputesize computesize getcontrol docomputesize contributes additional buttons to the given composite p the default implementation of this framework hook method does nothing subclasses should override this method to contribute buttons to this page s button bar for each button a subclass contributes it must also increase the parent s grid layout number of columns by one that is pre grid layout parent get layout num columns pre p param parent the button bar protected void contribute buttons composite parent gridlayout getlayout numcolumns contributebuttons creates and returns the swt control for the customized body of this preference page under the given parent composite p this framework method must be implemented by concrete subclasses any subclass returning a code composite code object whose code layout code has default margins for example a code grid layout code are expected to set the margins of this code layout code to 0 pixels p param parent the parent composite return the new control gridlayout the code preference page code implementation of this code i dialog page code method creates a description label and button bar for the page it calls code create contents code to create the custom contents of the page p if a subclass that overrides this method creates a code composite code that has a layout with default margins for example a code grid layout code it is expected to set the margins of this code layout code to 0 pixels public void create control composite parent grid data gd composite content new composite parent swt none set control content grid layout layout new grid layout layout margin width 0 layout margin height 0 content set layout layout apply the font on creation for backward compatibility apply dialog font content initialize the dialog units initialize dialog units content description label create description label content if description label null description label set layout data new grid data grid data fill horizontal body create contents content if body null null is not a valid return value but support graceful failure body set layout data new grid data grid data fill both composite button bar new composite content swt none layout new grid layout layout num columns 0 layout margin height 0 layout margin width 0 layout make columns equal width false button bar set layout layout gd new grid data grid data horizontal align end button bar set layout data gd contribute buttons button bar if create default and apply button layout num columns layout num columns 2 string labels j face resources get strings new string defaults apply non nls 2 non nls 1 int width hint convert horizontaldl us to pixels i dialog constants button width defaults button new button button bar swt push defaults button set text labels 0 dialog apply dialog font defaults button grid data data new grid data grid data horizontal align fill point min button size defaults button compute size swt default swt default true data width hint math max width hint min button size x defaults button set layout data data defaults button add selection listener new selection adapter public void widget selected selection event e perform defaults apply button new button button bar swt push apply button set text labels 1 dialog apply dialog font apply button data new grid data grid data horizontal align fill min button size apply button compute size swt default swt default true data width hint math max width hint min button size x apply button set layout data data apply button add selection listener new selection adapter public void widget selected selection event e perform apply apply button set enabled is valid apply dialog font button bar else check if there are any other buttons on the button bar if not throw away the button bar composite otherwise there is an unusually large button bar if button bar get children length 1 button bar dispose preferencepage idialogpage createcontents gridlayout createcontrol griddata setcontrol gridlayout gridlayout marginwidth marginheight setlayout applydialogfont initializedialogunits descriptionlabel createdescriptionlabel descriptionlabel descriptionlabel setlayoutdata griddata griddata fill_horizontal createcontents setlayoutdata griddata griddata fill_both buttonbar gridlayout numcolumns marginheight marginwidth makecolumnsequalwidth buttonbar setlayout griddata griddata horizontal_align_end buttonbar setlayoutdata contributebuttons buttonbar createdefaultandapplybutton numcolumns numcolumns jfaceresources getstrings widthhint converthorizontaldlustopixels idialogconstants button_width defaultsbutton buttonbar defaultsbutton settext applydialogfont defaultsbutton griddata griddata griddata horizontal_align_fill minbuttonsize defaultsbutton computesize widthhint widthhint minbuttonsize defaultsbutton setlayoutdata defaultsbutton addselectionlistener selectionadapter widgetselected selectionevent performdefaults applybutton buttonbar applybutton settext applydialogfont applybutton griddata griddata horizontal_align_fill minbuttonsize applybutton computesize widthhint widthhint minbuttonsize applybutton setlayoutdata applybutton addselectionlistener selectionadapter widgetselected selectionevent performapply applybutton setenabled isvalid applydialogfont buttonbar buttonbar getchildren buttonbar apply the dialog font to the composite and it s children if it is set subclasses may override if they wish to set the font themselves param composite protected void apply dialog font composite composite dialog apply dialog font composite applydialogfont applydialogfont creates and returns an swt label under the given composite param parent the parent composite return the new label protected label create description label composite parent label result null string description get description if description null result new label parent swt wrap result set font parent get font result set text description return result createdescriptionlabel getdescription setfont getfont settext computes the size needed by this page s ui control p all pages should override this method and set the appropriate sizes of their widgets and then call code super do compute size code p return the size of the preference page encoded as code new point width height code protected point do compute size if description label null body null point body size body compute size swt default swt default true grid data gd grid data description label get layout data gd width hint body size x return get control compute size swt default swt default true docomputesize docomputesize descriptionlabel bodysize computesize griddata griddata descriptionlabel getlayoutdata widthhint bodysize getcontrol computesize returns the preference store of this preference page p this is a framework hook method for subclasses to return a page specific preference store the default implementation returns code null code p return the preference store or code null code if none protected i preference store do get preference store return null ipreferencestore dogetpreferencestore returns the container of this page return the preference page container or code null code if this page has yet to be added to a container public i preference page container get container return container ipreferencepagecontainer getcontainer returns the preference store of this preference page return the preference store or code null code if none public i preference store get preference store if preference store null preference store do get preference store if preference store null return preference store else if container null return container get preference store return null ipreferencestore getpreferencestore preferencestore preferencestore dogetpreferencestore preferencestore preferencestore getpreferencestore the preference page implementation of an code i preference page code method returns whether this preference page is valid preference pages are considered valid by default call code set valid false code to make a page invalid public boolean is valid return is valid ipreferencepage setvalid isvalid isvalid suppresses creation of the standard default and apply buttons for this page p subclasses wishing a preference page wihthout these buttons should call this framework method before the page s control has been created p protected void no default and apply button create default and apply button false nodefaultandapplybutton createdefaultandapplybutton the code preference page code implementation of this code i preference page code method returns code true code if the page is valid public boolean ok to leave return is valid preferencepage ipreferencepage oktoleave isvalid performs special processing when this page s apply button has been pressed p this is a framework hook method for sublcasses to do special things when the apply button has been pressed the default implementation of this framework method simply calls code perform ok code to simulate the pressing of the page s ok button p see perform ok protected void perform apply perform ok performok performok performapply performok the preference page implementation of an code i preference page code method performs special processing when this page s cancel button has been pressed p this is a framework hook method for sublcasses to do special things when the cancel button has been pressed the default implementation of this framework method does nothing and returns code true code public boolean perform cancel return true ipreferencepage performcancel performs special processing when this page s defaults button has been pressed p this is a framework hook method for subclasses to do special things when the defaults button has been pressed subclasses may override but should call code super perform defaults code p protected void perform defaults update apply button performdefaults performdefaults updateapplybutton method declared on i preference page subclasses should override public boolean perform ok return true ipreferencepage performok non javadoc method declared on i preference page public void set container i preference page container container this container container ipreferencepage setcontainer ipreferencepagecontainer sets the preference store for this preference page p if preference store is set to null get preference store will invoke do get preference store the next time it is called p param store the preference store or code null code see get preference store public void set preference store i preference store store preference store store preferencestore getpreferencestore dogetpreferencestore getpreferencestore setpreferencestore ipreferencestore preferencestore public void set size point ui size control control get control if control null control set size ui size size ui size setsize uisize getcontrol setsize uisize uisize the code preference page code implementation of this code i dialog page code method extends the code dialog page code implementation to update the preference page container title subclasses may extend public void set title string title super set title title if get container null get container update title preferencepage idialogpage dialogpage settitle settitle getcontainer getcontainer updatetitle sets whether this page is valid the enable state of the container buttons and the apply button is updated when a page s valid state changes p param b the new valid state public void set valid boolean b boolean old value is valid is valid b if old value is valid update container state if get container null get container update buttons update page state update apply button setvalid oldvalue isvalid isvalid oldvalue isvalid getcontainer getcontainer updatebuttons updateapplybutton returns a string suitable for debugging purpose only public string to string return get title tostring gettitle updates the enabled state of the apply button to reflect whether this page is valid protected void update apply button if apply button null apply button set enabled is valid updateapplybutton applybutton applybutton setenabled isvalid creates a composite with a highlighted note entry and a message text this is designed to take up the full width of the page param font the font to use param composite the parent composite param title the title of the note param message the message for the note return the composite for the note protected composite create note composite font font composite composite string title string message composite message composite new composite composite swt none grid layout message layout new grid layout message layout num columns 2 message layout margin width 0 message layout margin height 0 message composite set layout message layout message composite set layout data new grid data grid data horizontal align fill message composite set font font final label note label new label message composite swt bold note label set text title note label set font j face resources get banner font note label set layout data new grid data grid data vertical align beginning final i property change listener font listener new i property change listener public void property change property change event event if j face resources banner font equals event get property note label set font j face resources get font j face resources banner font j face resources get font registry add listener font listener note label add dispose listener new dispose listener public void widget disposed dispose event event j face resources get font registry remove listener font listener label message label new label message composite swt wrap message label set text message message label set font font return message composite createnotecomposite messagecomposite gridlayout messagelayout gridlayout messagelayout numcolumns messagelayout marginwidth messagelayout marginheight messagecomposite setlayout messagelayout messagecomposite setlayoutdata griddata griddata horizontal_align_fill messagecomposite setfont notelabel messagecomposite notelabel settext notelabel setfont jfaceresources getbannerfont notelabel setlayoutdata griddata griddata vertical_align_beginning ipropertychangelistener fontlistener ipropertychangelistener propertychange propertychangeevent jfaceresources banner_font getproperty notelabel setfont jfaceresources getfont jfaceresources banner_font jfaceresources getfontregistry addlistener fontlistener notelabel adddisposelistener disposelistener widgetdisposed disposeevent jfaceresources getfontregistry removelistener fontlistener messagelabel messagecomposite messagelabel settext messagelabel setfont messagecomposite returns the apply button return the apply button protected button get apply button return apply button getapplybutton applybutton returns the restore defaults button return the restore defaults button protected button get defaults button return defaults button getdefaultsbutton defaultsbutton see org eclipse jface dialogs i dialog page perform help public void perform help get control notify listeners swt help new event idialogpage performhelp performhelp getcontrol notifylisteners apply the data to the receiver by default do nothing param data since 3 1 public void apply data object data applydata public void set error message string new message super set error message new message if get container null get container update message seterrormessage newmessage seterrormessage newmessage getcontainer getcontainer updatemessage public void set message string new message int new type super set message new message new type if get container null get container update message setmessage newmessage newtype setmessage newmessage newtype getcontainer getcontainer updatemessage creates a new preference page with an empty title and no image protected preference page this non nls 1 preferencepage creates a new preference page with the given title and no image param title the title of this preference page protected preference page string title super title preferencepage creates a new abstract preference page with the given title and image param title the title of this preference page param image the image for this preference page or code null code if none protected preference page string title image descriptor image super title image preferencepage imagedescriptor computes the size for this page s ui control p the default implementation of this code i preference page code method returns the size set by code set size code if no size has been set but the page has a ui control the framework method code do compute size code is called to compute the size p return the size of the preference page encoded as code new point width height code or code 0 0 code if the page doesn t currently have any ui component public point compute size if size null return size control control get control if control null size do compute size return size return new point 0 0 ipreferencepage setsize docomputesize computesize getcontrol docomputesize contributes additional buttons to the given composite p the default implementation of this framework hook method does nothing subclasses should override this method to contribute buttons to this page s button bar for each button a subclass contributes it must also increase the parent s grid layout number of columns by one that is pre grid layout parent get layout num columns pre p param parent the button bar protected void contribute buttons composite parent gridlayout getlayout numcolumns contributebuttons creates and returns the swt control for the customized body of this preference page under the given parent composite p this framework method must be implemented by concrete subclasses any subclass returning a code composite code object whose code layout code has default margins for example a code grid layout code are expected to set the margins of this code layout code to 0 pixels p param parent the parent composite return the new control gridlayout the code preference page code implementation of this code i dialog page code method creates a description label and button bar for the page it calls code create contents code to create the custom contents of the page p if a subclass that overrides this method creates a code composite code that has a layout with default margins for example a code grid layout code it is expected to set the margins of this code layout code to 0 pixels public void create control composite parent grid data gd composite content new composite parent swt none set control content grid layout layout new grid layout layout margin width 0 layout margin height 0 content set layout layout apply the font on creation for backward compatibility apply dialog font content initialize the dialog units initialize dialog units content description label create description label content if description label null description label set layout data new grid data grid data fill horizontal body create contents content if body null null is not a valid return value but support graceful failure body set layout data new grid data grid data fill both composite button bar new composite content swt none layout new grid layout layout num columns 0 layout margin height 0 layout margin width 0 layout make columns equal width false button bar set layout layout gd new grid data grid data horizontal align end button bar set layout data gd contribute buttons button bar if create default and apply button layout num columns layout num columns 2 string labels j face resources get strings new string defaults apply non nls 2 non nls 1 int width hint convert horizontaldl us to pixels i dialog constants button width defaults button new button button bar swt push defaults button set text labels 0 dialog apply dialog font defaults button grid data data new grid data grid data horizontal align fill point min button size defaults button compute size swt default swt default true data width hint math max width hint min button size x defaults button set layout data data defaults button add selection listener new selection adapter public void widget selected selection event e perform defaults apply button new button button bar swt push apply button set text labels 1 dialog apply dialog font apply button data new grid data grid data horizontal align fill min button size apply button compute size swt default swt default true data width hint math max width hint min button size x apply button set layout data data apply button add selection listener new selection adapter public void widget selected selection event e perform apply apply button set enabled is valid apply dialog font button bar else check if there are any other buttons on the button bar if not throw away the button bar composite otherwise there is an unusually large button bar if button bar get children length 1 button bar dispose preferencepage idialogpage createcontents gridlayout createcontrol griddata setcontrol gridlayout gridlayout marginwidth marginheight setlayout applydialogfont initializedialogunits descriptionlabel createdescriptionlabel descriptionlabel descriptionlabel setlayoutdata griddata griddata fill_horizontal createcontents setlayoutdata griddata griddata fill_both buttonbar gridlayout numcolumns marginheight marginwidth makecolumnsequalwidth buttonbar setlayout griddata griddata horizontal_align_end buttonbar setlayoutdata contributebuttons buttonbar createdefaultandapplybutton numcolumns numcolumns jfaceresources getstrings widthhint converthorizontaldlustopixels idialogconstants button_width defaultsbutton buttonbar defaultsbutton settext applydialogfont defaultsbutton griddata griddata griddata horizontal_align_fill minbuttonsize defaultsbutton computesize widthhint widthhint minbuttonsize defaultsbutton setlayoutdata defaultsbutton addselectionlistener selectionadapter widgetselected selectionevent performdefaults applybutton buttonbar applybutton settext applydialogfont applybutton griddata griddata horizontal_align_fill minbuttonsize applybutton computesize widthhint widthhint minbuttonsize applybutton setlayoutdata applybutton addselectionlistener selectionadapter widgetselected selectionevent performapply applybutton setenabled isvalid applydialogfont buttonbar buttonbar getchildren buttonbar apply the dialog font to the composite and it s children if it is set subclasses may override if they wish to set the font themselves param composite protected void apply dialog font composite composite dialog apply dialog font composite applydialogfont applydialogfont creates and returns an swt label under the given composite param parent the parent composite return the new label protected label create description label composite parent label result null string description get description if description null result new label parent swt wrap result set font parent get font result set text description return result createdescriptionlabel getdescription setfont getfont settext computes the size needed by this page s ui control p all pages should override this method and set the appropriate sizes of their widgets and then call code super do compute size code p return the size of the preference page encoded as code new point width height code protected point do compute size if description label null body null point body size body compute size swt default swt default true grid data gd grid data description label get layout data gd width hint body size x return get control compute size swt default swt default true docomputesize docomputesize descriptionlabel bodysize computesize griddata griddata descriptionlabel getlayoutdata widthhint bodysize getcontrol computesize returns the preference store of this preference page p this is a framework hook method for subclasses to return a page specific preference store the default implementation returns code null code p return the preference store or code null code if none protected i preference store do get preference store return null ipreferencestore dogetpreferencestore returns the container of this page return the preference page container or code null code if this page has yet to be added to a container public i preference page container get container return container ipreferencepagecontainer getcontainer returns the preference store of this preference page return the preference store or code null code if none public i preference store get preference store if preference store null preference store do get preference store if preference store null return preference store else if container null return container get preference store return null ipreferencestore getpreferencestore preferencestore preferencestore dogetpreferencestore preferencestore preferencestore getpreferencestore the preference page implementation of an code i preference page code method returns whether this preference page is valid preference pages are considered valid by default call code set valid false code to make a page invalid public boolean is valid return is valid ipreferencepage setvalid isvalid isvalid suppresses creation of the standard default and apply buttons for this page p subclasses wishing a preference page wihthout these buttons should call this framework method before the page s control has been created p protected void no default and apply button create default and apply button false nodefaultandapplybutton createdefaultandapplybutton the code preference page code implementation of this code i preference page code method returns code true code if the page is valid public boolean ok to leave return is valid preferencepage ipreferencepage oktoleave isvalid performs special processing when this page s apply button has been pressed p this is a framework hook method for sublcasses to do special things when the apply button has been pressed the default implementation of this framework method simply calls code perform ok code to simulate the pressing of the page s ok button p see perform ok protected void perform apply perform ok performok performok performapply performok the preference page implementation of an code i preference page code method performs special processing when this page s cancel button has been pressed p this is a framework hook method for sublcasses to do special things when the cancel button has been pressed the default implementation of this framework method does nothing and returns code true code public boolean perform cancel return true ipreferencepage performcancel performs special processing when this page s defaults button has been pressed p this is a framework hook method for subclasses to do special things when the defaults button has been pressed subclasses may override but should call code super perform defaults code p protected void perform defaults update apply button performdefaults performdefaults updateapplybutton method declared on i preference page subclasses should override public boolean perform ok return true ipreferencepage performok non javadoc method declared on i preference page public void set container i preference page container container this container container ipreferencepage setcontainer ipreferencepagecontainer sets the preference store for this preference page p if preference store is set to null get preference store will invoke do get preference store the next time it is called p param store the preference store or code null code see get preference store public void set preference store i preference store store preference store store preferencestore getpreferencestore dogetpreferencestore getpreferencestore setpreferencestore ipreferencestore preferencestore public void set size point ui size control control get control if control null control set size ui size size ui size setsize uisize getcontrol setsize uisize uisize the code preference page code implementation of this code i dialog page code method extends the code dialog page code implementation to update the preference page container title subclasses may extend public void set title string title super set title title if get container null get container update title preferencepage idialogpage dialogpage settitle settitle getcontainer getcontainer updatetitle sets whether this page is valid the enable state of the container buttons and the apply button is updated when a page s valid state changes p param b the new valid state public void set valid boolean b boolean old value is valid is valid b if old value is valid update container state if get container null get container update buttons update page state update apply button setvalid oldvalue isvalid isvalid oldvalue isvalid getcontainer getcontainer updatebuttons updateapplybutton returns a string suitable for debugging purpose only public string to string return get title tostring gettitle updates the enabled state of the apply button to reflect whether this page is valid protected void update apply button if apply button null apply button set enabled is valid updateapplybutton applybutton applybutton setenabled isvalid creates a composite with a highlighted note entry and a message text this is designed to take up the full width of the page param font the font to use param composite the parent composite param title the title of the note param message the message for the note return the composite for the note protected composite create note composite font font composite composite string title string message composite message composite new composite composite swt none grid layout message layout new grid layout message layout num columns 2 message layout margin width 0 message layout margin height 0 message composite set layout message layout message composite set layout data new grid data grid data horizontal align fill message composite set font font final label note label new label message composite swt bold note label set text title note label set font j face resources get banner font note label set layout data new grid data grid data vertical align beginning final i property change listener font listener new i property change listener public void property change property change event event if j face resources banner font equals event get property note label set font j face resources get font j face resources banner font j face resources get font registry add listener font listener note label add dispose listener new dispose listener public void widget disposed dispose event event j face resources get font registry remove listener font listener label message label new label message composite swt wrap message label set text message message label set font font return message composite createnotecomposite messagecomposite gridlayout messagelayout gridlayout messagelayout numcolumns messagelayout marginwidth messagelayout marginheight messagecomposite setlayout messagelayout messagecomposite setlayoutdata griddata griddata horizontal_align_fill messagecomposite setfont notelabel messagecomposite notelabel settext notelabel setfont jfaceresources getbannerfont notelabel setlayoutdata griddata griddata vertical_align_beginning ipropertychangelistener fontlistener ipropertychangelistener propertychange propertychangeevent jfaceresources banner_font getproperty notelabel setfont jfaceresources getfont jfaceresources banner_font jfaceresources getfontregistry addlistener fontlistener notelabel adddisposelistener disposelistener widgetdisposed disposeevent jfaceresources getfontregistry removelistener fontlistener messagelabel messagecomposite messagelabel settext messagelabel setfont messagecomposite returns the apply button return the apply button protected button get apply button return apply button getapplybutton applybutton returns the restore defaults button return the restore defaults button protected button get defaults button return defaults button getdefaultsbutton defaultsbutton see org eclipse jface dialogs i dialog page perform help public void perform help get control notify listeners swt help new event idialogpage performhelp performhelp getcontrol notifylisteners apply the data to the receiver by default do nothing param data since 3 1 public void apply data object data applydata public void set error message string new message super set error message new message if get container null get container update message seterrormessage newmessage seterrormessage newmessage getcontainer getcontainer updatemessage public void set message string new message int new type super set message new message new type if get container null get container update message setmessage newmessage newtype setmessage newmessage newtype getcontainer getcontainer updatemessage creates a new preference page with an empty title and no image protected preference page this non nls 1 preferencepage creates a new preference page with the given title and no image param title the title of this preference page protected preference page string title super title preferencepage creates a new abstract preference page with the given title and image param title the title of this preference page param image the image for this preference page or code null code if none protected preference page string title image descriptor image super title image preferencepage imagedescriptor computes the size for this page s ui control p the default implementation of this code i preference page code method returns the size set by code set size code if no size has been set but the page has a ui control the framework method code do compute size code is called to compute the size p return the size of the preference page encoded as code new point width height code or code 0 0 code if the page doesn t currently have any ui component public point compute size if size null return size control control get control if control null size do compute size return size return new point 0 0 ipreferencepage setsize docomputesize computesize getcontrol docomputesize contributes additional buttons to the given composite p the default implementation of this framework hook method does nothing subclasses should override this method to contribute buttons to this page s button bar for each button a subclass contributes it must also increase the parent s grid layout number of columns by one that is pre grid layout parent get layout num columns pre p param parent the button bar protected void contribute buttons composite parent gridlayout getlayout numcolumns contributebuttons creates and returns the swt control for the customized body of this preference page under the given parent composite p this framework method must be implemented by concrete subclasses any subclass returning a code composite code object whose code layout code has default margins for example a code grid layout code are expected to set the margins of this code layout code to 0 pixels p param parent the parent composite return the new control gridlayout the code preference page code implementation of this code i dialog page code method creates a description label and button bar for the page it calls code create contents code to create the custom contents of the page p if a subclass that overrides this method creates a code composite code that has a layout with default margins for example a code grid layout code it is expected to set the margins of this code layout code to 0 pixels public void create control composite parent grid data gd composite content new composite parent swt none set control content grid layout layout new grid layout layout margin width 0 layout margin height 0 content set layout layout apply the font on creation for backward compatibility apply dialog font content initialize the dialog units initialize dialog units content description label create description label content if description label null description label set layout data new grid data grid data fill horizontal body create contents content if body null null is not a valid return value but support graceful failure body set layout data new grid data grid data fill both composite button bar new composite content swt none layout new grid layout layout num columns 0 layout margin height 0 layout margin width 0 layout make columns equal width false button bar set layout layout gd new grid data grid data horizontal align end button bar set layout data gd contribute buttons button bar if create default and apply button layout num columns layout num columns 2 string labels j face resources get strings new string defaults apply non nls 2 non nls 1 int width hint convert horizontaldl us to pixels i dialog constants button width defaults button new button button bar swt push defaults button set text labels 0 dialog apply dialog font defaults button grid data data new grid data grid data horizontal align fill point min button size defaults button compute size swt default swt default true data width hint math max width hint min button size x defaults button set layout data data defaults button add selection listener new selection adapter public void widget selected selection event e perform defaults apply button new button button bar swt push apply button set text labels 1 dialog apply dialog font apply button data new grid data grid data horizontal align fill min button size apply button compute size swt default swt default true data width hint math max width hint min button size x apply button set layout data data apply button add selection listener new selection adapter public void widget selected selection event e perform apply apply button set enabled is valid apply dialog font button bar else check if there are any other buttons on the button bar if not throw away the button bar composite otherwise there is an unusually large button bar if button bar get children length 1 button bar dispose preferencepage idialogpage createcontents gridlayout createcontrol griddata setcontrol gridlayout gridlayout marginwidth marginheight setlayout applydialogfont initializedialogunits descriptionlabel createdescriptionlabel descriptionlabel descriptionlabel setlayoutdata griddata griddata fill_horizontal createcontents setlayoutdata griddata griddata fill_both buttonbar gridlayout numcolumns marginheight marginwidth makecolumnsequalwidth buttonbar setlayout griddata griddata horizontal_align_end buttonbar setlayoutdata contributebuttons buttonbar createdefaultandapplybutton numcolumns numcolumns jfaceresources getstrings widthhint converthorizontaldlustopixels idialogconstants button_width defaultsbutton buttonbar defaultsbutton settext applydialogfont defaultsbutton griddata griddata griddata horizontal_align_fill minbuttonsize defaultsbutton computesize widthhint widthhint minbuttonsize defaultsbutton setlayoutdata defaultsbutton addselectionlistener selectionadapter widgetselected selectionevent performdefaults applybutton buttonbar applybutton settext applydialogfont applybutton griddata griddata horizontal_align_fill minbuttonsize applybutton computesize widthhint widthhint minbuttonsize applybutton setlayoutdata applybutton addselectionlistener selectionadapter widgetselected selectionevent performapply applybutton setenabled isvalid applydialogfont buttonbar buttonbar getchildren buttonbar defaults button set layout data data defaults button add selection listener new selection adapter public void widget selected selection event e perform defaults defaultsbutton setlayoutdata defaultsbutton addselectionlistener selectionadapter widgetselected selectionevent performdefaults apply button set layout data data apply button add selection listener new selection adapter public void widget selected selection event e perform apply applybutton setlayoutdata applybutton addselectionlistener selectionadapter widgetselected selectionevent performapply apply the dialog font to the composite and it s children if it is set subclasses may override if they wish to set the font themselves param composite protected void apply dialog font composite composite dialog apply dialog font composite applydialogfont applydialogfont creates and returns an swt label under the given composite param parent the parent composite return the new label protected label create description label composite parent label result null string description get description if description null result new label parent swt wrap result set font parent get font result set text description return result createdescriptionlabel getdescription setfont getfont settext computes the size needed by this page s ui control p all pages should override this method and set the appropriate sizes of their widgets and then call code super do compute size code p return the size of the preference page encoded as code new point width height code protected point do compute size if description label null body null point body size body compute size swt default swt default true grid data gd grid data description label get layout data gd width hint body size x return get control compute size swt default swt default true docomputesize docomputesize descriptionlabel bodysize computesize griddata griddata descriptionlabel getlayoutdata widthhint bodysize getcontrol computesize returns the preference store of this preference page p this is a framework hook method for subclasses to return a page specific preference store the default implementation returns code null code p return the preference store or code null code if none protected i preference store do get preference store return null ipreferencestore dogetpreferencestore returns the container of this page return the preference page container or code null code if this page has yet to be added to a container public i preference page container get container return container ipreferencepagecontainer getcontainer returns the preference store of this preference page return the preference store or code null code if none public i preference store get preference store if preference store null preference store do get preference store if preference store null return preference store else if container null return container get preference store return null ipreferencestore getpreferencestore preferencestore preferencestore dogetpreferencestore preferencestore preferencestore getpreferencestore the preference page implementation of an code i preference page code method returns whether this preference page is valid preference pages are considered valid by default call code set valid false code to make a page invalid public boolean is valid return is valid ipreferencepage setvalid isvalid isvalid suppresses creation of the standard default and apply buttons for this page p subclasses wishing a preference page wihthout these buttons should call this framework method before the page s control has been created p protected void no default and apply button create default and apply button false nodefaultandapplybutton createdefaultandapplybutton the code preference page code implementation of this code i preference page code method returns code true code if the page is valid public boolean ok to leave return is valid preferencepage ipreferencepage oktoleave isvalid performs special processing when this page s apply button has been pressed p this is a framework hook method for sublcasses to do special things when the apply button has been pressed the default implementation of this framework method simply calls code perform ok code to simulate the pressing of the page s ok button p see perform ok protected void perform apply perform ok performok performok performapply performok the preference page implementation of an code i preference page code method performs special processing when this page s cancel button has been pressed p this is a framework hook method for sublcasses to do special things when the cancel button has been pressed the default implementation of this framework method does nothing and returns code true code public boolean perform cancel return true ipreferencepage performcancel performs special processing when this page s defaults button has been pressed p this is a framework hook method for subclasses to do special things when the defaults button has been pressed subclasses may override but should call code super perform defaults code p protected void perform defaults update apply button performdefaults performdefaults updateapplybutton method declared on i preference page subclasses should override public boolean perform ok return true ipreferencepage performok non javadoc method declared on i preference page public void set container i preference page container container this container container ipreferencepage setcontainer ipreferencepagecontainer sets the preference store for this preference page p if preference store is set to null get preference store will invoke do get preference store the next time it is called p param store the preference store or code null code see get preference store public void set preference store i preference store store preference store store preferencestore getpreferencestore dogetpreferencestore getpreferencestore setpreferencestore ipreferencestore preferencestore public void set size point ui size control control get control if control null control set size ui size size ui size setsize uisize getcontrol setsize uisize uisize the code preference page code implementation of this code i dialog page code method extends the code dialog page code implementation to update the preference page container title subclasses may extend public void set title string title super set title title if get container null get container update title preferencepage idialogpage dialogpage settitle settitle getcontainer getcontainer updatetitle sets whether this page is valid the enable state of the container buttons and the apply button is updated when a page s valid state changes p param b the new valid state public void set valid boolean b boolean old value is valid is valid b if old value is valid update container state if get container null get container update buttons update page state update apply button setvalid oldvalue isvalid isvalid oldvalue isvalid getcontainer getcontainer updatebuttons updateapplybutton returns a string suitable for debugging purpose only public string to string return get title tostring gettitle updates the enabled state of the apply button to reflect whether this page is valid protected void update apply button if apply button null apply button set enabled is valid updateapplybutton applybutton applybutton setenabled isvalid creates a composite with a highlighted note entry and a message text this is designed to take up the full width of the page param font the font to use param composite the parent composite param title the title of the note param message the message for the note return the composite for the note protected composite create note composite font font composite composite string title string message composite message composite new composite composite swt none grid layout message layout new grid layout message layout num columns 2 message layout margin width 0 message layout margin height 0 message composite set layout message layout message composite set layout data new grid data grid data horizontal align fill message composite set font font final label note label new label message composite swt bold note label set text title note label set font j face resources get banner font note label set layout data new grid data grid data vertical align beginning final i property change listener font listener new i property change listener public void property change property change event event if j face resources banner font equals event get property note label set font j face resources get font j face resources banner font j face resources get font registry add listener font listener note label add dispose listener new dispose listener public void widget disposed dispose event event j face resources get font registry remove listener font listener label message label new label message composite swt wrap message label set text message message label set font font return message composite createnotecomposite messagecomposite gridlayout messagelayout gridlayout messagelayout numcolumns messagelayout marginwidth messagelayout marginheight messagecomposite setlayout messagelayout messagecomposite setlayoutdata griddata griddata horizontal_align_fill messagecomposite setfont notelabel messagecomposite notelabel settext notelabel setfont jfaceresources getbannerfont notelabel setlayoutdata griddata griddata vertical_align_beginning ipropertychangelistener fontlistener ipropertychangelistener propertychange propertychangeevent jfaceresources banner_font getproperty notelabel setfont jfaceresources getfont jfaceresources banner_font jfaceresources getfontregistry addlistener fontlistener notelabel adddisposelistener disposelistener widgetdisposed disposeevent jfaceresources getfontregistry removelistener fontlistener messagelabel messagecomposite messagelabel settext messagelabel setfont messagecomposite final i property change listener font listener new i property change listener public void property change property change event event if j face resources banner font equals event get property note label set font j face resources get font j face resources banner font ipropertychangelistener fontlistener ipropertychangelistener propertychange propertychangeevent jfaceresources banner_font getproperty notelabel setfont jfaceresources getfont jfaceresources banner_font j face resources get font registry add listener font listener note label add dispose listener new dispose listener public void widget disposed dispose event event j face resources get font registry remove listener font listener jfaceresources getfontregistry addlistener fontlistener notelabel adddisposelistener disposelistener widgetdisposed disposeevent jfaceresources getfontregistry removelistener fontlistener returns the apply button return the apply button protected button get apply button return apply button getapplybutton applybutton returns the restore defaults button return the restore defaults button protected button get defaults button return defaults button getdefaultsbutton defaultsbutton see org eclipse jface dialogs i dialog page perform help public void perform help get control notify listeners swt help new event idialogpage performhelp performhelp getcontrol notifylisteners apply the data to the receiver by default do nothing param data since 3 1 public void apply data object data applydata public void set error message string new message super set error message new message if get container null get container update message seterrormessage newmessage seterrormessage newmessage getcontainer getcontainer updatemessage public void set message string new message int new type super set message new message new type if get container null get container update message setmessage newmessage newtype setmessage newmessage newtype getcontainer getcontainer updatemessage creates a new preference page with an empty title and no image protected preference page this non nls 1 preferencepage creates a new preference page with the given title and no image param title the title of this preference page protected preference page string title super title preferencepage creates a new abstract preference page with the given title and image param title the title of this preference page param image the image for this preference page or code null code if none protected preference page string title image descriptor image super title image preferencepage imagedescriptor computes the size for this page s ui control p the default implementation of this code i preference page code method returns the size set by code set size code if no size has been set but the page has a ui control the framework method code do compute size code is called to compute the size p return the size of the preference page encoded as code new point width height code or code 0 0 code if the page doesn t currently have any ui component public point compute size if size null return size control control get control if control null size do compute size return size return new point 0 0 ipreferencepage setsize docomputesize computesize getcontrol docomputesize contributes additional buttons to the given composite p the default implementation of this framework hook method does nothing subclasses should override this method to contribute buttons to this page s button bar for each button a subclass contributes it must also increase the parent s grid layout number of columns by one that is pre grid layout parent get layout num columns pre p param parent the button bar protected void contribute buttons composite parent gridlayout getlayout numcolumns contributebuttons creates and returns the swt control for the customized body of this preference page under the given parent composite p this framework method must be implemented by concrete subclasses any subclass returning a code composite code object whose code layout code has default margins for example a code grid layout code are expected to set the margins of this code layout code to 0 pixels p param parent the parent composite return the new control gridlayout the code preference page code implementation of this code i dialog page code method creates a description label and button bar for the page it calls code create contents code to create the custom contents of the page p if a subclass that overrides this method creates a code composite code that has a layout with default margins for example a code grid layout code it is expected to set the margins of this code layout code to 0 pixels public void create control composite parent grid data gd composite content new composite parent swt none set control content grid layout layout new grid layout layout margin width 0 layout margin height 0 content set layout layout apply the font on creation for backward compatibility apply dialog font content initialize the dialog units initialize dialog units content description label create description label content if description label null description label set layout data new grid data grid data fill horizontal body create contents content if body null null is not a valid return value but support graceful failure body set layout data new grid data grid data fill both composite button bar new composite content swt none layout new grid layout layout num columns 0 layout margin height 0 layout margin width 0 layout make columns equal width false button bar set layout layout gd new grid data grid data horizontal align end button bar set layout data gd contribute buttons button bar if create default and apply button layout num columns layout num columns 2 string labels j face resources get strings new string defaults apply non nls 2 non nls 1 int width hint convert horizontaldl us to pixels i dialog constants button width defaults button new button button bar swt push defaults button set text labels 0 dialog apply dialog font defaults button grid data data new grid data grid data horizontal align fill point min button size defaults button compute size swt default swt default true data width hint math max width hint min button size x defaults button set layout data data defaults button add selection listener new selection adapter public void widget selected selection event e perform defaults apply button new button button bar swt push apply button set text labels 1 dialog apply dialog font apply button data new grid data grid data horizontal align fill min button size apply button compute size swt default swt default true data width hint math max width hint min button size x apply button set layout data data apply button add selection listener new selection adapter public void widget selected selection event e perform apply apply button set enabled is valid apply dialog font button bar else check if there are any other buttons on the button bar if not throw away the button bar composite otherwise there is an unusually large button bar if button bar get children length 1 button bar dispose preferencepage idialogpage createcontents gridlayout createcontrol griddata setcontrol gridlayout gridlayout marginwidth marginheight setlayout applydialogfont initializedialogunits descriptionlabel createdescriptionlabel descriptionlabel descriptionlabel setlayoutdata griddata griddata fill_horizontal createcontents setlayoutdata griddata griddata fill_both buttonbar gridlayout numcolumns marginheight marginwidth makecolumnsequalwidth buttonbar setlayout griddata griddata horizontal_align_end buttonbar setlayoutdata contributebuttons buttonbar createdefaultandapplybutton numcolumns numcolumns jfaceresources getstrings widthhint converthorizontaldlustopixels idialogconstants button_width defaultsbutton buttonbar defaultsbutton settext applydialogfont defaultsbutton griddata griddata griddata horizontal_align_fill minbuttonsize defaultsbutton computesize widthhint widthhint minbuttonsize defaultsbutton setlayoutdata defaultsbutton addselectionlistener selectionadapter widgetselected selectionevent performdefaults applybutton buttonbar applybutton settext applydialogfont applybutton griddata griddata horizontal_align_fill minbuttonsize applybutton computesize widthhint widthhint minbuttonsize applybutton setlayoutdata applybutton addselectionlistener selectionadapter widgetselected selectionevent performapply applybutton setenabled isvalid applydialogfont buttonbar buttonbar getchildren buttonbar apply the dialog font to the composite and it s children if it is set subclasses may override if they wish to set the font themselves param composite protected void apply dialog font composite composite dialog apply dialog font composite applydialogfont applydialogfont creates and returns an swt label under the given composite param parent the parent composite return the new label protected label create description label composite parent label result null string description get description if description null result new label parent swt wrap result set font parent get font result set text description return result createdescriptionlabel getdescription setfont getfont settext computes the size needed by this page s ui control p all pages should override this method and set the appropriate sizes of their widgets and then call code super do compute size code p return the size of the preference page encoded as code new point width height code protected point do compute size if description label null body null point body size body compute size swt default swt default true grid data gd grid data description label get layout data gd width hint body size x return get control compute size swt default swt default true docomputesize docomputesize descriptionlabel bodysize computesize griddata griddata descriptionlabel getlayoutdata widthhint bodysize getcontrol computesize returns the preference store of this preference page p this is a framework hook method for subclasses to return a page specific preference store the default implementation returns code null code p return the preference store or code null code if none protected i preference store do get preference store return null ipreferencestore dogetpreferencestore returns the container of this page return the preference page container or code null code if this page has yet to be added to a container public i preference page container get container return container ipreferencepagecontainer getcontainer returns the preference store of this preference page return the preference store or code null code if none public i preference store get preference store if preference store null preference store do get preference store if preference store null return preference store else if container null return container get preference store return null ipreferencestore getpreferencestore preferencestore preferencestore dogetpreferencestore preferencestore preferencestore getpreferencestore the preference page implementation of an code i preference page code method returns whether this preference page is valid preference pages are considered valid by default call code set valid false code to make a page invalid public boolean is valid return is valid ipreferencepage setvalid isvalid isvalid suppresses creation of the standard default and apply buttons for this page p subclasses wishing a preference page wihthout these buttons should call this framework method before the page s control has been created p protected void no default and apply button create default and apply button false nodefaultandapplybutton createdefaultandapplybutton the code preference page code implementation of this code i preference page code method returns code true code if the page is valid public boolean ok to leave return is valid preferencepage ipreferencepage oktoleave isvalid performs special processing when this page s apply button has been pressed p this is a framework hook method for sublcasses to do special things when the apply button has been pressed the default implementation of this framework method simply calls code perform ok code to simulate the pressing of the page s ok button p see perform ok protected void perform apply perform ok performok performok performapply performok the preference page implementation of an code i preference page code method performs special processing when this page s cancel button has been pressed p this is a framework hook method for sublcasses to do special things when the cancel button has been pressed the default implementation of this framework method does nothing and returns code true code public boolean perform cancel return true ipreferencepage performcancel performs special processing when this page s defaults button has been pressed p this is a framework hook method for subclasses to do special things when the defaults button has been pressed subclasses may override but should call code super perform defaults code p protected void perform defaults update apply button performdefaults performdefaults updateapplybutton method declared on i preference page subclasses should override public boolean perform ok return true ipreferencepage performok non javadoc method declared on i preference page public void set container i preference page container container this container container ipreferencepage setcontainer ipreferencepagecontainer sets the preference store for this preference page p if preference store is set to null get preference store will invoke do get preference store the next time it is called p param store the preference store or code null code see get preference store public void set preference store i preference store store preference store store preferencestore getpreferencestore dogetpreferencestore getpreferencestore setpreferencestore ipreferencestore preferencestore public void set size point ui size control control get control if control null control set size ui size size ui size setsize uisize getcontrol setsize uisize uisize the code preference page code implementation of this code i dialog page code method extends the code dialog page code implementation to update the preference page container title subclasses may extend public void set title string title super set title title if get container null get container update title preferencepage idialogpage dialogpage settitle settitle getcontainer getcontainer updatetitle sets whether this page is valid the enable state of the container buttons and the apply button is updated when a page s valid state changes p param b the new valid state public void set valid boolean b boolean old value is valid is valid b if old value is valid update container state if get container null get container update buttons update page state update apply button setvalid oldvalue isvalid isvalid oldvalue isvalid getcontainer getcontainer updatebuttons updateapplybutton returns a string suitable for debugging purpose only public string to string return get title tostring gettitle updates the enabled state of the apply button to reflect whether this page is valid protected void update apply button if apply button null apply button set enabled is valid updateapplybutton applybutton applybutton setenabled isvalid creates a composite with a highlighted note entry and a message text this is designed to take up the full width of the page param font the font to use param composite the parent composite param title the title of the note param message the message for the note return the composite for the note protected composite create note composite font font composite composite string title string message composite message composite new composite composite swt none grid layout message layout new grid layout message layout num columns 2 message layout margin width 0 message layout margin height 0 message composite set layout message layout message composite set layout data new grid data grid data horizontal align fill message composite set font font final label note label new label message composite swt bold note label set text title note label set font j face resources get banner font note label set layout data new grid data grid data vertical align beginning final i property change listener font listener new i property change listener public void property change property change event event if j face resources banner font equals event get property note label set font j face resources get font j face resources banner font j face resources get font registry add listener font listener note label add dispose listener new dispose listener public void widget disposed dispose event event j face resources get font registry remove listener font listener label message label new label message composite swt wrap message label set text message message label set font font return message composite createnotecomposite messagecomposite gridlayout messagelayout gridlayout messagelayout numcolumns messagelayout marginwidth messagelayout marginheight messagecomposite setlayout messagelayout messagecomposite setlayoutdata griddata griddata horizontal_align_fill messagecomposite setfont notelabel messagecomposite notelabel settext notelabel setfont jfaceresources getbannerfont notelabel setlayoutdata griddata griddata vertical_align_beginning ipropertychangelistener fontlistener ipropertychangelistener propertychange propertychangeevent jfaceresources banner_font getproperty notelabel setfont jfaceresources getfont jfaceresources banner_font jfaceresources getfontregistry addlistener fontlistener notelabel adddisposelistener disposelistener widgetdisposed disposeevent jfaceresources getfontregistry removelistener fontlistener messagelabel messagecomposite messagelabel settext messagelabel setfont messagecomposite returns the apply button return the apply button protected button get apply button return apply button getapplybutton applybutton returns the restore defaults button return the restore defaults button protected button get defaults button return defaults button getdefaultsbutton defaultsbutton see org eclipse jface dialogs i dialog page perform help public void perform help get control notify listeners swt help new event idialogpage performhelp performhelp getcontrol notifylisteners apply the data to the receiver by default do nothing param data since 3 1 public void apply data object data applydata public void set error message string new message super set error message new message if get container null get container update message seterrormessage newmessage seterrormessage newmessage getcontainer getcontainer updatemessage public void set message string new message int new type super set message new message new type if get container null get container update message setmessage newmessage newtype setmessage newmessage newtype getcontainer getcontainer updatemessage creates a new preference page with an empty title and no image protected preference page this non nls 1 preferencepage creates a new preference page with the given title and no image param title the title of this preference page protected preference page string title super title preferencepage creates a new abstract preference page with the given title and image param title the title of this preference page param image the image for this preference page or code null code if none protected preference page string title image descriptor image super title image preferencepage imagedescriptor computes the size for this page s ui control p the default implementation of this code i preference page code method returns the size set by code set size code if no size has been set but the page has a ui control the framework method code do compute size code is called to compute the size p return the size of the preference page encoded as code new point width height code or code 0 0 code if the page doesn t currently have any ui component public point compute size if size null return size control control get control if control null size do compute size return size return new point 0 0 ipreferencepage setsize docomputesize computesize getcontrol docomputesize contributes additional buttons to the given composite p the default implementation of this framework hook method does nothing subclasses should override this method to contribute buttons to this page s button bar for each button a subclass contributes it must also increase the parent s grid layout number of columns by one that is pre grid layout parent get layout num columns pre p param parent the button bar protected void contribute buttons composite parent gridlayout getlayout numcolumns contributebuttons creates and returns the swt control for the customized body of this preference page under the given parent composite p this framework method must be implemented by concrete subclasses any subclass returning a code composite code object whose code layout code has default margins for example a code grid layout code are expected to set the margins of this code layout code to 0 pixels p param parent the parent composite return the new control gridlayout the code preference page code implementation of this code i dialog page code method creates a description label and button bar for the page it calls code create contents code to create the custom contents of the page p if a subclass that overrides this method creates a code composite code that has a layout with default margins for example a code grid layout code it is expected to set the margins of this code layout code to 0 pixels public void create control composite parent grid data gd composite content new composite parent swt none set control content grid layout layout new grid layout layout margin width 0 layout margin height 0 content set layout layout apply the font on creation for backward compatibility apply dialog font content initialize the dialog units initialize dialog units content description label create description label content if description label null description label set layout data new grid data grid data fill horizontal body create contents content if body null null is not a valid return value but support graceful failure body set layout data new grid data grid data fill both composite button bar new composite content swt none layout new grid layout layout num columns 0 layout margin height 0 layout margin width 0 layout make columns equal width false button bar set layout layout gd new grid data grid data horizontal align end button bar set layout data gd contribute buttons button bar if create default and apply button layout num columns layout num columns 2 string labels j face resources get strings new string defaults apply non nls 2 non nls 1 int width hint convert horizontaldl us to pixels i dialog constants button width defaults button new button button bar swt push defaults button set text labels 0 dialog apply dialog font defaults button grid data data new grid data grid data horizontal align fill point min button size defaults button compute size swt default swt default true data width hint math max width hint min button size x defaults button set layout data data defaults button add selection listener new selection adapter public void widget selected selection event e perform defaults apply button new button button bar swt push apply button set text labels 1 dialog apply dialog font apply button data new grid data grid data horizontal align fill min button size apply button compute size swt default swt default true data width hint math max width hint min button size x apply button set layout data data apply button add selection listener new selection adapter public void widget selected selection event e perform apply apply button set enabled is valid apply dialog font button bar else check if there are any other buttons on the button bar if not throw away the button bar composite otherwise there is an unusually large button bar if button bar get children length 1 button bar dispose preferencepage idialogpage createcontents gridlayout createcontrol griddata setcontrol gridlayout gridlayout marginwidth marginheight setlayout applydialogfont initializedialogunits descriptionlabel createdescriptionlabel descriptionlabel descriptionlabel setlayoutdata griddata griddata fill_horizontal createcontents setlayoutdata griddata griddata fill_both buttonbar gridlayout numcolumns marginheight marginwidth makecolumnsequalwidth buttonbar setlayout griddata griddata horizontal_align_end buttonbar setlayoutdata contributebuttons buttonbar createdefaultandapplybutton numcolumns numcolumns jfaceresources getstrings widthhint converthorizontaldlustopixels idialogconstants button_width defaultsbutton buttonbar defaultsbutton settext applydialogfont defaultsbutton griddata griddata griddata horizontal_align_fill minbuttonsize defaultsbutton computesize widthhint widthhint minbuttonsize defaultsbutton setlayoutdata defaultsbutton addselectionlistener selectionadapter widgetselected selectionevent performdefaults applybutton buttonbar applybutton settext applydialogfont applybutton griddata griddata horizontal_align_fill minbuttonsize applybutton computesize widthhint widthhint minbuttonsize applybutton setlayoutdata applybutton addselectionlistener selectionadapter widgetselected selectionevent performapply applybutton setenabled isvalid applydialogfont buttonbar buttonbar getchildren buttonbar apply the dialog font to the composite and it s children if it is set subclasses may override if they wish to set the font themselves param composite protected void apply dialog font composite composite dialog apply dialog font composite applydialogfont applydialogfont creates and returns an swt label under the given composite param parent the parent composite return the new label protected label create description label composite parent label result null string description get description if description null result new label parent swt wrap result set font parent get font result set text description return result createdescriptionlabel getdescription setfont getfont settext computes the size needed by this page s ui control p all pages should override this method and set the appropriate sizes of their widgets and then call code super do compute size code p return the size of the preference page encoded as code new point width height code protected point do compute size if description label null body null point body size body compute size swt default swt default true grid data gd grid data description label get layout data gd width hint body size x return get control compute size swt default swt default true docomputesize docomputesize descriptionlabel bodysize computesize griddata griddata descriptionlabel getlayoutdata widthhint bodysize getcontrol computesize returns the preference store of this preference page p this is a framework hook method for subclasses to return a page specific preference store the default implementation returns code null code p return the preference store or code null code if none protected i preference store do get preference store return null ipreferencestore dogetpreferencestore returns the container of this page return the preference page container or code null code if this page has yet to be added to a container public i preference page container get container return container ipreferencepagecontainer getcontainer returns the preference store of this preference page return the preference store or code null code if none public i preference store get preference store if preference store null preference store do get preference store if preference store null return preference store else if container null return container get preference store return null ipreferencestore getpreferencestore preferencestore preferencestore dogetpreferencestore preferencestore preferencestore getpreferencestore the preference page implementation of an code i preference page code method returns whether this preference page is valid preference pages are considered valid by default call code set valid false code to make a page invalid public boolean is valid return is valid ipreferencepage setvalid isvalid isvalid suppresses creation of the standard default and apply buttons for this page p subclasses wishing a preference page wihthout these buttons should call this framework method before the page s control has been created p protected void no default and apply button create default and apply button false nodefaultandapplybutton createdefaultandapplybutton the code preference page code implementation of this code i preference page code method returns code true code if the page is valid public boolean ok to leave return is valid preferencepage ipreferencepage oktoleave isvalid performs special processing when this page s apply button has been pressed p this is a framework hook method for sublcasses to do special things when the apply button has been pressed the default implementation of this framework method simply calls code perform ok code to simulate the pressing of the page s ok button p see perform ok protected void perform apply perform ok performok performok performapply performok the preference page implementation of an code i preference page code method performs special processing when this page s cancel button has been pressed p this is a framework hook method for sublcasses to do special things when the cancel button has been pressed the default implementation of this framework method does nothing and returns code true code public boolean perform cancel return true ipreferencepage performcancel performs special processing when this page s defaults button has been pressed p this is a framework hook method for subclasses to do special things when the defaults button has been pressed subclasses may override but should call code super perform defaults code p protected void perform defaults update apply button performdefaults performdefaults updateapplybutton method declared on i preference page subclasses should override public boolean perform ok return true ipreferencepage performok non javadoc method declared on i preference page public void set container i preference page container container this container container ipreferencepage setcontainer ipreferencepagecontainer sets the preference store for this preference page p if preference store is set to null get preference store will invoke do get preference store the next time it is called p param store the preference store or code null code see get preference store public void set preference store i preference store store preference store store preferencestore getpreferencestore dogetpreferencestore getpreferencestore setpreferencestore ipreferencestore preferencestore public void set size point ui size control control get control if control null control set size ui size size ui size setsize uisize getcontrol setsize uisize uisize the code preference page code implementation of this code i dialog page code method extends the code dialog page code implementation to update the preference page container title subclasses may extend public void set title string title super set title title if get container null get container update title preferencepage idialogpage dialogpage settitle settitle getcontainer getcontainer updatetitle sets whether this page is valid the enable state of the container buttons and the apply button is updated when a page s valid state changes p param b the new valid state public void set valid boolean b boolean old value is valid is valid b if old value is valid update container state if get container null get container update buttons update page state update apply button setvalid oldvalue isvalid isvalid oldvalue isvalid getcontainer getcontainer updatebuttons updateapplybutton returns a string suitable for debugging purpose only public string to string return get title tostring gettitle updates the enabled state of the apply button to reflect whether this page is valid protected void update apply button if apply button null apply button set enabled is valid updateapplybutton applybutton applybutton setenabled isvalid creates a composite with a highlighted note entry and a message text this is designed to take up the full width of the page param font the font to use param composite the parent composite param title the title of the note param message the message for the note return the composite for the note protected composite create note composite font font composite composite string title string message composite message composite new composite composite swt none grid layout message layout new grid layout message layout num columns 2 message layout margin width 0 message layout margin height 0 message composite set layout message layout message composite set layout data new grid data grid data horizontal align fill message composite set font font final label note label new label message composite swt bold note label set text title note label set font j face resources get banner font note label set layout data new grid data grid data vertical align beginning final i property change listener font listener new i property change listener public void property change property change event event if j face resources banner font equals event get property note label set font j face resources get font j face resources banner font j face resources get font registry add listener font listener note label add dispose listener new dispose listener public void widget disposed dispose event event j face resources get font registry remove listener font listener label message label new label message composite swt wrap message label set text message message label set font font return message composite createnotecomposite messagecomposite gridlayout messagelayout gridlayout messagelayout numcolumns messagelayout marginwidth messagelayout marginheight messagecomposite setlayout messagelayout messagecomposite setlayoutdata griddata griddata horizontal_align_fill messagecomposite setfont notelabel messagecomposite notelabel settext notelabel setfont jfaceresources getbannerfont notelabel setlayoutdata griddata griddata vertical_align_beginning ipropertychangelistener fontlistener ipropertychangelistener propertychange propertychangeevent jfaceresources banner_font getproperty notelabel setfont jfaceresources getfont jfaceresources banner_font jfaceresources getfontregistry addlistener fontlistener notelabel adddisposelistener disposelistener widgetdisposed disposeevent jfaceresources getfontregistry removelistener fontlistener messagelabel messagecomposite messagelabel settext messagelabel setfont messagecomposite returns the apply button return the apply button protected button get apply button return apply button getapplybutton applybutton returns the restore defaults button return the restore defaults button protected button get defaults button return defaults button getdefaultsbutton defaultsbutton see org eclipse jface dialogs i dialog page perform help public void perform help get control notify listeners swt help new event idialogpage performhelp performhelp getcontrol notifylisteners apply the data to the receiver by default do nothing param data since 3 1 public void apply data object data applydata public void set error message string new message super set error message new message if get container null get container update message seterrormessage newmessage seterrormessage newmessage getcontainer getcontainer updatemessage public void set message string new message int new type super set message new message new type if get container null get container update message setmessage newmessage newtype setmessage newmessage newtype getcontainer getcontainer updatemessage creates a new preference page with an empty title and no image protected preference page this non nls 1 preferencepage creates a new preference page with the given title and no image param title the title of this preference page protected preference page string title super title preferencepage creates a new abstract preference page with the given title and image param title the title of this preference page param image the image for this preference page or code null code if none protected preference page string title image descriptor image super title image preferencepage imagedescriptor computes the size for this page s ui control p the default implementation of this code i preference page code method returns the size set by code set size code if no size has been set but the page has a ui control the framework method code do compute size code is called to compute the size p return the size of the preference page encoded as code new point width height code or code 0 0 code if the page doesn t currently have any ui component public point compute size if size null return size control control get control if control null size do compute size return size return new point 0 0 ipreferencepage setsize docomputesize computesize getcontrol docomputesize contributes additional buttons to the given composite p the default implementation of this framework hook method does nothing subclasses should override this method to contribute buttons to this page s button bar for each button a subclass contributes it must also increase the parent s grid layout number of columns by one that is pre grid layout parent get layout num columns pre p param parent the button bar protected void contribute buttons composite parent gridlayout getlayout numcolumns contributebuttons creates and returns the swt control for the customized body of this preference page under the given parent composite p this framework method must be implemented by concrete subclasses any subclass returning a code composite code object whose code layout code has default margins for example a code grid layout code are expected to set the margins of this code layout code to 0 pixels p param parent the parent composite return the new control gridlayout the code preference page code implementation of this code i dialog page code method creates a description label and button bar for the page it calls code create contents code to create the custom contents of the page p if a subclass that overrides this method creates a code composite code that has a layout with default margins for example a code grid layout code it is expected to set the margins of this code layout code to 0 pixels public void create control composite parent grid data gd composite content new composite parent swt none set control content grid layout layout new grid layout layout margin width 0 layout margin height 0 content set layout layout apply the font on creation for backward compatibility apply dialog font content initialize the dialog units initialize dialog units content description label create description label content if description label null description label set layout data new grid data grid data fill horizontal body create contents content if body null null is not a valid return value but support graceful failure body set layout data new grid data grid data fill both composite button bar new composite content swt none layout new grid layout layout num columns 0 layout margin height 0 layout margin width 0 layout make columns equal width false button bar set layout layout gd new grid data grid data horizontal align end button bar set layout data gd contribute buttons button bar if create default and apply button layout num columns layout num columns 2 string labels j face resources get strings new string defaults apply non nls 2 non nls 1 int width hint convert horizontaldl us to pixels i dialog constants button width defaults button new button button bar swt push defaults button set text labels 0 dialog apply dialog font defaults button grid data data new grid data grid data horizontal align fill point min button size defaults button compute size swt default swt default true data width hint math max width hint min button size x defaults button set layout data data defaults button add selection listener new selection adapter public void widget selected selection event e perform defaults apply button new button button bar swt push apply button set text labels 1 dialog apply dialog font apply button data new grid data grid data horizontal align fill min button size apply button compute size swt default swt default true data width hint math max width hint min button size x apply button set layout data data apply button add selection listener new selection adapter public void widget selected selection event e perform apply apply button set enabled is valid apply dialog font button bar else check if there are any other buttons on the button bar if not throw away the button bar composite otherwise there is an unusually large button bar if button bar get children length 1 button bar dispose preferencepage idialogpage createcontents gridlayout createcontrol griddata setcontrol gridlayout gridlayout marginwidth marginheight setlayout applydialogfont initializedialogunits descriptionlabel createdescriptionlabel descriptionlabel descriptionlabel setlayoutdata griddata griddata fill_horizontal createcontents setlayoutdata griddata griddata fill_both buttonbar gridlayout numcolumns marginheight marginwidth makecolumnsequalwidth buttonbar setlayout griddata griddata horizontal_align_end buttonbar setlayoutdata contributebuttons buttonbar createdefaultandapplybutton numcolumns numcolumns jfaceresources getstrings widthhint converthorizontaldlustopixels idialogconstants button_width defaultsbutton buttonbar defaultsbutton settext applydialogfont defaultsbutton griddata griddata griddata horizontal_align_fill minbuttonsize defaultsbutton computesize widthhint widthhint minbuttonsize defaultsbutton setlayoutdata defaultsbutton addselectionlistener selectionadapter widgetselected selectionevent performdefaults applybutton buttonbar applybutton settext applydialogfont applybutton griddata griddata horizontal_align_fill minbuttonsize applybutton computesize widthhint widthhint minbuttonsize applybutton setlayoutdata applybutton addselectionlistener selectionadapter widgetselected selectionevent performapply applybutton setenabled isvalid applydialogfont buttonbar buttonbar getchildren buttonbar defaults button set layout data data defaults button add selection listener new selection adapter public void widget selected selection event e perform defaults defaultsbutton setlayoutdata defaultsbutton addselectionlistener selectionadapter widgetselected selectionevent performdefaults apply button set layout data data apply button add selection listener new selection adapter public void widget selected selection event e perform apply applybutton setlayoutdata applybutton addselectionlistener selectionadapter widgetselected selectionevent performapply apply the dialog font to the composite and it s children if it is set subclasses may override if they wish to set the font themselves param composite protected void apply dialog font composite composite dialog apply dialog font composite applydialogfont applydialogfont creates and returns an swt label under the given composite param parent the parent composite return the new label protected label create description label composite parent label result null string description get description if description null result new label parent swt wrap result set font parent get font result set text description return result createdescriptionlabel getdescription setfont getfont settext computes the size needed by this page s ui control p all pages should override this method and set the appropriate sizes of their widgets and then call code super do compute size code p return the size of the preference page encoded as code new point width height code protected point do compute size if description label null body null point body size body compute size swt default swt default true grid data gd grid data description label get layout data gd width hint body size x return get control compute size swt default swt default true docomputesize docomputesize descriptionlabel bodysize computesize griddata griddata descriptionlabel getlayoutdata widthhint bodysize getcontrol computesize returns the preference store of this preference page p this is a framework hook method for subclasses to return a page specific preference store the default implementation returns code null code p return the preference store or code null code if none protected i preference store do get preference store return null ipreferencestore dogetpreferencestore returns the container of this page return the preference page container or code null code if this page has yet to be added to a container public i preference page container get container return container ipreferencepagecontainer getcontainer returns the preference store of this preference page return the preference store or code null code if none public i preference store get preference store if preference store null preference store do get preference store if preference store null return preference store else if container null return container get preference store return null ipreferencestore getpreferencestore preferencestore preferencestore dogetpreferencestore preferencestore preferencestore getpreferencestore the preference page implementation of an code i preference page code method returns whether this preference page is valid preference pages are considered valid by default call code set valid false code to make a page invalid public boolean is valid return is valid ipreferencepage setvalid isvalid isvalid suppresses creation of the standard default and apply buttons for this page p subclasses wishing a preference page wihthout these buttons should call this framework method before the page s control has been created p protected void no default and apply button create default and apply button false nodefaultandapplybutton createdefaultandapplybutton the code preference page code implementation of this code i preference page code method returns code true code if the page is valid public boolean ok to leave return is valid preferencepage ipreferencepage oktoleave isvalid performs special processing when this page s apply button has been pressed p this is a framework hook method for sublcasses to do special things when the apply button has been pressed the default implementation of this framework method simply calls code perform ok code to simulate the pressing of the page s ok button p see perform ok protected void perform apply perform ok performok performok performapply performok the preference page implementation of an code i preference page code method performs special processing when this page s cancel button has been pressed p this is a framework hook method for sublcasses to do special things when the cancel button has been pressed the default implementation of this framework method does nothing and returns code true code public boolean perform cancel return true ipreferencepage performcancel performs special processing when this page s defaults button has been pressed p this is a framework hook method for subclasses to do special things when the defaults button has been pressed subclasses may override but should call code super perform defaults code p protected void perform defaults update apply button performdefaults performdefaults updateapplybutton method declared on i preference page subclasses should override public boolean perform ok return true ipreferencepage performok non javadoc method declared on i preference page public void set container i preference page container container this container container ipreferencepage setcontainer ipreferencepagecontainer sets the preference store for this preference page p if preference store is set to null get preference store will invoke do get preference store the next time it is called p param store the preference store or code null code see get preference store public void set preference store i preference store store preference store store preferencestore getpreferencestore dogetpreferencestore getpreferencestore setpreferencestore ipreferencestore preferencestore public void set size point ui size control control get control if control null control set size ui size size ui size setsize uisize getcontrol setsize uisize uisize the code preference page code implementation of this code i dialog page code method extends the code dialog page code implementation to update the preference page container title subclasses may extend public void set title string title super set title title if get container null get container update title preferencepage idialogpage dialogpage settitle settitle getcontainer getcontainer updatetitle sets whether this page is valid the enable state of the container buttons and the apply button is updated when a page s valid state changes p param b the new valid state public void set valid boolean b boolean old value is valid is valid b if old value is valid update container state if get container null get container update buttons update page state update apply button setvalid oldvalue isvalid isvalid oldvalue isvalid getcontainer getcontainer updatebuttons updateapplybutton returns a string suitable for debugging purpose only public string to string return get title tostring gettitle updates the enabled state of the apply button to reflect whether this page is valid protected void update apply button if apply button null apply button set enabled is valid updateapplybutton applybutton applybutton setenabled isvalid creates a composite with a highlighted note entry and a message text this is designed to take up the full width of the page param font the font to use param composite the parent composite param title the title of the note param message the message for the note return the composite for the note protected composite create note composite font font composite composite string title string message composite message composite new composite composite swt none grid layout message layout new grid layout message layout num columns 2 message layout margin width 0 message layout margin height 0 message composite set layout message layout message composite set layout data new grid data grid data horizontal align fill message composite set font font final label note label new label message composite swt bold note label set text title note label set font j face resources get banner font note label set layout data new grid data grid data vertical align beginning final i property change listener font listener new i property change listener public void property change property change event event if j face resources banner font equals event get property note label set font j face resources get font j face resources banner font j face resources get font registry add listener font listener note label add dispose listener new dispose listener public void widget disposed dispose event event j face resources get font registry remove listener font listener label message label new label message composite swt wrap message label set text message message label set font font return message composite createnotecomposite messagecomposite gridlayout messagelayout gridlayout messagelayout numcolumns messagelayout marginwidth messagelayout marginheight messagecomposite setlayout messagelayout messagecomposite setlayoutdata griddata griddata horizontal_align_fill messagecomposite setfont notelabel messagecomposite notelabel settext notelabel setfont jfaceresources getbannerfont notelabel setlayoutdata griddata griddata vertical_align_beginning ipropertychangelistener fontlistener ipropertychangelistener propertychange propertychangeevent jfaceresources banner_font getproperty notelabel setfont jfaceresources getfont jfaceresources banner_font jfaceresources getfontregistry addlistener fontlistener notelabel adddisposelistener disposelistener widgetdisposed disposeevent jfaceresources getfontregistry removelistener fontlistener messagelabel messagecomposite messagelabel settext messagelabel setfont messagecomposite final i property change listener font listener new i property change listener public void property change property change event event if j face resources banner font equals event get property note label set font j face resources get font j face resources banner font ipropertychangelistener fontlistener ipropertychangelistener propertychange propertychangeevent jfaceresources banner_font getproperty notelabel setfont jfaceresources getfont jfaceresources banner_font j face resources get font registry add listener font listener note label add dispose listener new dispose listener public void widget disposed dispose event event j face resources get font registry remove listener font listener jfaceresources getfontregistry addlistener fontlistener notelabel adddisposelistener disposelistener widgetdisposed disposeevent jfaceresources getfontregistry removelistener fontlistener returns the apply button return the apply button protected button get apply button return apply button getapplybutton applybutton returns the restore defaults button return the restore defaults button protected button get defaults button return defaults button getdefaultsbutton defaultsbutton see org eclipse jface dialogs i dialog page perform help public void perform help get control notify listeners swt help new event idialogpage performhelp performhelp getcontrol notifylisteners apply the data to the receiver by default do nothing param data since 3 1 public void apply data object data applydata public void set error message string new message super set error message new message if get container null get container update message seterrormessage newmessage seterrormessage newmessage getcontainer getcontainer updatemessage public void set message string new message int new type super set message new message new type if get container null get container update message setmessage newmessage newtype setmessage newmessage newtype getcontainer getcontainer updatemessage creates a new preference page with an empty title and no image protected preference page this non nls 1 preferencepage creates a new preference page with the given title and no image param title the title of this preference page protected preference page string title super title preferencepage creates a new abstract preference page with the given title and image param title the title of this preference page param image the image for this preference page or code null code if none protected preference page string title image descriptor image super title image preferencepage imagedescriptor computes the size for this page s ui control p the default implementation of this code i preference page code method returns the size set by code set size code if no size has been set but the page has a ui control the framework method code do compute size code is called to compute the size p return the size of the preference page encoded as code new point width height code or code 0 0 code if the page doesn t currently have any ui component public point compute size if size null return size control control get control if control null size do compute size return size return new point 0 0 ipreferencepage setsize docomputesize computesize getcontrol docomputesize contributes additional buttons to the given composite p the default implementation of this framework hook method does nothing subclasses should override this method to contribute buttons to this page s button bar for each button a subclass contributes it must also increase the parent s grid layout number of columns by one that is pre grid layout parent get layout num columns pre p param parent the button bar protected void contribute buttons composite parent gridlayout getlayout numcolumns contributebuttons creates and returns the swt control for the customized body of this preference page under the given parent composite p this framework method must be implemented by concrete subclasses any subclass returning a code composite code object whose code layout code has default margins for example a code grid layout code are expected to set the margins of this code layout code to 0 pixels p param parent the parent composite return the new control gridlayout the code preference page code implementation of this code i dialog page code method creates a description label and button bar for the page it calls code create contents code to create the custom contents of the page p if a subclass that overrides this method creates a code composite code that has a layout with default margins for example a code grid layout code it is expected to set the margins of this code layout code to 0 pixels public void create control composite parent grid data gd composite content new composite parent swt none set control content grid layout layout new grid layout layout margin width 0 layout margin height 0 content set layout layout apply the font on creation for backward compatibility apply dialog font content initialize the dialog units initialize dialog units content description label create description label content if description label null description label set layout data new grid data grid data fill horizontal body create contents content if body null null is not a valid return value but support graceful failure body set layout data new grid data grid data fill both composite button bar new composite content swt none layout new grid layout layout num columns 0 layout margin height 0 layout margin width 0 layout make columns equal width false button bar set layout layout gd new grid data grid data horizontal align end button bar set layout data gd contribute buttons button bar if create default and apply button layout num columns layout num columns 2 string labels j face resources get strings new string defaults apply non nls 2 non nls 1 int width hint convert horizontaldl us to pixels i dialog constants button width defaults button new button button bar swt push defaults button set text labels 0 dialog apply dialog font defaults button grid data data new grid data grid data horizontal align fill point min button size defaults button compute size swt default swt default true data width hint math max width hint min button size x defaults button set layout data data defaults button add selection listener new selection adapter public void widget selected selection event e perform defaults apply button new button button bar swt push apply button set text labels 1 dialog apply dialog font apply button data new grid data grid data horizontal align fill min button size apply button compute size swt default swt default true data width hint math max width hint min button size x apply button set layout data data apply button add selection listener new selection adapter public void widget selected selection event e perform apply apply button set enabled is valid apply dialog font button bar else check if there are any other buttons on the button bar if not throw away the button bar composite otherwise there is an unusually large button bar if button bar get children length 1 button bar dispose preferencepage idialogpage createcontents gridlayout createcontrol griddata setcontrol gridlayout gridlayout marginwidth marginheight setlayout applydialogfont initializedialogunits descriptionlabel createdescriptionlabel descriptionlabel descriptionlabel setlayoutdata griddata griddata fill_horizontal createcontents setlayoutdata griddata griddata fill_both buttonbar gridlayout numcolumns marginheight marginwidth makecolumnsequalwidth buttonbar setlayout griddata griddata horizontal_align_end buttonbar setlayoutdata contributebuttons buttonbar createdefaultandapplybutton numcolumns numcolumns jfaceresources getstrings widthhint converthorizontaldlustopixels idialogconstants button_width defaultsbutton buttonbar defaultsbutton settext applydialogfont defaultsbutton griddata griddata griddata horizontal_align_fill minbuttonsize defaultsbutton computesize widthhint widthhint minbuttonsize defaultsbutton setlayoutdata defaultsbutton addselectionlistener selectionadapter widgetselected selectionevent performdefaults applybutton buttonbar applybutton settext applydialogfont applybutton griddata griddata horizontal_align_fill minbuttonsize applybutton computesize widthhint widthhint minbuttonsize applybutton setlayoutdata applybutton addselectionlistener selectionadapter widgetselected selectionevent performapply applybutton setenabled isvalid applydialogfont buttonbar buttonbar getchildren buttonbar apply the dialog font to the composite and it s children if it is set subclasses may override if they wish to set the font themselves param composite protected void apply dialog font composite composite dialog apply dialog font composite applydialogfont applydialogfont creates and returns an swt label under the given composite param parent the parent composite return the new label protected label create description label composite parent label result null string description get description if description null result new label parent swt wrap result set font parent get font result set text description return result createdescriptionlabel getdescription setfont getfont settext computes the size needed by this page s ui control p all pages should override this method and set the appropriate sizes of their widgets and then call code super do compute size code p return the size of the preference page encoded as code new point width height code protected point do compute size if description label null body null point body size body compute size swt default swt default true grid data gd grid data description label get layout data gd width hint body size x return get control compute size swt default swt default true docomputesize docomputesize descriptionlabel bodysize computesize griddata griddata descriptionlabel getlayoutdata widthhint bodysize getcontrol computesize returns the preference store of this preference page p this is a framework hook method for subclasses to return a page specific preference store the default implementation returns code null code p return the preference store or code null code if none protected i preference store do get preference store return null ipreferencestore dogetpreferencestore returns the container of this page return the preference page container or code null code if this page has yet to be added to a container public i preference page container get container return container ipreferencepagecontainer getcontainer returns the preference store of this preference page return the preference store or code null code if none public i preference store get preference store if preference store null preference store do get preference store if preference store null return preference store else if container null return container get preference store return null ipreferencestore getpreferencestore preferencestore preferencestore dogetpreferencestore preferencestore preferencestore getpreferencestore the preference page implementation of an code i preference page code method returns whether this preference page is valid preference pages are considered valid by default call code set valid false code to make a page invalid public boolean is valid return is valid ipreferencepage setvalid isvalid isvalid suppresses creation of the standard default and apply buttons for this page p subclasses wishing a preference page wihthout these buttons should call this framework method before the page s control has been created p protected void no default and apply button create default and apply button false nodefaultandapplybutton createdefaultandapplybutton the code preference page code implementation of this code i preference page code method returns code true code if the page is valid public boolean ok to leave return is valid preferencepage ipreferencepage oktoleave isvalid performs special processing when this page s apply button has been pressed p this is a framework hook method for sublcasses to do special things when the apply button has been pressed the default implementation of this framework method simply calls code perform ok code to simulate the pressing of the page s ok button p see perform ok protected void perform apply perform ok performok performok performapply performok the preference page implementation of an code i preference page code method performs special processing when this page s cancel button has been pressed p this is a framework hook method for sublcasses to do special things when the cancel button has been pressed the default implementation of this framework method does nothing and returns code true code public boolean perform cancel return true ipreferencepage performcancel performs special processing when this page s defaults button has been pressed p this is a framework hook method for subclasses to do special things when the defaults button has been pressed subclasses may override but should call code super perform defaults code p protected void perform defaults update apply button performdefaults performdefaults updateapplybutton method declared on i preference page subclasses should override public boolean perform ok return true ipreferencepage performok non javadoc method declared on i preference page public void set container i preference page container container this container container ipreferencepage setcontainer ipreferencepagecontainer sets the preference store for this preference page p if preference store is set to null get preference store will invoke do get preference store the next time it is called p param store the preference store or code null code see get preference store public void set preference store i preference store store preference store store preferencestore getpreferencestore dogetpreferencestore getpreferencestore setpreferencestore ipreferencestore preferencestore public void set size point ui size control control get control if control null control set size ui size size ui size setsize uisize getcontrol setsize uisize uisize the code preference page code implementation of this code i dialog page code method extends the code dialog page code implementation to update the preference page container title subclasses may extend public void set title string title super set title title if get container null get container update title preferencepage idialogpage dialogpage settitle settitle getcontainer getcontainer updatetitle sets whether this page is valid the enable state of the container buttons and the apply button is updated when a page s valid state changes p param b the new valid state public void set valid boolean b boolean old value is valid is valid b if old value is valid update container state if get container null get container update buttons update page state update apply button setvalid oldvalue isvalid isvalid oldvalue isvalid getcontainer getcontainer updatebuttons updateapplybutton returns a string suitable for debugging purpose only public string to string return get title tostring gettitle updates the enabled state of the apply button to reflect whether this page is valid protected void update apply button if apply button null apply button set enabled is valid updateapplybutton applybutton applybutton setenabled isvalid creates a composite with a highlighted note entry and a message text this is designed to take up the full width of the page param font the font to use param composite the parent composite param title the title of the note param message the message for the note return the composite for the note protected composite create note composite font font composite composite string title string message composite message composite new composite composite swt none grid layout message layout new grid layout message layout num columns 2 message layout margin width 0 message layout margin height 0 message composite set layout message layout message composite set layout data new grid data grid data horizontal align fill message composite set font font final label note label new label message composite swt bold note label set text title note label set font j face resources get banner font note label set layout data new grid data grid data vertical align beginning final i property change listener font listener new i property change listener public void property change property change event event if j face resources banner font equals event get property note label set font j face resources get font j face resources banner font j face resources get font registry add listener font listener note label add dispose listener new dispose listener public void widget disposed dispose event event j face resources get font registry remove listener font listener label message label new label message composite swt wrap message label set text message message label set font font return message composite createnotecomposite messagecomposite gridlayout messagelayout gridlayout messagelayout numcolumns messagelayout marginwidth messagelayout marginheight messagecomposite setlayout messagelayout messagecomposite setlayoutdata griddata griddata horizontal_align_fill messagecomposite setfont notelabel messagecomposite notelabel settext notelabel setfont jfaceresources getbannerfont notelabel setlayoutdata griddata griddata vertical_align_beginning ipropertychangelistener fontlistener ipropertychangelistener propertychange propertychangeevent jfaceresources banner_font getproperty notelabel setfont jfaceresources getfont jfaceresources banner_font jfaceresources getfontregistry addlistener fontlistener notelabel adddisposelistener disposelistener widgetdisposed disposeevent jfaceresources getfontregistry removelistener fontlistener messagelabel messagecomposite messagelabel settext messagelabel setfont messagecomposite returns the apply button return the apply button protected button get apply button return apply button getapplybutton applybutton returns the restore defaults button return the restore defaults button protected button get defaults button return defaults button getdefaultsbutton defaultsbutton see org eclipse jface dialogs i dialog page perform help public void perform help get control notify listeners swt help new event idialogpage performhelp performhelp getcontrol notifylisteners apply the data to the receiver by default do nothing param data since 3 1 public void apply data object data applydata public void set error message string new message super set error message new message if get container null get container update message seterrormessage newmessage seterrormessage newmessage getcontainer getcontainer updatemessage public void set message string new message int new type super set message new message new type if get container null get container update message setmessage newmessage newtype setmessage newmessage newtype getcontainer getcontainer updatemessage creates a new preference page with an empty title and no image protected preference page this non nls 1 preferencepage creates a new preference page with the given title and no image param title the title of this preference page protected preference page string title super title preferencepage creates a new abstract preference page with the given title and image param title the title of this preference page param image the image for this preference page or code null code if none protected preference page string title image descriptor image super title image preferencepage imagedescriptor computes the size for this page s ui control p the default implementation of this code i preference page code method returns the size set by code set size code if no size has been set but the page has a ui control the framework method code do compute size code is called to compute the size p return the size of the preference page encoded as code new point width height code or code 0 0 code if the page doesn t currently have any ui component public point compute size if size null return size control control get control if control null size do compute size return size return new point 0 0 ipreferencepage setsize docomputesize computesize getcontrol docomputesize contributes additional buttons to the given composite p the default implementation of this framework hook method does nothing subclasses should override this method to contribute buttons to this page s button bar for each button a subclass contributes it must also increase the parent s grid layout number of columns by one that is pre grid layout parent get layout num columns pre p param parent the button bar protected void contribute buttons composite parent gridlayout getlayout numcolumns contributebuttons creates and returns the swt control for the customized body of this preference page under the given parent composite p this framework method must be implemented by concrete subclasses any subclass returning a code composite code object whose code layout code has default margins for example a code grid layout code are expected to set the margins of this code layout code to 0 pixels p param parent the parent composite return the new control gridlayout the code preference page code implementation of this code i dialog page code method creates a description label and button bar for the page it calls code create contents code to create the custom contents of the page p if a subclass that overrides this method creates a code composite code that has a layout with default margins for example a code grid layout code it is expected to set the margins of this code layout code to 0 pixels public void create control composite parent grid data gd composite content new composite parent swt none set control content grid layout layout new grid layout layout margin width 0 layout margin height 0 content set layout layout apply the font on creation for backward compatibility apply dialog font content initialize the dialog units initialize dialog units content description label create description label content if description label null description label set layout data new grid data grid data fill horizontal body create contents content if body null null is not a valid return value but support graceful failure body set layout data new grid data grid data fill both composite button bar new composite content swt none layout new grid layout layout num columns 0 layout margin height 0 layout margin width 0 layout make columns equal width false button bar set layout layout gd new grid data grid data horizontal align end button bar set layout data gd contribute buttons button bar if create default and apply button layout num columns layout num columns 2 string labels j face resources get strings new string defaults apply non nls 2 non nls 1 int width hint convert horizontaldl us to pixels i dialog constants button width defaults button new button button bar swt push defaults button set text labels 0 dialog apply dialog font defaults button grid data data new grid data grid data horizontal align fill point min button size defaults button compute size swt default swt default true data width hint math max width hint min button size x defaults button set layout data data defaults button add selection listener new selection adapter public void widget selected selection event e perform defaults apply button new button button bar swt push apply button set text labels 1 dialog apply dialog font apply button data new grid data grid data horizontal align fill min button size apply button compute size swt default swt default true data width hint math max width hint min button size x apply button set layout data data apply button add selection listener new selection adapter public void widget selected selection event e perform apply apply button set enabled is valid apply dialog font button bar else check if there are any other buttons on the button bar if not throw away the button bar composite otherwise there is an unusually large button bar if button bar get children length 1 button bar dispose preferencepage idialogpage createcontents gridlayout createcontrol griddata setcontrol gridlayout gridlayout marginwidth marginheight setlayout applydialogfont initializedialogunits descriptionlabel createdescriptionlabel descriptionlabel descriptionlabel setlayoutdata griddata griddata fill_horizontal createcontents setlayoutdata griddata griddata fill_both buttonbar gridlayout numcolumns marginheight marginwidth makecolumnsequalwidth buttonbar setlayout griddata griddata horizontal_align_end buttonbar setlayoutdata contributebuttons buttonbar createdefaultandapplybutton numcolumns numcolumns jfaceresources getstrings widthhint converthorizontaldlustopixels idialogconstants button_width defaultsbutton buttonbar defaultsbutton settext applydialogfont defaultsbutton griddata griddata griddata horizontal_align_fill minbuttonsize defaultsbutton computesize widthhint widthhint minbuttonsize defaultsbutton setlayoutdata defaultsbutton addselectionlistener selectionadapter widgetselected selectionevent performdefaults applybutton buttonbar applybutton settext applydialogfont applybutton griddata griddata horizontal_align_fill minbuttonsize applybutton computesize widthhint widthhint minbuttonsize applybutton setlayoutdata applybutton addselectionlistener selectionadapter widgetselected selectionevent performapply applybutton setenabled isvalid applydialogfont buttonbar buttonbar getchildren buttonbar defaults button set layout data data defaults button add selection listener new selection adapter public void widget selected selection event e perform defaults defaultsbutton setlayoutdata defaultsbutton addselectionlistener selectionadapter widgetselected selectionevent performdefaults apply button set layout data data apply button add selection listener new selection adapter public void widget selected selection event e perform apply applybutton setlayoutdata applybutton addselectionlistener selectionadapter widgetselected selectionevent performapply apply the dialog font to the composite and it s children if it is set subclasses may override if they wish to set the font themselves param composite protected void apply dialog font composite composite dialog apply dialog font composite applydialogfont applydialogfont creates and returns an swt label under the given composite param parent the parent composite return the new label protected label create description label composite parent label result null string description get description if description null result new label parent swt wrap result set font parent get font result set text description return result createdescriptionlabel getdescription setfont getfont settext computes the size needed by this page s ui control p all pages should override this method and set the appropriate sizes of their widgets and then call code super do compute size code p return the size of the preference page encoded as code new point width height code protected point do compute size if description label null body null point body size body compute size swt default swt default true grid data gd grid data description label get layout data gd width hint body size x return get control compute size swt default swt default true docomputesize docomputesize descriptionlabel bodysize computesize griddata griddata descriptionlabel getlayoutdata widthhint bodysize getcontrol computesize returns the preference store of this preference page p this is a framework hook method for subclasses to return a page specific preference store the default implementation returns code null code p return the preference store or code null code if none protected i preference store do get preference store return null ipreferencestore dogetpreferencestore returns the container of this page return the preference page container or code null code if this page has yet to be added to a container public i preference page container get container return container ipreferencepagecontainer getcontainer returns the preference store of this preference page return the preference store or code null code if none public i preference store get preference store if preference store null preference store do get preference store if preference store null return preference store else if container null return container get preference store return null ipreferencestore getpreferencestore preferencestore preferencestore dogetpreferencestore preferencestore preferencestore getpreferencestore the preference page implementation of an code i preference page code method returns whether this preference page is valid preference pages are considered valid by default call code set valid false code to make a page invalid public boolean is valid return is valid ipreferencepage setvalid isvalid isvalid suppresses creation of the standard default and apply buttons for this page p subclasses wishing a preference page wihthout these buttons should call this framework method before the page s control has been created p protected void no default and apply button create default and apply button false nodefaultandapplybutton createdefaultandapplybutton the code preference page code implementation of this code i preference page code method returns code true code if the page is valid public boolean ok to leave return is valid preferencepage ipreferencepage oktoleave isvalid performs special processing when this page s apply button has been pressed p this is a framework hook method for sublcasses to do special things when the apply button has been pressed the default implementation of this framework method simply calls code perform ok code to simulate the pressing of the page s ok button p see perform ok protected void perform apply perform ok performok performok performapply performok the preference page implementation of an code i preference page code method performs special processing when this page s cancel button has been pressed p this is a framework hook method for sublcasses to do special things when the cancel button has been pressed the default implementation of this framework method does nothing and returns code true code public boolean perform cancel return true ipreferencepage performcancel performs special processing when this page s defaults button has been pressed p this is a framework hook method for subclasses to do special things when the defaults button has been pressed subclasses may override but should call code super perform defaults code p protected void perform defaults update apply button performdefaults performdefaults updateapplybutton method declared on i preference page subclasses should override public boolean perform ok return true ipreferencepage performok non javadoc method declared on i preference page public void set container i preference page container container this container container ipreferencepage setcontainer ipreferencepagecontainer sets the preference store for this preference page p if preference store is set to null get preference store will invoke do get preference store the next time it is called p param store the preference store or code null code see get preference store public void set preference store i preference store store preference store store preferencestore getpreferencestore dogetpreferencestore getpreferencestore setpreferencestore ipreferencestore preferencestore public void set size point ui size control control get control if control null control set size ui size size ui size setsize uisize getcontrol setsize uisize uisize the code preference page code implementation of this code i dialog page code method extends the code dialog page code implementation to update the preference page container title subclasses may extend public void set title string title super set title title if get container null get container update title preferencepage idialogpage dialogpage settitle settitle getcontainer getcontainer updatetitle sets whether this page is valid the enable state of the container buttons and the apply button is updated when a page s valid state changes p param b the new valid state public void set valid boolean b boolean old value is valid is valid b if old value is valid update container state if get container null get container update buttons update page state update apply button setvalid oldvalue isvalid isvalid oldvalue isvalid getcontainer getcontainer updatebuttons updateapplybutton returns a string suitable for debugging purpose only public string to string return get title tostring gettitle updates the enabled state of the apply button to reflect whether this page is valid protected void update apply button if apply button null apply button set enabled is valid updateapplybutton applybutton applybutton setenabled isvalid creates a composite with a highlighted note entry and a message text this is designed to take up the full width of the page param font the font to use param composite the parent composite param title the title of the note param message the message for the note return the composite for the note protected composite create note composite font font composite composite string title string message composite message composite new composite composite swt none grid layout message layout new grid layout message layout num columns 2 message layout margin width 0 message layout margin height 0 message composite set layout message layout message composite set layout data new grid data grid data horizontal align fill message composite set font font final label note label new label message composite swt bold note label set text title note label set font j face resources get banner font note label set layout data new grid data grid data vertical align beginning final i property change listener font listener new i property change listener public void property change property change event event if j face resources banner font equals event get property note label set font j face resources get font j face resources banner font j face resources get font registry add listener font listener note label add dispose listener new dispose listener public void widget disposed dispose event event j face resources get font registry remove listener font listener label message label new label message composite swt wrap message label set text message message label set font font return message composite createnotecomposite messagecomposite gridlayout messagelayout gridlayout messagelayout numcolumns messagelayout marginwidth messagelayout marginheight messagecomposite setlayout messagelayout messagecomposite setlayoutdata griddata griddata horizontal_align_fill messagecomposite setfont notelabel messagecomposite notelabel settext notelabel setfont jfaceresources getbannerfont notelabel setlayoutdata griddata griddata vertical_align_beginning ipropertychangelistener fontlistener ipropertychangelistener propertychange propertychangeevent jfaceresources banner_font getproperty notelabel setfont jfaceresources getfont jfaceresources banner_font jfaceresources getfontregistry addlistener fontlistener notelabel adddisposelistener disposelistener widgetdisposed disposeevent jfaceresources getfontregistry removelistener fontlistener messagelabel messagecomposite messagelabel settext messagelabel setfont messagecomposite final i property change listener font listener new i property change listener public void property change property change event event if j face resources banner font equals event get property note label set font j face resources get font j face resources banner font ipropertychangelistener fontlistener ipropertychangelistener propertychange propertychangeevent jfaceresources banner_font getproperty notelabel setfont jfaceresources getfont jfaceresources banner_font j face resources get font registry add listener font listener note label add dispose listener new dispose listener public void widget disposed dispose event event j face resources get font registry remove listener font listener jfaceresources getfontregistry addlistener fontlistener notelabel adddisposelistener disposelistener widgetdisposed disposeevent jfaceresources getfontregistry removelistener fontlistener returns the apply button return the apply button protected button get apply button return apply button getapplybutton applybutton returns the restore defaults button return the restore defaults button protected button get defaults button return defaults button getdefaultsbutton defaultsbutton see org eclipse jface dialogs i dialog page perform help public void perform help get control notify listeners swt help new event idialogpage performhelp performhelp getcontrol notifylisteners apply the data to the receiver by default do nothing param data since 3 1 public void apply data object data applydata public void set error message string new message super set error message new message if get container null get container update message seterrormessage newmessage seterrormessage newmessage getcontainer getcontainer updatemessage public void set message string new message int new type super set message new message new type if get container null get container update message setmessage newmessage newtype setmessage newmessage newtype getcontainer getcontainer updatemessage creates a new preference page with an empty title and no image protected preference page this non nls 1 preferencepage creates a new preference page with the given title and no image param title the title of this preference page protected preference page string title super title preferencepage creates a new abstract preference page with the given title and image param title the title of this preference page param image the image for this preference page or code null code if none protected preference page string title image descriptor image super title image preferencepage imagedescriptor computes the size for this page s ui control p the default implementation of this code i preference page code method returns the size set by code set size code if no size has been set but the page has a ui control the framework method code do compute size code is called to compute the size p return the size of the preference page encoded as code new point width height code or code 0 0 code if the page doesn t currently have any ui component public point compute size if size null return size control control get control if control null size do compute size return size return new point 0 0 ipreferencepage setsize docomputesize computesize getcontrol docomputesize contributes additional buttons to the given composite p the default implementation of this framework hook method does nothing subclasses should override this method to contribute buttons to this page s button bar for each button a subclass contributes it must also increase the parent s grid layout number of columns by one that is pre grid layout parent get layout num columns pre p param parent the button bar protected void contribute buttons composite parent gridlayout getlayout numcolumns contributebuttons creates and returns the swt control for the customized body of this preference page under the given parent composite p this framework method must be implemented by concrete subclasses any subclass returning a code composite code object whose code layout code has default margins for example a code grid layout code are expected to set the margins of this code layout code to 0 pixels p param parent the parent composite return the new control gridlayout the code preference page code implementation of this code i dialog page code method creates a description label and button bar for the page it calls code create contents code to create the custom contents of the page p if a subclass that overrides this method creates a code composite code that has a layout with default margins for example a code grid layout code it is expected to set the margins of this code layout code to 0 pixels public void create control composite parent grid data gd composite content new composite parent swt none set control content grid layout layout new grid layout layout margin width 0 layout margin height 0 content set layout layout apply the font on creation for backward compatibility apply dialog font content initialize the dialog units initialize dialog units content description label create description label content if description label null description label set layout data new grid data grid data fill horizontal body create contents content if body null null is not a valid return value but support graceful failure body set layout data new grid data grid data fill both composite button bar new composite content swt none layout new grid layout layout num columns 0 layout margin height 0 layout margin width 0 layout make columns equal width false button bar set layout layout gd new grid data grid data horizontal align end button bar set layout data gd contribute buttons button bar if create default and apply button layout num columns layout num columns 2 string labels j face resources get strings new string defaults apply non nls 2 non nls 1 int width hint convert horizontaldl us to pixels i dialog constants button width defaults button new button button bar swt push defaults button set text labels 0 dialog apply dialog font defaults button grid data data new grid data grid data horizontal align fill point min button size defaults button compute size swt default swt default true data width hint math max width hint min button size x defaults button set layout data data defaults button add selection listener new selection adapter public void widget selected selection event e perform defaults apply button new button button bar swt push apply button set text labels 1 dialog apply dialog font apply button data new grid data grid data horizontal align fill min button size apply button compute size swt default swt default true data width hint math max width hint min button size x apply button set layout data data apply button add selection listener new selection adapter public void widget selected selection event e perform apply apply button set enabled is valid apply dialog font button bar else check if there are any other buttons on the button bar if not throw away the button bar composite otherwise there is an unusually large button bar if button bar get children length 1 button bar dispose preferencepage idialogpage createcontents gridlayout createcontrol griddata setcontrol gridlayout gridlayout marginwidth marginheight setlayout applydialogfont initializedialogunits descriptionlabel createdescriptionlabel descriptionlabel descriptionlabel setlayoutdata griddata griddata fill_horizontal createcontents setlayoutdata griddata griddata fill_both buttonbar gridlayout numcolumns marginheight marginwidth makecolumnsequalwidth buttonbar setlayout griddata griddata horizontal_align_end buttonbar setlayoutdata contributebuttons buttonbar createdefaultandapplybutton numcolumns numcolumns jfaceresources getstrings widthhint converthorizontaldlustopixels idialogconstants button_width defaultsbutton buttonbar defaultsbutton settext applydialogfont defaultsbutton griddata griddata griddata horizontal_align_fill minbuttonsize defaultsbutton computesize widthhint widthhint minbuttonsize defaultsbutton setlayoutdata defaultsbutton addselectionlistener selectionadapter widgetselected selectionevent performdefaults applybutton buttonbar applybutton settext applydialogfont applybutton griddata griddata horizontal_align_fill minbuttonsize applybutton computesize widthhint widthhint minbuttonsize applybutton setlayoutdata applybutton addselectionlistener selectionadapter widgetselected selectionevent performapply applybutton setenabled isvalid applydialogfont buttonbar buttonbar getchildren buttonbar apply the dialog font to the composite and it s children if it is set subclasses may override if they wish to set the font themselves param composite protected void apply dialog font composite composite dialog apply dialog font composite applydialogfont applydialogfont creates and returns an swt label under the given composite param parent the parent composite return the new label protected label create description label composite parent label result null string description get description if description null result new label parent swt wrap result set font parent get font result set text description return result createdescriptionlabel getdescription setfont getfont settext computes the size needed by this page s ui control p all pages should override this method and set the appropriate sizes of their widgets and then call code super do compute size code p return the size of the preference page encoded as code new point width height code protected point do compute size if description label null body null point body size body compute size swt default swt default true grid data gd grid data description label get layout data gd width hint body size x return get control compute size swt default swt default true docomputesize docomputesize descriptionlabel bodysize computesize griddata griddata descriptionlabel getlayoutdata widthhint bodysize getcontrol computesize returns the preference store of this preference page p this is a framework hook method for subclasses to return a page specific preference store the default implementation returns code null code p return the preference store or code null code if none protected i preference store do get preference store return null ipreferencestore dogetpreferencestore returns the container of this page return the preference page container or code null code if this page has yet to be added to a container public i preference page container get container return container ipreferencepagecontainer getcontainer returns the preference store of this preference page return the preference store or code null code if none public i preference store get preference store if preference store null preference store do get preference store if preference store null return preference store else if container null return container get preference store return null ipreferencestore getpreferencestore preferencestore preferencestore dogetpreferencestore preferencestore preferencestore getpreferencestore the preference page implementation of an code i preference page code method returns whether this preference page is valid preference pages are considered valid by default call code set valid false code to make a page invalid public boolean is valid return is valid ipreferencepage setvalid isvalid isvalid suppresses creation of the standard default and apply buttons for this page p subclasses wishing a preference page wihthout these buttons should call this framework method before the page s control has been created p protected void no default and apply button create default and apply button false nodefaultandapplybutton createdefaultandapplybutton the code preference page code implementation of this code i preference page code method returns code true code if the page is valid public boolean ok to leave return is valid preferencepage ipreferencepage oktoleave isvalid performs special processing when this page s apply button has been pressed p this is a framework hook method for sublcasses to do special things when the apply button has been pressed the default implementation of this framework method simply calls code perform ok code to simulate the pressing of the page s ok button p see perform ok protected void perform apply perform ok performok performok performapply performok the preference page implementation of an code i preference page code method performs special processing when this page s cancel button has been pressed p this is a framework hook method for sublcasses to do special things when the cancel button has been pressed the default implementation of this framework method does nothing and returns code true code public boolean perform cancel return true ipreferencepage performcancel performs special processing when this page s defaults button has been pressed p this is a framework hook method for subclasses to do special things when the defaults button has been pressed subclasses may override but should call code super perform defaults code p protected void perform defaults update apply button performdefaults performdefaults updateapplybutton method declared on i preference page subclasses should override public boolean perform ok return true ipreferencepage performok non javadoc method declared on i preference page public void set container i preference page container container this container container ipreferencepage setcontainer ipreferencepagecontainer sets the preference store for this preference page p if preference store is set to null get preference store will invoke do get preference store the next time it is called p param store the preference store or code null code see get preference store public void set preference store i preference store store preference store store preferencestore getpreferencestore dogetpreferencestore getpreferencestore setpreferencestore ipreferencestore preferencestore public void set size point ui size control control get control if control null control set size ui size size ui size setsize uisize getcontrol setsize uisize uisize the code preference page code implementation of this code i dialog page code method extends the code dialog page code implementation to update the preference page container title subclasses may extend public void set title string title super set title title if get container null get container update title preferencepage idialogpage dialogpage settitle settitle getcontainer getcontainer updatetitle sets whether this page is valid the enable state of the container buttons and the apply button is updated when a page s valid state changes p param b the new valid state public void set valid boolean b boolean old value is valid is valid b if old value is valid update container state if get container null get container update buttons update page state update apply button setvalid oldvalue isvalid isvalid oldvalue isvalid getcontainer getcontainer updatebuttons updateapplybutton returns a string suitable for debugging purpose only public string to string return get title tostring gettitle updates the enabled state of the apply button to reflect whether this page is valid protected void update apply button if apply button null apply button set enabled is valid updateapplybutton applybutton applybutton setenabled isvalid creates a composite with a highlighted note entry and a message text this is designed to take up the full width of the page param font the font to use param composite the parent composite param title the title of the note param message the message for the note return the composite for the note protected composite create note composite font font composite composite string title string message composite message composite new composite composite swt none grid layout message layout new grid layout message layout num columns 2 message layout margin width 0 message layout margin height 0 message composite set layout message layout message composite set layout data new grid data grid data horizontal align fill message composite set font font final label note label new label message composite swt bold note label set text title note label set font j face resources get banner font note label set layout data new grid data grid data vertical align beginning final i property change listener font listener new i property change listener public void property change property change event event if j face resources banner font equals event get property note label set font j face resources get font j face resources banner font j face resources get font registry add listener font listener note label add dispose listener new dispose listener public void widget disposed dispose event event j face resources get font registry remove listener font listener label message label new label message composite swt wrap message label set text message message label set font font return message composite createnotecomposite messagecomposite gridlayout messagelayout gridlayout messagelayout numcolumns messagelayout marginwidth messagelayout marginheight messagecomposite setlayout messagelayout messagecomposite setlayoutdata griddata griddata horizontal_align_fill messagecomposite setfont notelabel messagecomposite notelabel settext notelabel setfont jfaceresources getbannerfont notelabel setlayoutdata griddata griddata vertical_align_beginning ipropertychangelistener fontlistener ipropertychangelistener propertychange propertychangeevent jfaceresources banner_font getproperty notelabel setfont jfaceresources getfont jfaceresources banner_font jfaceresources getfontregistry addlistener fontlistener notelabel adddisposelistener disposelistener widgetdisposed disposeevent jfaceresources getfontregistry removelistener fontlistener messagelabel messagecomposite messagelabel settext messagelabel setfont messagecomposite returns the apply button return the apply button protected button get apply button return apply button getapplybutton applybutton returns the restore defaults button return the restore defaults button protected button get defaults button return defaults button getdefaultsbutton defaultsbutton see org eclipse jface dialogs i dialog page perform help public void perform help get control notify listeners swt help new event idialogpage performhelp performhelp getcontrol notifylisteners apply the data to the receiver by default do nothing param data since 3 1 public void apply data object data applydata public void set error message string new message super set error message new message if get container null get container update message seterrormessage newmessage seterrormessage newmessage getcontainer getcontainer updatemessage public void set message string new message int new type super set message new message new type if get container null get container update message setmessage newmessage newtype setmessage newmessage newtype getcontainer getcontainer updatemessage creates a new preference page with an empty title and no image protected preference page this non nls 1 preferencepage creates a new preference page with the given title and no image param title the title of this preference page protected preference page string title super title preferencepage creates a new abstract preference page with the given title and image param title the title of this preference page param image the image for this preference page or code null code if none protected preference page string title image descriptor image super title image preferencepage imagedescriptor computes the size for this page s ui control p the default implementation of this code i preference page code method returns the size set by code set size code if no size has been set but the page has a ui control the framework method code do compute size code is called to compute the size p return the size of the preference page encoded as code new point width height code or code 0 0 code if the page doesn t currently have any ui component public point compute size if size null return size control control get control if control null size do compute size return size return new point 0 0 ipreferencepage setsize docomputesize computesize getcontrol docomputesize contributes additional buttons to the given composite p the default implementation of this framework hook method does nothing subclasses should override this method to contribute buttons to this page s button bar for each button a subclass contributes it must also increase the parent s grid layout number of columns by one that is pre grid layout parent get layout num columns pre p param parent the button bar protected void contribute buttons composite parent gridlayout getlayout numcolumns contributebuttons creates and returns the swt control for the customized body of this preference page under the given parent composite p this framework method must be implemented by concrete subclasses any subclass returning a code composite code object whose code layout code has default margins for example a code grid layout code are expected to set the margins of this code layout code to 0 pixels p param parent the parent composite return the new control gridlayout the code preference page code implementation of this code i dialog page code method creates a description label and button bar for the page it calls code create contents code to create the custom contents of the page p if a subclass that overrides this method creates a code composite code that has a layout with default margins for example a code grid layout code it is expected to set the margins of this code layout code to 0 pixels public void create control composite parent grid data gd composite content new composite parent swt none set control content grid layout layout new grid layout layout margin width 0 layout margin height 0 content set layout layout apply the font on creation for backward compatibility apply dialog font content initialize the dialog units initialize dialog units content description label create description label content if description label null description label set layout data new grid data grid data fill horizontal body create contents content if body null null is not a valid return value but support graceful failure body set layout data new grid data grid data fill both composite button bar new composite content swt none layout new grid layout layout num columns 0 layout margin height 0 layout margin width 0 layout make columns equal width false button bar set layout layout gd new grid data grid data horizontal align end button bar set layout data gd contribute buttons button bar if create default and apply button layout num columns layout num columns 2 string labels j face resources get strings new string defaults apply non nls 2 non nls 1 int width hint convert horizontaldl us to pixels i dialog constants button width defaults button new button button bar swt push defaults button set text labels 0 dialog apply dialog font defaults button grid data data new grid data grid data horizontal align fill point min button size defaults button compute size swt default swt default true data width hint math max width hint min button size x defaults button set layout data data defaults button add selection listener new selection adapter public void widget selected selection event e perform defaults apply button new button button bar swt push apply button set text labels 1 dialog apply dialog font apply button data new grid data grid data horizontal align fill min button size apply button compute size swt default swt default true data width hint math max width hint min button size x apply button set layout data data apply button add selection listener new selection adapter public void widget selected selection event e perform apply apply button set enabled is valid apply dialog font button bar else check if there are any other buttons on the button bar if not throw away the button bar composite otherwise there is an unusually large button bar if button bar get children length 1 button bar dispose preferencepage idialogpage createcontents gridlayout createcontrol griddata setcontrol gridlayout gridlayout marginwidth marginheight setlayout applydialogfont initializedialogunits descriptionlabel createdescriptionlabel descriptionlabel descriptionlabel setlayoutdata griddata griddata fill_horizontal createcontents setlayoutdata griddata griddata fill_both buttonbar gridlayout numcolumns marginheight marginwidth makecolumnsequalwidth buttonbar setlayout griddata griddata horizontal_align_end buttonbar setlayoutdata contributebuttons buttonbar createdefaultandapplybutton numcolumns numcolumns jfaceresources getstrings widthhint converthorizontaldlustopixels idialogconstants button_width defaultsbutton buttonbar defaultsbutton settext applydialogfont defaultsbutton griddata griddata griddata horizontal_align_fill minbuttonsize defaultsbutton computesize widthhint widthhint minbuttonsize defaultsbutton setlayoutdata defaultsbutton addselectionlistener selectionadapter widgetselected selectionevent performdefaults applybutton buttonbar applybutton settext applydialogfont applybutton griddata griddata horizontal_align_fill minbuttonsize applybutton computesize widthhint widthhint minbuttonsize applybutton setlayoutdata applybutton addselectionlistener selectionadapter widgetselected selectionevent performapply applybutton setenabled isvalid applydialogfont buttonbar buttonbar getchildren buttonbar defaults button set layout data data defaults button add selection listener new selection adapter public void widget selected selection event e perform defaults defaultsbutton setlayoutdata defaultsbutton addselectionlistener selectionadapter widgetselected selectionevent performdefaults apply button set layout data data apply button add selection listener new selection adapter public void widget selected selection event e perform apply applybutton setlayoutdata applybutton addselectionlistener selectionadapter widgetselected selectionevent performapply apply the dialog font to the composite and it s children if it is set subclasses may override if they wish to set the font themselves param composite protected void apply dialog font composite composite dialog apply dialog font composite applydialogfont applydialogfont creates and returns an swt label under the given composite param parent the parent composite return the new label protected label create description label composite parent label result null string description get description if description null result new label parent swt wrap result set font parent get font result set text description return result createdescriptionlabel getdescription setfont getfont settext computes the size needed by this page s ui control p all pages should override this method and set the appropriate sizes of their widgets and then call code super do compute size code p return the size of the preference page encoded as code new point width height code protected point do compute size if description label null body null point body size body compute size swt default swt default true grid data gd grid data description label get layout data gd width hint body size x return get control compute size swt default swt default true docomputesize docomputesize descriptionlabel bodysize computesize griddata griddata descriptionlabel getlayoutdata widthhint bodysize getcontrol computesize returns the preference store of this preference page p this is a framework hook method for subclasses to return a page specific preference store the default implementation returns code null code p return the preference store or code null code if none protected i preference store do get preference store return null ipreferencestore dogetpreferencestore returns the container of this page return the preference page container or code null code if this page has yet to be added to a container public i preference page container get container return container ipreferencepagecontainer getcontainer returns the preference store of this preference page return the preference store or code null code if none public i preference store get preference store if preference store null preference store do get preference store if preference store null return preference store else if container null return container get preference store return null ipreferencestore getpreferencestore preferencestore preferencestore dogetpreferencestore preferencestore preferencestore getpreferencestore the preference page implementation of an code i preference page code method returns whether this preference page is valid preference pages are considered valid by default call code set valid false code to make a page invalid public boolean is valid return is valid ipreferencepage setvalid isvalid isvalid suppresses creation of the standard default and apply buttons for this page p subclasses wishing a preference page wihthout these buttons should call this framework method before the page s control has been created p protected void no default and apply button create default and apply button false nodefaultandapplybutton createdefaultandapplybutton the code preference page code implementation of this code i preference page code method returns code true code if the page is valid public boolean ok to leave return is valid preferencepage ipreferencepage oktoleave isvalid performs special processing when this page s apply button has been pressed p this is a framework hook method for sublcasses to do special things when the apply button has been pressed the default implementation of this framework method simply calls code perform ok code to simulate the pressing of the page s ok button p see perform ok protected void perform apply perform ok performok performok performapply performok the preference page implementation of an code i preference page code method performs special processing when this page s cancel button has been pressed p this is a framework hook method for sublcasses to do special things when the cancel button has been pressed the default implementation of this framework method does nothing and returns code true code public boolean perform cancel return true ipreferencepage performcancel performs special processing when this page s defaults button has been pressed p this is a framework hook method for subclasses to do special things when the defaults button has been pressed subclasses may override but should call code super perform defaults code p protected void perform defaults update apply button performdefaults performdefaults updateapplybutton method declared on i preference page subclasses should override public boolean perform ok return true ipreferencepage performok non javadoc method declared on i preference page public void set container i preference page container container this container container ipreferencepage setcontainer ipreferencepagecontainer sets the preference store for this preference page p if preference store is set to null get preference store will invoke do get preference store the next time it is called p param store the preference store or code null code see get preference store public void set preference store i preference store store preference store store preferencestore getpreferencestore dogetpreferencestore getpreferencestore setpreferencestore ipreferencestore preferencestore public void set size point ui size control control get control if control null control set size ui size size ui size setsize uisize getcontrol setsize uisize uisize the code preference page code implementation of this code i dialog page code method extends the code dialog page code implementation to update the preference page container title subclasses may extend public void set title string title super set title title if get container null get container update title preferencepage idialogpage dialogpage settitle settitle getcontainer getcontainer updatetitle sets whether this page is valid the enable state of the container buttons and the apply button is updated when a page s valid state changes p param b the new valid state public void set valid boolean b boolean old value is valid is valid b if old value is valid update container state if get container null get container update buttons update page state update apply button setvalid oldvalue isvalid isvalid oldvalue isvalid getcontainer getcontainer updatebuttons updateapplybutton returns a string suitable for debugging purpose only public string to string return get title tostring gettitle updates the enabled state of the apply button to reflect whether this page is valid protected void update apply button if apply button null apply button set enabled is valid updateapplybutton applybutton applybutton setenabled isvalid creates a composite with a highlighted note entry and a message text this is designed to take up the full width of the page param font the font to use param composite the parent composite param title the title of the note param message the message for the note return the composite for the note protected composite create note composite font font composite composite string title string message composite message composite new composite composite swt none grid layout message layout new grid layout message layout num columns 2 message layout margin width 0 message layout margin height 0 message composite set layout message layout message composite set layout data new grid data grid data horizontal align fill message composite set font font final label note label new label message composite swt bold note label set text title note label set font j face resources get banner font note label set layout data new grid data grid data vertical align beginning final i property change listener font listener new i property change listener public void property change property change event event if j face resources banner font equals event get property note label set font j face resources get font j face resources banner font j face resources get font registry add listener font listener note label add dispose listener new dispose listener public void widget disposed dispose event event j face resources get font registry remove listener font listener label message label new label message composite swt wrap message label set text message message label set font font return message composite createnotecomposite messagecomposite gridlayout messagelayout gridlayout messagelayout numcolumns messagelayout marginwidth messagelayout marginheight messagecomposite setlayout messagelayout messagecomposite setlayoutdata griddata griddata horizontal_align_fill messagecomposite setfont notelabel messagecomposite notelabel settext notelabel setfont jfaceresources getbannerfont notelabel setlayoutdata griddata griddata vertical_align_beginning ipropertychangelistener fontlistener ipropertychangelistener propertychange propertychangeevent jfaceresources banner_font getproperty notelabel setfont jfaceresources getfont jfaceresources banner_font jfaceresources getfontregistry addlistener fontlistener notelabel adddisposelistener disposelistener widgetdisposed disposeevent jfaceresources getfontregistry removelistener fontlistener messagelabel messagecomposite messagelabel settext messagelabel setfont messagecomposite final i property change listener font listener new i property change listener public void property change property change event event if j face resources banner font equals event get property note label set font j face resources get font j face resources banner font ipropertychangelistener fontlistener ipropertychangelistener propertychange propertychangeevent jfaceresources banner_font getproperty notelabel setfont jfaceresources getfont jfaceresources banner_font j face resources get font registry add listener font listener note label add dispose listener new dispose listener public void widget disposed dispose event event j face resources get font registry remove listener font listener jfaceresources getfontregistry addlistener fontlistener notelabel adddisposelistener disposelistener widgetdisposed disposeevent jfaceresources getfontregistry removelistener fontlistener returns the apply button return the apply button protected button get apply button return apply button getapplybutton applybutton returns the restore defaults button return the restore defaults button protected button get defaults button return defaults button getdefaultsbutton defaultsbutton see org eclipse jface dialogs i dialog page perform help public void perform help get control notify listeners swt help new event idialogpage performhelp performhelp getcontrol notifylisteners apply the data to the receiver by default do nothing param data since 3 1 public void apply data object data applydata public void set error message string new message super set error message new message if get container null get container update message seterrormessage newmessage seterrormessage newmessage getcontainer getcontainer updatemessage public void set message string new message int new type super set message new message new type if get container null get container update message setmessage newmessage newtype setmessage newmessage newtype getcontainer getcontainer updatemessage creates a new preference page with an empty title and no image protected preference page this non nls 1 preferencepage creates a new preference page with the given title and no image param title the title of this preference page protected preference page string title super title preferencepage creates a new abstract preference page with the given title and image param title the title of this preference page param image the image for this preference page or code null code if none protected preference page string title image descriptor image super title image preferencepage imagedescriptor computes the size for this page s ui control p the default implementation of this code i preference page code method returns the size set by code set size code if no size has been set but the page has a ui control the framework method code do compute size code is called to compute the size p return the size of the preference page encoded as code new point width height code or code 0 0 code if the page doesn t currently have any ui component public point compute size if size null return size control control get control if control null size do compute size return size return new point 0 0 ipreferencepage setsize docomputesize computesize getcontrol docomputesize contributes additional buttons to the given composite p the default implementation of this framework hook method does nothing subclasses should override this method to contribute buttons to this page s button bar for each button a subclass contributes it must also increase the parent s grid layout number of columns by one that is pre grid layout parent get layout num columns pre p param parent the button bar protected void contribute buttons composite parent gridlayout getlayout numcolumns contributebuttons creates and returns the swt control for the customized body of this preference page under the given parent composite p this framework method must be implemented by concrete subclasses any subclass returning a code composite code object whose code layout code has default margins for example a code grid layout code are expected to set the margins of this code layout code to 0 pixels p param parent the parent composite return the new control gridlayout the code preference page code implementation of this code i dialog page code method creates a description label and button bar for the page it calls code create contents code to create the custom contents of the page p if a subclass that overrides this method creates a code composite code that has a layout with default margins for example a code grid layout code it is expected to set the margins of this code layout code to 0 pixels public void create control composite parent grid data gd composite content new composite parent swt none set control content grid layout layout new grid layout layout margin width 0 layout margin height 0 content set layout layout apply the font on creation for backward compatibility apply dialog font content initialize the dialog units initialize dialog units content description label create description label content if description label null description label set layout data new grid data grid data fill horizontal body create contents content if body null null is not a valid return value but support graceful failure body set layout data new grid data grid data fill both composite button bar new composite content swt none layout new grid layout layout num columns 0 layout margin height 0 layout margin width 0 layout make columns equal width false button bar set layout layout gd new grid data grid data horizontal align end button bar set layout data gd contribute buttons button bar if create default and apply button layout num columns layout num columns 2 string labels j face resources get strings new string defaults apply non nls 2 non nls 1 int width hint convert horizontaldl us to pixels i dialog constants button width defaults button new button button bar swt push defaults button set text labels 0 dialog apply dialog font defaults button grid data data new grid data grid data horizontal align fill point min button size defaults button compute size swt default swt default true data width hint math max width hint min button size x defaults button set layout data data defaults button add selection listener new selection adapter public void widget selected selection event e perform defaults apply button new button button bar swt push apply button set text labels 1 dialog apply dialog font apply button data new grid data grid data horizontal align fill min button size apply button compute size swt default swt default true data width hint math max width hint min button size x apply button set layout data data apply button add selection listener new selection adapter public void widget selected selection event e perform apply apply button set enabled is valid apply dialog font button bar else check if there are any other buttons on the button bar if not throw away the button bar composite otherwise there is an unusually large button bar if button bar get children length 1 button bar dispose preferencepage idialogpage createcontents gridlayout createcontrol griddata setcontrol gridlayout gridlayout marginwidth marginheight setlayout applydialogfont initializedialogunits descriptionlabel createdescriptionlabel descriptionlabel descriptionlabel setlayoutdata griddata griddata fill_horizontal createcontents setlayoutdata griddata griddata fill_both buttonbar gridlayout numcolumns marginheight marginwidth makecolumnsequalwidth buttonbar setlayout griddata griddata horizontal_align_end buttonbar setlayoutdata contributebuttons buttonbar createdefaultandapplybutton numcolumns numcolumns jfaceresources getstrings widthhint converthorizontaldlustopixels idialogconstants button_width defaultsbutton buttonbar defaultsbutton settext applydialogfont defaultsbutton griddata griddata griddata horizontal_align_fill minbuttonsize defaultsbutton computesize widthhint widthhint minbuttonsize defaultsbutton setlayoutdata defaultsbutton addselectionlistener selectionadapter widgetselected selectionevent performdefaults applybutton buttonbar applybutton settext applydialogfont applybutton griddata griddata horizontal_align_fill minbuttonsize applybutton computesize widthhint widthhint minbuttonsize applybutton setlayoutdata applybutton addselectionlistener selectionadapter widgetselected selectionevent performapply applybutton setenabled isvalid applydialogfont buttonbar buttonbar getchildren buttonbar apply the dialog font to the composite and it s children if it is set subclasses may override if they wish to set the font themselves param composite protected void apply dialog font composite composite dialog apply dialog font composite applydialogfont applydialogfont creates and returns an swt label under the given composite param parent the parent composite return the new label protected label create description label composite parent label result null string description get description if description null result new label parent swt wrap result set font parent get font result set text description return result createdescriptionlabel getdescription setfont getfont settext computes the size needed by this page s ui control p all pages should override this method and set the appropriate sizes of their widgets and then call code super do compute size code p return the size of the preference page encoded as code new point width height code protected point do compute size if description label null body null point body size body compute size swt default swt default true grid data gd grid data description label get layout data gd width hint body size x return get control compute size swt default swt default true docomputesize docomputesize descriptionlabel bodysize computesize griddata griddata descriptionlabel getlayoutdata widthhint bodysize getcontrol computesize returns the preference store of this preference page p this is a framework hook method for subclasses to return a page specific preference store the default implementation returns code null code p return the preference store or code null code if none protected i preference store do get preference store return null ipreferencestore dogetpreferencestore returns the container of this page return the preference page container or code null code if this page has yet to be added to a container public i preference page container get container return container ipreferencepagecontainer getcontainer returns the preference store of this preference page return the preference store or code null code if none public i preference store get preference store if preference store null preference store do get preference store if preference store null return preference store else if container null return container get preference store return null ipreferencestore getpreferencestore preferencestore preferencestore dogetpreferencestore preferencestore preferencestore getpreferencestore the preference page implementation of an code i preference page code method returns whether this preference page is valid preference pages are considered valid by default call code set valid false code to make a page invalid public boolean is valid return is valid ipreferencepage setvalid isvalid isvalid suppresses creation of the standard default and apply buttons for this page p subclasses wishing a preference page wihthout these buttons should call this framework method before the page s control has been created p protected void no default and apply button create default and apply button false nodefaultandapplybutton createdefaultandapplybutton the code preference page code implementation of this code i preference page code method returns code true code if the page is valid public boolean ok to leave return is valid preferencepage ipreferencepage oktoleave isvalid performs special processing when this page s apply button has been pressed p this is a framework hook method for sublcasses to do special things when the apply button has been pressed the default implementation of this framework method simply calls code perform ok code to simulate the pressing of the page s ok button p see perform ok protected void perform apply perform ok performok performok performapply performok the preference page implementation of an code i preference page code method performs special processing when this page s cancel button has been pressed p this is a framework hook method for sublcasses to do special things when the cancel button has been pressed the default implementation of this framework method does nothing and returns code true code public boolean perform cancel return true ipreferencepage performcancel performs special processing when this page s defaults button has been pressed p this is a framework hook method for subclasses to do special things when the defaults button has been pressed subclasses may override but should call code super perform defaults code p protected void perform defaults update apply button performdefaults performdefaults updateapplybutton method declared on i preference page subclasses should override public boolean perform ok return true ipreferencepage performok non javadoc method declared on i preference page public void set container i preference page container container this container container ipreferencepage setcontainer ipreferencepagecontainer sets the preference store for this preference page p if preference store is set to null get preference store will invoke do get preference store the next time it is called p param store the preference store or code null code see get preference store public void set preference store i preference store store preference store store preferencestore getpreferencestore dogetpreferencestore getpreferencestore setpreferencestore ipreferencestore preferencestore public void set size point ui size control control get control if control null control set size ui size size ui size setsize uisize getcontrol setsize uisize uisize the code preference page code implementation of this code i dialog page code method extends the code dialog page code implementation to update the preference page container title subclasses may extend public void set title string title super set title title if get container null get container update title preferencepage idialogpage dialogpage settitle settitle getcontainer getcontainer updatetitle sets whether this page is valid the enable state of the container buttons and the apply button is updated when a page s valid state changes p param b the new valid state public void set valid boolean b boolean old value is valid is valid b if old value is valid update container state if get container null get container update buttons update page state update apply button setvalid oldvalue isvalid isvalid oldvalue isvalid getcontainer getcontainer updatebuttons updateapplybutton returns a string suitable for debugging purpose only public string to string return get title tostring gettitle updates the enabled state of the apply button to reflect whether this page is valid protected void update apply button if apply button null apply button set enabled is valid updateapplybutton applybutton applybutton setenabled isvalid creates a composite with a highlighted note entry and a message text this is designed to take up the full width of the page param font the font to use param composite the parent composite param title the title of the note param message the message for the note return the composite for the note protected composite create note composite font font composite composite string title string message composite message composite new composite composite swt none grid layout message layout new grid layout message layout num columns 2 message layout margin width 0 message layout margin height 0 message composite set layout message layout message composite set layout data new grid data grid data horizontal align fill message composite set font font final label note label new label message composite swt bold note label set text title note label set font j face resources get banner font note label set layout data new grid data grid data vertical align beginning final i property change listener font listener new i property change listener public void property change property change event event if j face resources banner font equals event get property note label set font j face resources get font j face resources banner font j face resources get font registry add listener font listener note label add dispose listener new dispose listener public void widget disposed dispose event event j face resources get font registry remove listener font listener label message label new label message composite swt wrap message label set text message message label set font font return message composite createnotecomposite messagecomposite gridlayout messagelayout gridlayout messagelayout numcolumns messagelayout marginwidth messagelayout marginheight messagecomposite setlayout messagelayout messagecomposite setlayoutdata griddata griddata horizontal_align_fill messagecomposite setfont notelabel messagecomposite notelabel settext notelabel setfont jfaceresources getbannerfont notelabel setlayoutdata griddata griddata vertical_align_beginning ipropertychangelistener fontlistener ipropertychangelistener propertychange propertychangeevent jfaceresources banner_font getproperty notelabel setfont jfaceresources getfont jfaceresources banner_font jfaceresources getfontregistry addlistener fontlistener notelabel adddisposelistener disposelistener widgetdisposed disposeevent jfaceresources getfontregistry removelistener fontlistener messagelabel messagecomposite messagelabel settext messagelabel setfont messagecomposite returns the apply button return the apply button protected button get apply button return apply button getapplybutton applybutton returns the restore defaults button return the restore defaults button protected button get defaults button return defaults button getdefaultsbutton defaultsbutton see org eclipse jface dialogs i dialog page perform help public void perform help get control notify listeners swt help new event idialogpage performhelp performhelp getcontrol notifylisteners apply the data to the receiver by default do nothing param data since 3 1 public void apply data object data applydata public void set error message string new message super set error message new message if get container null get container update message seterrormessage newmessage seterrormessage newmessage getcontainer getcontainer updatemessage public void set message string new message int new type super set message new message new type if get container null get container update message setmessage newmessage newtype setmessage newmessage newtype getcontainer getcontainer updatemessage creates a new preference page with an empty title and no image protected preference page this non nls 1 preferencepage creates a new preference page with the given title and no image param title the title of this preference page protected preference page string title super title preferencepage creates a new abstract preference page with the given title and image param title the title of this preference page param image the image for this preference page or code null code if none protected preference page string title image descriptor image super title image preferencepage imagedescriptor computes the size for this page s ui control p the default implementation of this code i preference page code method returns the size set by code set size code if no size has been set but the page has a ui control the framework method code do compute size code is called to compute the size p return the size of the preference page encoded as code new point width height code or code 0 0 code if the page doesn t currently have any ui component public point compute size if size null return size control control get control if control null size do compute size return size return new point 0 0 ipreferencepage setsize docomputesize computesize getcontrol docomputesize contributes additional buttons to the given composite p the default implementation of this framework hook method does nothing subclasses should override this method to contribute buttons to this page s button bar for each button a subclass contributes it must also increase the parent s grid layout number of columns by one that is pre grid layout parent get layout num columns pre p param parent the button bar protected void contribute buttons composite parent gridlayout getlayout numcolumns contributebuttons creates and returns the swt control for the customized body of this preference page under the given parent composite p this framework method must be implemented by concrete subclasses any subclass returning a code composite code object whose code layout code has default margins for example a code grid layout code are expected to set the margins of this code layout code to 0 pixels p param parent the parent composite return the new control gridlayout the code preference page code implementation of this code i dialog page code method creates a description label and button bar for the page it calls code create contents code to create the custom contents of the page p if a subclass that overrides this method creates a code composite code that has a layout with default margins for example a code grid layout code it is expected to set the margins of this code layout code to 0 pixels public void create control composite parent grid data gd composite content new composite parent swt none set control content grid layout layout new grid layout layout margin width 0 layout margin height 0 content set layout layout apply the font on creation for backward compatibility apply dialog font content initialize the dialog units initialize dialog units content description label create description label content if description label null description label set layout data new grid data grid data fill horizontal body create contents content if body null null is not a valid return value but support graceful failure body set layout data new grid data grid data fill both composite button bar new composite content swt none layout new grid layout layout num columns 0 layout margin height 0 layout margin width 0 layout make columns equal width false button bar set layout layout gd new grid data grid data horizontal align end button bar set layout data gd contribute buttons button bar if create default and apply button layout num columns layout num columns 2 string labels j face resources get strings new string defaults apply non nls 2 non nls 1 int width hint convert horizontaldl us to pixels i dialog constants button width defaults button new button button bar swt push defaults button set text labels 0 dialog apply dialog font defaults button grid data data new grid data grid data horizontal align fill point min button size defaults button compute size swt default swt default true data width hint math max width hint min button size x defaults button set layout data data defaults button add selection listener new selection adapter public void widget selected selection event e perform defaults apply button new button button bar swt push apply button set text labels 1 dialog apply dialog font apply button data new grid data grid data horizontal align fill min button size apply button compute size swt default swt default true data width hint math max width hint min button size x apply button set layout data data apply button add selection listener new selection adapter public void widget selected selection event e perform apply apply button set enabled is valid apply dialog font button bar else check if there are any other buttons on the button bar if not throw away the button bar composite otherwise there is an unusually large button bar if button bar get children length 1 button bar dispose preferencepage idialogpage createcontents gridlayout createcontrol griddata setcontrol gridlayout gridlayout marginwidth marginheight setlayout applydialogfont initializedialogunits descriptionlabel createdescriptionlabel descriptionlabel descriptionlabel setlayoutdata griddata griddata fill_horizontal createcontents setlayoutdata griddata griddata fill_both buttonbar gridlayout numcolumns marginheight marginwidth makecolumnsequalwidth buttonbar setlayout griddata griddata horizontal_align_end buttonbar setlayoutdata contributebuttons buttonbar createdefaultandapplybutton numcolumns numcolumns jfaceresources getstrings widthhint converthorizontaldlustopixels idialogconstants button_width defaultsbutton buttonbar defaultsbutton settext applydialogfont defaultsbutton griddata griddata griddata horizontal_align_fill minbuttonsize defaultsbutton computesize widthhint widthhint minbuttonsize defaultsbutton setlayoutdata defaultsbutton addselectionlistener selectionadapter widgetselected selectionevent performdefaults applybutton buttonbar applybutton settext applydialogfont applybutton griddata griddata horizontal_align_fill minbuttonsize applybutton computesize widthhint widthhint minbuttonsize applybutton setlayoutdata applybutton addselectionlistener selectionadapter widgetselected selectionevent performapply applybutton setenabled isvalid applydialogfont buttonbar buttonbar getchildren buttonbar defaults button set layout data data defaults button add selection listener new selection adapter public void widget selected selection event e perform defaults defaultsbutton setlayoutdata defaultsbutton addselectionlistener selectionadapter widgetselected selectionevent performdefaults apply button set layout data data apply button add selection listener new selection adapter public void widget selected selection event e perform apply applybutton setlayoutdata applybutton addselectionlistener selectionadapter widgetselected selectionevent performapply apply the dialog font to the composite and it s children if it is set subclasses may override if they wish to set the font themselves param composite protected void apply dialog font composite composite dialog apply dialog font composite applydialogfont applydialogfont creates and returns an swt label under the given composite param parent the parent composite return the new label protected label create description label composite parent label result null string description get description if description null result new label parent swt wrap result set font parent get font result set text description return result createdescriptionlabel getdescription setfont getfont settext computes the size needed by this page s ui control p all pages should override this method and set the appropriate sizes of their widgets and then call code super do compute size code p return the size of the preference page encoded as code new point width height code protected point do compute size if description label null body null point body size body compute size swt default swt default true grid data gd grid data description label get layout data gd width hint body size x return get control compute size swt default swt default true docomputesize docomputesize descriptionlabel bodysize computesize griddata griddata descriptionlabel getlayoutdata widthhint bodysize getcontrol computesize returns the preference store of this preference page p this is a framework hook method for subclasses to return a page specific preference store the default implementation returns code null code p return the preference store or code null code if none protected i preference store do get preference store return null ipreferencestore dogetpreferencestore returns the container of this page return the preference page container or code null code if this page has yet to be added to a container public i preference page container get container return container ipreferencepagecontainer getcontainer returns the preference store of this preference page return the preference store or code null code if none public i preference store get preference store if preference store null preference store do get preference store if preference store null return preference store else if container null return container get preference store return null ipreferencestore getpreferencestore preferencestore preferencestore dogetpreferencestore preferencestore preferencestore getpreferencestore the preference page implementation of an code i preference page code method returns whether this preference page is valid preference pages are considered valid by default call code set valid false code to make a page invalid public boolean is valid return is valid ipreferencepage setvalid isvalid isvalid suppresses creation of the standard default and apply buttons for this page p subclasses wishing a preference page wihthout these buttons should call this framework method before the page s control has been created p protected void no default and apply button create default and apply button false nodefaultandapplybutton createdefaultandapplybutton the code preference page code implementation of this code i preference page code method returns code true code if the page is valid public boolean ok to leave return is valid preferencepage ipreferencepage oktoleave isvalid performs special processing when this page s apply button has been pressed p this is a framework hook method for sublcasses to do special things when the apply button has been pressed the default implementation of this framework method simply calls code perform ok code to simulate the pressing of the page s ok button p see perform ok protected void perform apply perform ok performok performok performapply performok the preference page implementation of an code i preference page code method performs special processing when this page s cancel button has been pressed p this is a framework hook method for sublcasses to do special things when the cancel button has been pressed the default implementation of this framework method does nothing and returns code true code public boolean perform cancel return true ipreferencepage performcancel performs special processing when this page s defaults button has been pressed p this is a framework hook method for subclasses to do special things when the defaults button has been pressed subclasses may override but should call code super perform defaults code p protected void perform defaults update apply button performdefaults performdefaults updateapplybutton method declared on i preference page subclasses should override public boolean perform ok return true ipreferencepage performok non javadoc method declared on i preference page public void set container i preference page container container this container container ipreferencepage setcontainer ipreferencepagecontainer sets the preference store for this preference page p if preference store is set to null get preference store will invoke do get preference store the next time it is called p param store the preference store or code null code see get preference store public void set preference store i preference store store preference store store preferencestore getpreferencestore dogetpreferencestore getpreferencestore setpreferencestore ipreferencestore preferencestore public void set size point ui size control control get control if control null control set size ui size size ui size setsize uisize getcontrol setsize uisize uisize the code preference page code implementation of this code i dialog page code method extends the code dialog page code implementation to update the preference page container title subclasses may extend public void set title string title super set title title if get container null get container update title preferencepage idialogpage dialogpage settitle settitle getcontainer getcontainer updatetitle sets whether this page is valid the enable state of the container buttons and the apply button is updated when a page s valid state changes p param b the new valid state public void set valid boolean b boolean old value is valid is valid b if old value is valid update container state if get container null get container update buttons update page state update apply button setvalid oldvalue isvalid isvalid oldvalue isvalid getcontainer getcontainer updatebuttons updateapplybutton returns a string suitable for debugging purpose only public string to string return get title tostring gettitle updates the enabled state of the apply button to reflect whether this page is valid protected void update apply button if apply button null apply button set enabled is valid updateapplybutton applybutton applybutton setenabled isvalid creates a composite with a highlighted note entry and a message text this is designed to take up the full width of the page param font the font to use param composite the parent composite param title the title of the note param message the message for the note return the composite for the note protected composite create note composite font font composite composite string title string message composite message composite new composite composite swt none grid layout message layout new grid layout message layout num columns 2 message layout margin width 0 message layout margin height 0 message composite set layout message layout message composite set layout data new grid data grid data horizontal align fill message composite set font font final label note label new label message composite swt bold note label set text title note label set font j face resources get banner font note label set layout data new grid data grid data vertical align beginning final i property change listener font listener new i property change listener public void property change property change event event if j face resources banner font equals event get property note label set font j face resources get font j face resources banner font j face resources get font registry add listener font listener note label add dispose listener new dispose listener public void widget disposed dispose event event j face resources get font registry remove listener font listener label message label new label message composite swt wrap message label set text message message label set font font return message composite createnotecomposite messagecomposite gridlayout messagelayout gridlayout messagelayout numcolumns messagelayout marginwidth messagelayout marginheight messagecomposite setlayout messagelayout messagecomposite setlayoutdata griddata griddata horizontal_align_fill messagecomposite setfont notelabel messagecomposite notelabel settext notelabel setfont jfaceresources getbannerfont notelabel setlayoutdata griddata griddata vertical_align_beginning ipropertychangelistener fontlistener ipropertychangelistener propertychange propertychangeevent jfaceresources banner_font getproperty notelabel setfont jfaceresources getfont jfaceresources banner_font jfaceresources getfontregistry addlistener fontlistener notelabel adddisposelistener disposelistener widgetdisposed disposeevent jfaceresources getfontregistry removelistener fontlistener messagelabel messagecomposite messagelabel settext messagelabel setfont messagecomposite final i property change listener font listener new i property change listener public void property change property change event event if j face resources banner font equals event get property note label set font j face resources get font j face resources banner font ipropertychangelistener fontlistener ipropertychangelistener propertychange propertychangeevent jfaceresources banner_font getproperty notelabel setfont jfaceresources getfont jfaceresources banner_font j face resources get font registry add listener font listener note label add dispose listener new dispose listener public void widget disposed dispose event event j face resources get font registry remove listener font listener jfaceresources getfontregistry addlistener fontlistener notelabel adddisposelistener disposelistener widgetdisposed disposeevent jfaceresources getfontregistry removelistener fontlistener returns the apply button return the apply button protected button get apply button return apply button getapplybutton applybutton returns the restore defaults button return the restore defaults button protected button get defaults button return defaults button getdefaultsbutton defaultsbutton see org eclipse jface dialogs i dialog page perform help public void perform help get control notify listeners swt help new event idialogpage performhelp performhelp getcontrol notifylisteners apply the data to the receiver by default do nothing param data since 3 1 public void apply data object data applydata public void set error message string new message super set error message new message if get container null get container update message seterrormessage newmessage seterrormessage newmessage getcontainer getcontainer updatemessage public void set message string new message int new type super set message new message new type if get container null get container update message setmessage newmessage newtype setmessage newmessage newtype getcontainer getcontainer updatemessage creates a new preference page with an empty title and no image protected preference page this non nls 1 preferencepage creates a new preference page with the given title and no image param title the title of this preference page protected preference page string title super title preferencepage creates a new abstract preference page with the given title and image param title the title of this preference page param image the image for this preference page or code null code if none protected preference page string title image descriptor image super title image preferencepage imagedescriptor computes the size for this page s ui control p the default implementation of this code i preference page code method returns the size set by code set size code if no size has been set but the page has a ui control the framework method code do compute size code is called to compute the size p return the size of the preference page encoded as code new point width height code or code 0 0 code if the page doesn t currently have any ui component public point compute size if size null return size control control get control if control null size do compute size return size return new point 0 0 ipreferencepage setsize docomputesize computesize getcontrol docomputesize contributes additional buttons to the given composite p the default implementation of this framework hook method does nothing subclasses should override this method to contribute buttons to this page s button bar for each button a subclass contributes it must also increase the parent s grid layout number of columns by one that is pre grid layout parent get layout num columns pre p param parent the button bar protected void contribute buttons composite parent gridlayout getlayout numcolumns contributebuttons creates and returns the swt control for the customized body of this preference page under the given parent composite p this framework method must be implemented by concrete subclasses any subclass returning a code composite code object whose code layout code has default margins for example a code grid layout code are expected to set the margins of this code layout code to 0 pixels p param parent the parent composite return the new control gridlayout the code preference page code implementation of this code i dialog page code method creates a description label and button bar for the page it calls code create contents code to create the custom contents of the page p if a subclass that overrides this method creates a code composite code that has a layout with default margins for example a code grid layout code it is expected to set the margins of this code layout code to 0 pixels public void create control composite parent grid data gd composite content new composite parent swt none set control content grid layout layout new grid layout layout margin width 0 layout margin height 0 content set layout layout apply the font on creation for backward compatibility apply dialog font content initialize the dialog units initialize dialog units content description label create description label content if description label null description label set layout data new grid data grid data fill horizontal body create contents content if body null null is not a valid return value but support graceful failure body set layout data new grid data grid data fill both composite button bar new composite content swt none layout new grid layout layout num columns 0 layout margin height 0 layout margin width 0 layout make columns equal width false button bar set layout layout gd new grid data grid data horizontal align end button bar set layout data gd contribute buttons button bar if create default and apply button layout num columns layout num columns 2 string labels j face resources get strings new string defaults apply non nls 2 non nls 1 int width hint convert horizontaldl us to pixels i dialog constants button width defaults button new button button bar swt push defaults button set text labels 0 dialog apply dialog font defaults button grid data data new grid data grid data horizontal align fill point min button size defaults button compute size swt default swt default true data width hint math max width hint min button size x defaults button set layout data data defaults button add selection listener new selection adapter public void widget selected selection event e perform defaults apply button new button button bar swt push apply button set text labels 1 dialog apply dialog font apply button data new grid data grid data horizontal align fill min button size apply button compute size swt default swt default true data width hint math max width hint min button size x apply button set layout data data apply button add selection listener new selection adapter public void widget selected selection event e perform apply apply button set enabled is valid apply dialog font button bar else check if there are any other buttons on the button bar if not throw away the button bar composite otherwise there is an unusually large button bar if button bar get children length 1 button bar dispose preferencepage idialogpage createcontents gridlayout createcontrol griddata setcontrol gridlayout gridlayout marginwidth marginheight setlayout applydialogfont initializedialogunits descriptionlabel createdescriptionlabel descriptionlabel descriptionlabel setlayoutdata griddata griddata fill_horizontal createcontents setlayoutdata griddata griddata fill_both buttonbar gridlayout numcolumns marginheight marginwidth makecolumnsequalwidth buttonbar setlayout griddata griddata horizontal_align_end buttonbar setlayoutdata contributebuttons buttonbar createdefaultandapplybutton numcolumns numcolumns jfaceresources getstrings widthhint converthorizontaldlustopixels idialogconstants button_width defaultsbutton buttonbar defaultsbutton settext applydialogfont defaultsbutton griddata griddata griddata horizontal_align_fill minbuttonsize defaultsbutton computesize widthhint widthhint minbuttonsize defaultsbutton setlayoutdata defaultsbutton addselectionlistener selectionadapter widgetselected selectionevent performdefaults applybutton buttonbar applybutton settext applydialogfont applybutton griddata griddata horizontal_align_fill minbuttonsize applybutton computesize widthhint widthhint minbuttonsize applybutton setlayoutdata applybutton addselectionlistener selectionadapter widgetselected selectionevent performapply applybutton setenabled isvalid applydialogfont buttonbar buttonbar getchildren buttonbar apply the dialog font to the composite and it s children if it is set subclasses may override if they wish to set the font themselves param composite protected void apply dialog font composite composite dialog apply dialog font composite applydialogfont applydialogfont creates and returns an swt label under the given composite param parent the parent composite return the new label protected label create description label composite parent label result null string description get description if description null result new label parent swt wrap result set font parent get font result set text description return result createdescriptionlabel getdescription setfont getfont settext computes the size needed by this page s ui control p all pages should override this method and set the appropriate sizes of their widgets and then call code super do compute size code p return the size of the preference page encoded as code new point width height code protected point do compute size if description label null body null point body size body compute size swt default swt default true grid data gd grid data description label get layout data gd width hint body size x return get control compute size swt default swt default true docomputesize docomputesize descriptionlabel bodysize computesize griddata griddata descriptionlabel getlayoutdata widthhint bodysize getcontrol computesize returns the preference store of this preference page p this is a framework hook method for subclasses to return a page specific preference store the default implementation returns code null code p return the preference store or code null code if none protected i preference store do get preference store return null ipreferencestore dogetpreferencestore returns the container of this page return the preference page container or code null code if this page has yet to be added to a container public i preference page container get container return container ipreferencepagecontainer getcontainer returns the preference store of this preference page return the preference store or code null code if none public i preference store get preference store if preference store null preference store do get preference store if preference store null return preference store else if container null return container get preference store return null ipreferencestore getpreferencestore preferencestore preferencestore dogetpreferencestore preferencestore preferencestore getpreferencestore the preference page implementation of an code i preference page code method returns whether this preference page is valid preference pages are considered valid by default call code set valid false code to make a page invalid public boolean is valid return is valid ipreferencepage setvalid isvalid isvalid suppresses creation of the standard default and apply buttons for this page p subclasses wishing a preference page wihthout these buttons should call this framework method before the page s control has been created p protected void no default and apply button create default and apply button false nodefaultandapplybutton createdefaultandapplybutton the code preference page code implementation of this code i preference page code method returns code true code if the page is valid public boolean ok to leave return is valid preferencepage ipreferencepage oktoleave isvalid performs special processing when this page s apply button has been pressed p this is a framework hook method for sublcasses to do special things when the apply button has been pressed the default implementation of this framework method simply calls code perform ok code to simulate the pressing of the page s ok button p see perform ok protected void perform apply perform ok performok performok performapply performok the preference page implementation of an code i preference page code method performs special processing when this page s cancel button has been pressed p this is a framework hook method for sublcasses to do special things when the cancel button has been pressed the default implementation of this framework method does nothing and returns code true code public boolean perform cancel return true ipreferencepage performcancel performs special processing when this page s defaults button has been pressed p this is a framework hook method for subclasses to do special things when the defaults button has been pressed subclasses may override but should call code super perform defaults code p protected void perform defaults update apply button performdefaults performdefaults updateapplybutton method declared on i preference page subclasses should override public boolean perform ok return true ipreferencepage performok non javadoc method declared on i preference page public void set container i preference page container container this container container ipreferencepage setcontainer ipreferencepagecontainer sets the preference store for this preference page p if preference store is set to null get preference store will invoke do get preference store the next time it is called p param store the preference store or code null code see get preference store public void set preference store i preference store store preference store store preferencestore getpreferencestore dogetpreferencestore getpreferencestore setpreferencestore ipreferencestore preferencestore public void set size point ui size control control get control if control null control set size ui size size ui size setsize uisize getcontrol setsize uisize uisize the code preference page code implementation of this code i dialog page code method extends the code dialog page code implementation to update the preference page container title subclasses may extend public void set title string title super set title title if get container null get container update title preferencepage idialogpage dialogpage settitle settitle getcontainer getcontainer updatetitle sets whether this page is valid the enable state of the container buttons and the apply button is updated when a page s valid state changes p param b the new valid state public void set valid boolean b boolean old value is valid is valid b if old value is valid update container state if get container null get container update buttons update page state update apply button setvalid oldvalue isvalid isvalid oldvalue isvalid getcontainer getcontainer updatebuttons updateapplybutton returns a string suitable for debugging purpose only public string to string return get title tostring gettitle updates the enabled state of the apply button to reflect whether this page is valid protected void update apply button if apply button null apply button set enabled is valid updateapplybutton applybutton applybutton setenabled isvalid creates a composite with a highlighted note entry and a message text this is designed to take up the full width of the page param font the font to use param composite the parent composite param title the title of the note param message the message for the note return the composite for the note protected composite create note composite font font composite composite string title string message composite message composite new composite composite swt none grid layout message layout new grid layout message layout num columns 2 message layout margin width 0 message layout margin height 0 message composite set layout message layout message composite set layout data new grid data grid data horizontal align fill message composite set font font final label note label new label message composite swt bold note label set text title note label set font j face resources get banner font note label set layout data new grid data grid data vertical align beginning final i property change listener font listener new i property change listener public void property change property change event event if j face resources banner font equals event get property note label set font j face resources get font j face resources banner font j face resources get font registry add listener font listener note label add dispose listener new dispose listener public void widget disposed dispose event event j face resources get font registry remove listener font listener label message label new label message composite swt wrap message label set text message message label set font font return message composite createnotecomposite messagecomposite gridlayout messagelayout gridlayout messagelayout numcolumns messagelayout marginwidth messagelayout marginheight messagecomposite setlayout messagelayout messagecomposite setlayoutdata griddata griddata horizontal_align_fill messagecomposite setfont notelabel messagecomposite notelabel settext notelabel setfont jfaceresources getbannerfont notelabel setlayoutdata griddata griddata vertical_align_beginning ipropertychangelistener fontlistener ipropertychangelistener propertychange propertychangeevent jfaceresources banner_font getproperty notelabel setfont jfaceresources getfont jfaceresources banner_font jfaceresources getfontregistry addlistener fontlistener notelabel adddisposelistener disposelistener widgetdisposed disposeevent jfaceresources getfontregistry removelistener fontlistener messagelabel messagecomposite messagelabel settext messagelabel setfont messagecomposite returns the apply button return the apply button protected button get apply button return apply button getapplybutton applybutton returns the restore defaults button return the restore defaults button protected button get defaults button return defaults button getdefaultsbutton defaultsbutton see org eclipse jface dialogs i dialog page perform help public void perform help get control notify listeners swt help new event idialogpage performhelp performhelp getcontrol notifylisteners apply the data to the receiver by default do nothing param data since 3 1 public void apply data object data applydata public void set error message string new message super set error message new message if get container null get container update message seterrormessage newmessage seterrormessage newmessage getcontainer getcontainer updatemessage public void set message string new message int new type super set message new message new type if get container null get container update message setmessage newmessage newtype setmessage newmessage newtype getcontainer getcontainer updatemessage creates a new preference page with an empty title and no image protected preference page this non nls 1 preferencepage creates a new preference page with the given title and no image param title the title of this preference page protected preference page string title super title preferencepage creates a new abstract preference page with the given title and image param title the title of this preference page param image the image for this preference page or code null code if none protected preference page string title image descriptor image super title image preferencepage imagedescriptor computes the size for this page s ui control p the default implementation of this code i preference page code method returns the size set by code set size code if no size has been set but the page has a ui control the framework method code do compute size code is called to compute the size p return the size of the preference page encoded as code new point width height code or code 0 0 code if the page doesn t currently have any ui component public point compute size if size null return size control control get control if control null size do compute size return size return new point 0 0 ipreferencepage setsize docomputesize computesize getcontrol docomputesize contributes additional buttons to the given composite p the default implementation of this framework hook method does nothing subclasses should override this method to contribute buttons to this page s button bar for each button a subclass contributes it must also increase the parent s grid layout number of columns by one that is pre grid layout parent get layout num columns pre p param parent the button bar protected void contribute buttons composite parent gridlayout getlayout numcolumns contributebuttons creates and returns the swt control for the customized body of this preference page under the given parent composite p this framework method must be implemented by concrete subclasses any subclass returning a code composite code object whose code layout code has default margins for example a code grid layout code are expected to set the margins of this code layout code to 0 pixels p param parent the parent composite return the new control gridlayout the code preference page code implementation of this code i dialog page code method creates a description label and button bar for the page it calls code create contents code to create the custom contents of the page p if a subclass that overrides this method creates a code composite code that has a layout with default margins for example a code grid layout code it is expected to set the margins of this code layout code to 0 pixels public void create control composite parent grid data gd composite content new composite parent swt none set control content grid layout layout new grid layout layout margin width 0 layout margin height 0 content set layout layout apply the font on creation for backward compatibility apply dialog font content initialize the dialog units initialize dialog units content description label create description label content if description label null description label set layout data new grid data grid data fill horizontal body create contents content if body null null is not a valid return value but support graceful failure body set layout data new grid data grid data fill both composite button bar new composite content swt none layout new grid layout layout num columns 0 layout margin height 0 layout margin width 0 layout make columns equal width false button bar set layout layout gd new grid data grid data horizontal align end button bar set layout data gd contribute buttons button bar if create default and apply button layout num columns layout num columns 2 string labels j face resources get strings new string defaults apply non nls 2 non nls 1 int width hint convert horizontaldl us to pixels i dialog constants button width defaults button new button button bar swt push defaults button set text labels 0 dialog apply dialog font defaults button grid data data new grid data grid data horizontal align fill point min button size defaults button compute size swt default swt default true data width hint math max width hint min button size x defaults button set layout data data defaults button add selection listener new selection adapter public void widget selected selection event e perform defaults apply button new button button bar swt push apply button set text labels 1 dialog apply dialog font apply button data new grid data grid data horizontal align fill min button size apply button compute size swt default swt default true data width hint math max width hint min button size x apply button set layout data data apply button add selection listener new selection adapter public void widget selected selection event e perform apply apply button set enabled is valid apply dialog font button bar else check if there are any other buttons on the button bar if not throw away the button bar composite otherwise there is an unusually large button bar if button bar get children length 1 button bar dispose preferencepage idialogpage createcontents gridlayout createcontrol griddata setcontrol gridlayout gridlayout marginwidth marginheight setlayout applydialogfont initializedialogunits descriptionlabel createdescriptionlabel descriptionlabel descriptionlabel setlayoutdata griddata griddata fill_horizontal createcontents setlayoutdata griddata griddata fill_both buttonbar gridlayout numcolumns marginheight marginwidth makecolumnsequalwidth buttonbar setlayout griddata griddata horizontal_align_end buttonbar setlayoutdata contributebuttons buttonbar createdefaultandapplybutton numcolumns numcolumns jfaceresources getstrings widthhint converthorizontaldlustopixels idialogconstants button_width defaultsbutton buttonbar defaultsbutton settext applydialogfont defaultsbutton griddata griddata griddata horizontal_align_fill minbuttonsize defaultsbutton computesize widthhint widthhint minbuttonsize defaultsbutton setlayoutdata defaultsbutton addselectionlistener selectionadapter widgetselected selectionevent performdefaults applybutton buttonbar applybutton settext applydialogfont applybutton griddata griddata horizontal_align_fill minbuttonsize applybutton computesize widthhint widthhint minbuttonsize applybutton setlayoutdata applybutton addselectionlistener selectionadapter widgetselected selectionevent performapply applybutton setenabled isvalid applydialogfont buttonbar buttonbar getchildren buttonbar defaults button set layout data data defaults button add selection listener new selection adapter public void widget selected selection event e perform defaults defaultsbutton setlayoutdata defaultsbutton addselectionlistener selectionadapter widgetselected selectionevent performdefaults apply button set layout data data apply button add selection listener new selection adapter public void widget selected selection event e perform apply applybutton setlayoutdata applybutton addselectionlistener selectionadapter widgetselected selectionevent performapply apply the dialog font to the composite and it s children if it is set subclasses may override if they wish to set the font themselves param composite protected void apply dialog font composite composite dialog apply dialog font composite applydialogfont applydialogfont creates and returns an swt label under the given composite param parent the parent composite return the new label protected label create description label composite parent label result null string description get description if description null result new label parent swt wrap result set font parent get font result set text description return result createdescriptionlabel getdescription setfont getfont settext computes the size needed by this page s ui control p all pages should override this method and set the appropriate sizes of their widgets and then call code super do compute size code p return the size of the preference page encoded as code new point width height code protected point do compute size if description label null body null point body size body compute size swt default swt default true grid data gd grid data description label get layout data gd width hint body size x return get control compute size swt default swt default true docomputesize docomputesize descriptionlabel bodysize computesize griddata griddata descriptionlabel getlayoutdata widthhint bodysize getcontrol computesize returns the preference store of this preference page p this is a framework hook method for subclasses to return a page specific preference store the default implementation returns code null code p return the preference store or code null code if none protected i preference store do get preference store return null ipreferencestore dogetpreferencestore returns the container of this page return the preference page container or code null code if this page has yet to be added to a container public i preference page container get container return container ipreferencepagecontainer getcontainer returns the preference store of this preference page return the preference store or code null code if none public i preference store get preference store if preference store null preference store do get preference store if preference store null return preference store else if container null return container get preference store return null ipreferencestore getpreferencestore preferencestore preferencestore dogetpreferencestore preferencestore preferencestore getpreferencestore the preference page implementation of an code i preference page code method returns whether this preference page is valid preference pages are considered valid by default call code set valid false code to make a page invalid public boolean is valid return is valid ipreferencepage setvalid isvalid isvalid suppresses creation of the standard default and apply buttons for this page p subclasses wishing a preference page wihthout these buttons should call this framework method before the page s control has been created p protected void no default and apply button create default and apply button false nodefaultandapplybutton createdefaultandapplybutton the code preference page code implementation of this code i preference page code method returns code true code if the page is valid public boolean ok to leave return is valid preferencepage ipreferencepage oktoleave isvalid performs special processing when this page s apply button has been pressed p this is a framework hook method for sublcasses to do special things when the apply button has been pressed the default implementation of this framework method simply calls code perform ok code to simulate the pressing of the page s ok button p see perform ok protected void perform apply perform ok performok performok performapply performok the preference page implementation of an code i preference page code method performs special processing when this page s cancel button has been pressed p this is a framework hook method for sublcasses to do special things when the cancel button has been pressed the default implementation of this framework method does nothing and returns code true code public boolean perform cancel return true ipreferencepage performcancel performs special processing when this page s defaults button has been pressed p this is a framework hook method for subclasses to do special things when the defaults button has been pressed subclasses may override but should call code super perform defaults code p protected void perform defaults update apply button performdefaults performdefaults updateapplybutton method declared on i preference page subclasses should override public boolean perform ok return true ipreferencepage performok non javadoc method declared on i preference page public void set container i preference page container container this container container ipreferencepage setcontainer ipreferencepagecontainer sets the preference store for this preference page p if preference store is set to null get preference store will invoke do get preference store the next time it is called p param store the preference store or code null code see get preference store public void set preference store i preference store store preference store store preferencestore getpreferencestore dogetpreferencestore getpreferencestore setpreferencestore ipreferencestore preferencestore public void set size point ui size control control get control if control null control set size ui size size ui size setsize uisize getcontrol setsize uisize uisize the code preference page code implementation of this code i dialog page code method extends the code dialog page code implementation to update the preference page container title subclasses may extend public void set title string title super set title title if get container null get container update title preferencepage idialogpage dialogpage settitle settitle getcontainer getcontainer updatetitle sets whether this page is valid the enable state of the container buttons and the apply button is updated when a page s valid state changes p param b the new valid state public void set valid boolean b boolean old value is valid is valid b if old value is valid update container state if get container null get container update buttons update page state update apply button setvalid oldvalue isvalid isvalid oldvalue isvalid getcontainer getcontainer updatebuttons updateapplybutton returns a string suitable for debugging purpose only public string to string return get title tostring gettitle updates the enabled state of the apply button to reflect whether this page is valid protected void update apply button if apply button null apply button set enabled is valid updateapplybutton applybutton applybutton setenabled isvalid creates a composite with a highlighted note entry and a message text this is designed to take up the full width of the page param font the font to use param composite the parent composite param title the title of the note param message the message for the note return the composite for the note protected composite create note composite font font composite composite string title string message composite message composite new composite composite swt none grid layout message layout new grid layout message layout num columns 2 message layout margin width 0 message layout margin height 0 message composite set layout message layout message composite set layout data new grid data grid data horizontal align fill message composite set font font final label note label new label message composite swt bold note label set text title note label set font j face resources get banner font note label set layout data new grid data grid data vertical align beginning final i property change listener font listener new i property change listener public void property change property change event event if j face resources banner font equals event get property note label set font j face resources get font j face resources banner font j face resources get font registry add listener font listener note label add dispose listener new dispose listener public void widget disposed dispose event event j face resources get font registry remove listener font listener label message label new label message composite swt wrap message label set text message message label set font font return message composite createnotecomposite messagecomposite gridlayout messagelayout gridlayout messagelayout numcolumns messagelayout marginwidth messagelayout marginheight messagecomposite setlayout messagelayout messagecomposite setlayoutdata griddata griddata horizontal_align_fill messagecomposite setfont notelabel messagecomposite notelabel settext notelabel setfont jfaceresources getbannerfont notelabel setlayoutdata griddata griddata vertical_align_beginning ipropertychangelistener fontlistener ipropertychangelistener propertychange propertychangeevent jfaceresources banner_font getproperty notelabel setfont jfaceresources getfont jfaceresources banner_font jfaceresources getfontregistry addlistener fontlistener notelabel adddisposelistener disposelistener widgetdisposed disposeevent jfaceresources getfontregistry removelistener fontlistener messagelabel messagecomposite messagelabel settext messagelabel setfont messagecomposite final i property change listener font listener new i property change listener public void property change property change event event if j face resources banner font equals event get property note label set font j face resources get font j face resources banner font ipropertychangelistener fontlistener ipropertychangelistener propertychange propertychangeevent jfaceresources banner_font getproperty notelabel setfont jfaceresources getfont jfaceresources banner_font j face resources get font registry add listener font listener note label add dispose listener new dispose listener public void widget disposed dispose event event j face resources get font registry remove listener font listener jfaceresources getfontregistry addlistener fontlistener notelabel adddisposelistener disposelistener widgetdisposed disposeevent jfaceresources getfontregistry removelistener fontlistener returns the apply button return the apply button protected button get apply button return apply button getapplybutton applybutton returns the restore defaults button return the restore defaults button protected button get defaults button return defaults button getdefaultsbutton defaultsbutton see org eclipse jface dialogs i dialog page perform help public void perform help get control notify listeners swt help new event idialogpage performhelp performhelp getcontrol notifylisteners apply the data to the receiver by default do nothing param data since 3 1 public void apply data object data applydata public void set error message string new message super set error message new message if get container null get container update message seterrormessage newmessage seterrormessage newmessage getcontainer getcontainer updatemessage public void set message string new message int new type super set message new message new type if get container null get container update message setmessage newmessage newtype setmessage newmessage newtype getcontainer getcontainer updatemessage creates a new preference page with an empty title and no image protected preference page this non nls 1 preferencepage creates a new preference page with the given title and no image param title the title of this preference page protected preference page string title super title preferencepage creates a new abstract preference page with the given title and image param title the title of this preference page param image the image for this preference page or code null code if none protected preference page string title image descriptor image super title image preferencepage imagedescriptor computes the size for this page s ui control p the default implementation of this code i preference page code method returns the size set by code set size code if no size has been set but the page has a ui control the framework method code do compute size code is called to compute the size p return the size of the preference page encoded as code new point width height code or code 0 0 code if the page doesn t currently have any ui component public point compute size if size null return size control control get control if control null size do compute size return size return new point 0 0 ipreferencepage setsize docomputesize computesize getcontrol docomputesize contributes additional buttons to the given composite p the default implementation of this framework hook method does nothing subclasses should override this method to contribute buttons to this page s button bar for each button a subclass contributes it must also increase the parent s grid layout number of columns by one that is pre grid layout parent get layout num columns pre p param parent the button bar protected void contribute buttons composite parent gridlayout getlayout numcolumns contributebuttons creates and returns the swt control for the customized body of this preference page under the given parent composite p this framework method must be implemented by concrete subclasses any subclass returning a code composite code object whose code layout code has default margins for example a code grid layout code are expected to set the margins of this code layout code to 0 pixels p param parent the parent composite return the new control gridlayout the code preference page code implementation of this code i dialog page code method creates a description label and button bar for the page it calls code create contents code to create the custom contents of the page p if a subclass that overrides this method creates a code composite code that has a layout with default margins for example a code grid layout code it is expected to set the margins of this code layout code to 0 pixels public void create control composite parent grid data gd composite content new composite parent swt none set control content grid layout layout new grid layout layout margin width 0 layout margin height 0 content set layout layout apply the font on creation for backward compatibility apply dialog font content initialize the dialog units initialize dialog units content description label create description label content if description label null description label set layout data new grid data grid data fill horizontal body create contents content if body null null is not a valid return value but support graceful failure body set layout data new grid data grid data fill both composite button bar new composite content swt none layout new grid layout layout num columns 0 layout margin height 0 layout margin width 0 layout make columns equal width false button bar set layout layout gd new grid data grid data horizontal align end button bar set layout data gd contribute buttons button bar if create default and apply button layout num columns layout num columns 2 string labels j face resources get strings new string defaults apply non nls 2 non nls 1 int width hint convert horizontaldl us to pixels i dialog constants button width defaults button new button button bar swt push defaults button set text labels 0 dialog apply dialog font defaults button grid data data new grid data grid data horizontal align fill point min button size defaults button compute size swt default swt default true data width hint math max width hint min button size x defaults button set layout data data defaults button add selection listener new selection adapter public void widget selected selection event e perform defaults apply button new button button bar swt push apply button set text labels 1 dialog apply dialog font apply button data new grid data grid data horizontal align fill min button size apply button compute size swt default swt default true data width hint math max width hint min button size x apply button set layout data data apply button add selection listener new selection adapter public void widget selected selection event e perform apply apply button set enabled is valid apply dialog font button bar else check if there are any other buttons on the button bar if not throw away the button bar composite otherwise there is an unusually large button bar if button bar get children length 1 button bar dispose preferencepage idialogpage createcontents gridlayout createcontrol griddata setcontrol gridlayout gridlayout marginwidth marginheight setlayout applydialogfont initializedialogunits descriptionlabel createdescriptionlabel descriptionlabel descriptionlabel setlayoutdata griddata griddata fill_horizontal createcontents setlayoutdata griddata griddata fill_both buttonbar gridlayout numcolumns marginheight marginwidth makecolumnsequalwidth buttonbar setlayout griddata griddata horizontal_align_end buttonbar setlayoutdata contributebuttons buttonbar createdefaultandapplybutton numcolumns numcolumns jfaceresources getstrings widthhint converthorizontaldlustopixels idialogconstants button_width defaultsbutton buttonbar defaultsbutton settext applydialogfont defaultsbutton griddata griddata griddata horizontal_align_fill minbuttonsize defaultsbutton computesize widthhint widthhint minbuttonsize defaultsbutton setlayoutdata defaultsbutton addselectionlistener selectionadapter widgetselected selectionevent performdefaults applybutton buttonbar applybutton settext applydialogfont applybutton griddata griddata horizontal_align_fill minbuttonsize applybutton computesize widthhint widthhint minbuttonsize applybutton setlayoutdata applybutton addselectionlistener selectionadapter widgetselected selectionevent performapply applybutton setenabled isvalid applydialogfont buttonbar buttonbar getchildren buttonbar apply the dialog font to the composite and it s children if it is set subclasses may override if they wish to set the font themselves param composite protected void apply dialog font composite composite dialog apply dialog font composite applydialogfont applydialogfont creates and returns an swt label under the given composite param parent the parent composite return the new label protected label create description label composite parent label result null string description get description if description null result new label parent swt wrap result set font parent get font result set text description return result createdescriptionlabel getdescription setfont getfont settext computes the size needed by this page s ui control p all pages should override this method and set the appropriate sizes of their widgets and then call code super do compute size code p return the size of the preference page encoded as code new point width height code protected point do compute size if description label null body null point body size body compute size swt default swt default true grid data gd grid data description label get layout data gd width hint body size x return get control compute size swt default swt default true docomputesize docomputesize descriptionlabel bodysize computesize griddata griddata descriptionlabel getlayoutdata widthhint bodysize getcontrol computesize returns the preference store of this preference page p this is a framework hook method for subclasses to return a page specific preference store the default implementation returns code null code p return the preference store or code null code if none protected i preference store do get preference store return null ipreferencestore dogetpreferencestore returns the container of this page return the preference page container or code null code if this page has yet to be added to a container public i preference page container get container return container ipreferencepagecontainer getcontainer returns the preference store of this preference page return the preference store or code null code if none public i preference store get preference store if preference store null preference store do get preference store if preference store null return preference store else if container null return container get preference store return null ipreferencestore getpreferencestore preferencestore preferencestore dogetpreferencestore preferencestore preferencestore getpreferencestore the preference page implementation of an code i preference page code method returns whether this preference page is valid preference pages are considered valid by default call code set valid false code to make a page invalid public boolean is valid return is valid ipreferencepage setvalid isvalid isvalid suppresses creation of the standard default and apply buttons for this page p subclasses wishing a preference page wihthout these buttons should call this framework method before the page s control has been created p protected void no default and apply button create default and apply button false nodefaultandapplybutton createdefaultandapplybutton the code preference page code implementation of this code i preference page code method returns code true code if the page is valid public boolean ok to leave return is valid preferencepage ipreferencepage oktoleave isvalid performs special processing when this page s apply button has been pressed p this is a framework hook method for sublcasses to do special things when the apply button has been pressed the default implementation of this framework method simply calls code perform ok code to simulate the pressing of the page s ok button p see perform ok protected void perform apply perform ok performok performok performapply performok the preference page implementation of an code i preference page code method performs special processing when this page s cancel button has been pressed p this is a framework hook method for sublcasses to do special things when the cancel button has been pressed the default implementation of this framework method does nothing and returns code true code public boolean perform cancel return true ipreferencepage performcancel performs special processing when this page s defaults button has been pressed p this is a framework hook method for subclasses to do special things when the defaults button has been pressed subclasses may override but should call code super perform defaults code p protected void perform defaults update apply button performdefaults performdefaults updateapplybutton method declared on i preference page subclasses should override public boolean perform ok return true ipreferencepage performok non javadoc method declared on i preference page public void set container i preference page container container this container container ipreferencepage setcontainer ipreferencepagecontainer sets the preference store for this preference page p if preference store is set to null get preference store will invoke do get preference store the next time it is called p param store the preference store or code null code see get preference store public void set preference store i preference store store preference store store preferencestore getpreferencestore dogetpreferencestore getpreferencestore setpreferencestore ipreferencestore preferencestore public void set size point ui size control control get control if control null control set size ui size size ui size setsize uisize getcontrol setsize uisize uisize the code preference page code implementation of this code i dialog page code method extends the code dialog page code implementation to update the preference page container title subclasses may extend public void set title string title super set title title if get container null get container update title preferencepage idialogpage dialogpage settitle settitle getcontainer getcontainer updatetitle sets whether this page is valid the enable state of the container buttons and the apply button is updated when a page s valid state changes p param b the new valid state public void set valid boolean b boolean old value is valid is valid b if old value is valid update container state if get container null get container update buttons update page state update apply button setvalid oldvalue isvalid isvalid oldvalue isvalid getcontainer getcontainer updatebuttons updateapplybutton returns a string suitable for debugging purpose only public string to string return get title tostring gettitle updates the enabled state of the apply button to reflect whether this page is valid protected void update apply button if apply button null apply button set enabled is valid updateapplybutton applybutton applybutton setenabled isvalid creates a composite with a highlighted note entry and a message text this is designed to take up the full width of the page param font the font to use param composite the parent composite param title the title of the note param message the message for the note return the composite for the note protected composite create note composite font font composite composite string title string message composite message composite new composite composite swt none grid layout message layout new grid layout message layout num columns 2 message layout margin width 0 message layout margin height 0 message composite set layout message layout message composite set layout data new grid data grid data horizontal align fill message composite set font font final label note label new label message composite swt bold note label set text title note label set font j face resources get banner font note label set layout data new grid data grid data vertical align beginning final i property change listener font listener new i property change listener public void property change property change event event if j face resources banner font equals event get property note label set font j face resources get font j face resources banner font j face resources get font registry add listener font listener note label add dispose listener new dispose listener public void widget disposed dispose event event j face resources get font registry remove listener font listener label message label new label message composite swt wrap message label set text message message label set font font return message composite createnotecomposite messagecomposite gridlayout messagelayout gridlayout messagelayout numcolumns messagelayout marginwidth messagelayout marginheight messagecomposite setlayout messagelayout messagecomposite setlayoutdata griddata griddata horizontal_align_fill messagecomposite setfont notelabel messagecomposite notelabel settext notelabel setfont jfaceresources getbannerfont notelabel setlayoutdata griddata griddata vertical_align_beginning ipropertychangelistener fontlistener ipropertychangelistener propertychange propertychangeevent jfaceresources banner_font getproperty notelabel setfont jfaceresources getfont jfaceresources banner_font jfaceresources getfontregistry addlistener fontlistener notelabel adddisposelistener disposelistener widgetdisposed disposeevent jfaceresources getfontregistry removelistener fontlistener messagelabel messagecomposite messagelabel settext messagelabel setfont messagecomposite returns the apply button return the apply button protected button get apply button return apply button getapplybutton applybutton returns the restore defaults button return the restore defaults button protected button get defaults button return defaults button getdefaultsbutton defaultsbutton see org eclipse jface dialogs i dialog page perform help public void perform help get control notify listeners swt help new event idialogpage performhelp performhelp getcontrol notifylisteners apply the data to the receiver by default do nothing param data since 3 1 public void apply data object data applydata public void set error message string new message super set error message new message if get container null get container update message seterrormessage newmessage seterrormessage newmessage getcontainer getcontainer updatemessage public void set message string new message int new type super set message new message new type if get container null get container update message setmessage newmessage newtype setmessage newmessage newtype getcontainer getcontainer updatemessage creates a new preference page with an empty title and no image protected preference page this non nls 1 preferencepage creates a new preference page with the given title and no image param title the title of this preference page protected preference page string title super title preferencepage creates a new abstract preference page with the given title and image param title the title of this preference page param image the image for this preference page or code null code if none protected preference page string title image descriptor image super title image preferencepage imagedescriptor computes the size for this page s ui control p the default implementation of this code i preference page code method returns the size set by code set size code if no size has been set but the page has a ui control the framework method code do compute size code is called to compute the size p return the size of the preference page encoded as code new point width height code or code 0 0 code if the page doesn t currently have any ui component public point compute size if size null return size control control get control if control null size do compute size return size return new point 0 0 ipreferencepage setsize docomputesize computesize getcontrol docomputesize contributes additional buttons to the given composite p the default implementation of this framework hook method does nothing subclasses should override this method to contribute buttons to this page s button bar for each button a subclass contributes it must also increase the parent s grid layout number of columns by one that is pre grid layout parent get layout num columns pre p param parent the button bar protected void contribute buttons composite parent gridlayout getlayout numcolumns contributebuttons creates and returns the swt control for the customized body of this preference page under the given parent composite p this framework method must be implemented by concrete subclasses any subclass returning a code composite code object whose code layout code has default margins for example a code grid layout code are expected to set the margins of this code layout code to 0 pixels p param parent the parent composite return the new control gridlayout the code preference page code implementation of this code i dialog page code method creates a description label and button bar for the page it calls code create contents code to create the custom contents of the page p if a subclass that overrides this method creates a code composite code that has a layout with default margins for example a code grid layout code it is expected to set the margins of this code layout code to 0 pixels public void create control composite parent grid data gd composite content new composite parent swt none set control content grid layout layout new grid layout layout margin width 0 layout margin height 0 content set layout layout apply the font on creation for backward compatibility apply dialog font content initialize the dialog units initialize dialog units content description label create description label content if description label null description label set layout data new grid data grid data fill horizontal body create contents content if body null null is not a valid return value but support graceful failure body set layout data new grid data grid data fill both composite button bar new composite content swt none layout new grid layout layout num columns 0 layout margin height 0 layout margin width 0 layout make columns equal width false button bar set layout layout gd new grid data grid data horizontal align end button bar set layout data gd contribute buttons button bar if create default and apply button layout num columns layout num columns 2 string labels j face resources get strings new string defaults apply non nls 2 non nls 1 int width hint convert horizontaldl us to pixels i dialog constants button width defaults button new button button bar swt push defaults button set text labels 0 dialog apply dialog font defaults button grid data data new grid data grid data horizontal align fill point min button size defaults button compute size swt default swt default true data width hint math max width hint min button size x defaults button set layout data data defaults button add selection listener new selection adapter public void widget selected selection event e perform defaults apply button new button button bar swt push apply button set text labels 1 dialog apply dialog font apply button data new grid data grid data horizontal align fill min button size apply button compute size swt default swt default true data width hint math max width hint min button size x apply button set layout data data apply button add selection listener new selection adapter public void widget selected selection event e perform apply apply button set enabled is valid apply dialog font button bar else check if there are any other buttons on the button bar if not throw away the button bar composite otherwise there is an unusually large button bar if button bar get children length 1 button bar dispose preferencepage idialogpage createcontents gridlayout createcontrol griddata setcontrol gridlayout gridlayout marginwidth marginheight setlayout applydialogfont initializedialogunits descriptionlabel createdescriptionlabel descriptionlabel descriptionlabel setlayoutdata griddata griddata fill_horizontal createcontents setlayoutdata griddata griddata fill_both buttonbar gridlayout numcolumns marginheight marginwidth makecolumnsequalwidth buttonbar setlayout griddata griddata horizontal_align_end buttonbar setlayoutdata contributebuttons buttonbar createdefaultandapplybutton numcolumns numcolumns jfaceresources getstrings widthhint converthorizontaldlustopixels idialogconstants button_width defaultsbutton buttonbar defaultsbutton settext applydialogfont defaultsbutton griddata griddata griddata horizontal_align_fill minbuttonsize defaultsbutton computesize widthhint widthhint minbuttonsize defaultsbutton setlayoutdata defaultsbutton addselectionlistener selectionadapter widgetselected selectionevent performdefaults applybutton buttonbar applybutton settext applydialogfont applybutton griddata griddata horizontal_align_fill minbuttonsize applybutton computesize widthhint widthhint minbuttonsize applybutton setlayoutdata applybutton addselectionlistener selectionadapter widgetselected selectionevent performapply applybutton setenabled isvalid applydialogfont buttonbar buttonbar getchildren buttonbar apply the dialog font to the composite and it s children if it is set subclasses may override if they wish to set the font themselves param composite protected void apply dialog font composite composite dialog apply dialog font composite applydialogfont applydialogfont creates and returns an swt label under the given composite param parent the parent composite return the new label protected label create description label composite parent label result null string description get description if description null result new label parent swt wrap result set font parent get font result set text description return result createdescriptionlabel getdescription setfont getfont settext computes the size needed by this page s ui control p all pages should override this method and set the appropriate sizes of their widgets and then call code super do compute size code p return the size of the preference page encoded as code new point width height code protected point do compute size if description label null body null point body size body compute size swt default swt default true grid data gd grid data description label get layout data gd width hint body size x return get control compute size swt default swt default true docomputesize docomputesize descriptionlabel bodysize computesize griddata griddata descriptionlabel getlayoutdata widthhint bodysize getcontrol computesize returns the preference store of this preference page p this is a framework hook method for subclasses to return a page specific preference store the default implementation returns code null code p return the preference store or code null code if none protected i preference store do get preference store return null ipreferencestore dogetpreferencestore returns the container of this page return the preference page container or code null code if this page has yet to be added to a container public i preference page container get container return container ipreferencepagecontainer getcontainer returns the preference store of this preference page return the preference store or code null code if none public i preference store get preference store if preference store null preference store do get preference store if preference store null return preference store else if container null return container get preference store return null ipreferencestore getpreferencestore preferencestore preferencestore dogetpreferencestore preferencestore preferencestore getpreferencestore the preference page implementation of an code i preference page code method returns whether this preference page is valid preference pages are considered valid by default call code set valid false code to make a page invalid public boolean is valid return is valid ipreferencepage setvalid isvalid isvalid suppresses creation of the standard default and apply buttons for this page p subclasses wishing a preference page wihthout these buttons should call this framework method before the page s control has been created p protected void no default and apply button create default and apply button false nodefaultandapplybutton createdefaultandapplybutton the code preference page code implementation of this code i preference page code method returns code true code if the page is valid public boolean ok to leave return is valid preferencepage ipreferencepage oktoleave isvalid performs special processing when this page s apply button has been pressed p this is a framework hook method for sublcasses to do special things when the apply button has been pressed the default implementation of this framework method simply calls code perform ok code to simulate the pressing of the page s ok button p see perform ok protected void perform apply perform ok performok performok performapply performok the preference page implementation of an code i preference page code method performs special processing when this page s cancel button has been pressed p this is a framework hook method for sublcasses to do special things when the cancel button has been pressed the default implementation of this framework method does nothing and returns code true code public boolean perform cancel return true ipreferencepage performcancel performs special processing when this page s defaults button has been pressed p this is a framework hook method for subclasses to do special things when the defaults button has been pressed subclasses may override but should call code super perform defaults code p protected void perform defaults update apply button performdefaults performdefaults updateapplybutton method declared on i preference page subclasses should override public boolean perform ok return true ipreferencepage performok non javadoc method declared on i preference page public void set container i preference page container container this container container ipreferencepage setcontainer ipreferencepagecontainer sets the preference store for this preference page p if preference store is set to null get preference store will invoke do get preference store the next time it is called p param store the preference store or code null code see get preference store public void set preference store i preference store store preference store store preferencestore getpreferencestore dogetpreferencestore getpreferencestore setpreferencestore ipreferencestore preferencestore public void set size point ui size control control get control if control null control set size ui size size ui size setsize uisize getcontrol setsize uisize uisize the code preference page code implementation of this code i dialog page code method extends the code dialog page code implementation to update the preference page container title subclasses may extend public void set title string title super set title title if get container null get container update title preferencepage idialogpage dialogpage settitle settitle getcontainer getcontainer updatetitle sets whether this page is valid the enable state of the container buttons and the apply button is updated when a page s valid state changes p param b the new valid state public void set valid boolean b boolean old value is valid is valid b if old value is valid update container state if get container null get container update buttons update page state update apply button setvalid oldvalue isvalid isvalid oldvalue isvalid getcontainer getcontainer updatebuttons updateapplybutton returns a string suitable for debugging purpose only public string to string return get title tostring gettitle updates the enabled state of the apply button to reflect whether this page is valid protected void update apply button if apply button null apply button set enabled is valid updateapplybutton applybutton applybutton setenabled isvalid creates a composite with a highlighted note entry and a message text this is designed to take up the full width of the page param font the font to use param composite the parent composite param title the title of the note param message the message for the note return the composite for the note protected composite create note composite font font composite composite string title string message composite message composite new composite composite swt none grid layout message layout new grid layout message layout num columns 2 message layout margin width 0 message layout margin height 0 message composite set layout message layout message composite set layout data new grid data grid data horizontal align fill message composite set font font final label note label new label message composite swt bold note label set text title note label set font j face resources get banner font note label set layout data new grid data grid data vertical align beginning final i property change listener font listener new i property change listener public void property change property change event event if j face resources banner font equals event get property note label set font j face resources get font j face resources banner font j face resources get font registry add listener font listener note label add dispose listener new dispose listener public void widget disposed dispose event event j face resources get font registry remove listener font listener label message label new label message composite swt wrap message label set text message message label set font font return message composite createnotecomposite messagecomposite gridlayout messagelayout gridlayout messagelayout numcolumns messagelayout marginwidth messagelayout marginheight messagecomposite setlayout messagelayout messagecomposite setlayoutdata griddata griddata horizontal_align_fill messagecomposite setfont notelabel messagecomposite notelabel settext notelabel setfont jfaceresources getbannerfont notelabel setlayoutdata griddata griddata vertical_align_beginning ipropertychangelistener fontlistener ipropertychangelistener propertychange propertychangeevent jfaceresources banner_font getproperty notelabel setfont jfaceresources getfont jfaceresources banner_font jfaceresources getfontregistry addlistener fontlistener notelabel adddisposelistener disposelistener widgetdisposed disposeevent jfaceresources getfontregistry removelistener fontlistener messagelabel messagecomposite messagelabel settext messagelabel setfont messagecomposite returns the apply button return the apply button protected button get apply button return apply button getapplybutton applybutton returns the restore defaults button return the restore defaults button protected button get defaults button return defaults button getdefaultsbutton defaultsbutton see org eclipse jface dialogs i dialog page perform help public void perform help get control notify listeners swt help new event idialogpage performhelp performhelp getcontrol notifylisteners apply the data to the receiver by default do nothing param data since 3 1 public void apply data object data applydata public void set error message string new message super set error message new message if get container null get container update message seterrormessage newmessage seterrormessage newmessage getcontainer getcontainer updatemessage public void set message string new message int new type super set message new message new type if get container null get container update message setmessage newmessage newtype setmessage newmessage newtype getcontainer getcontainer updatemessage web browser preference constructor comment private web browser preference super webbrowserpreference webbrowserpreference returns the preference store return the preference store protected static i preference store get preference store return web browserui plugin get instance get preference store ipreferencestore getpreferencestore webbrowseruiplugin getinstance getpreferencestore returns the web browser history list return java util list public static list get internal web browser history string temp get preference store get string pref internal web browser history string tokenizer st new string tokenizer temp non nls 1 list l new array list while st has more tokens string s st next token l add s return l getinternalwebbrowserhistory getpreferencestore getstring pref_internal_web_browser_history stringtokenizer stringtokenizer arraylist hasmoretokens nexttoken sets the web browser history param list the history public static void set internal web browser history list list string buffer sb new string buffer if list null iterator iterator list iterator while iterator has next string s string iterator next sb append s sb append non nls 1 get preference store set value pref internal web browser history sb to string web browserui plugin get instance save plugin preferences setinternalwebbrowserhistory stringbuffer stringbuffer hasnext getpreferencestore setvalue pref_internal_web_browser_history tostring webbrowseruiplugin getinstance savepluginpreferences returns whether the internal browser is used by default return true if the internal browser is used by default public static boolean is default use internal browser return web browser util can use internal web browser isdefaultuseinternalbrowser webbrowserutil canuseinternalwebbrowser returns whether the system browser is used by default return true if the system browser is used by default public static boolean is default use system browser return web browser util can use system browser isdefaultusesystembrowser webbrowserutil canusesystembrowser returns whether the internal or external browser is being used return one of code internal code or code external code public static int get browser choice int choice get preference store get int pref browser choice if choice 2 return external if choice internal web browser util can use internal web browser return external return choice getbrowserchoice getpreferencestore getint pref_browser_choice webbrowserutil canuseinternalwebbrowser sets whether the internal system and external browser is used param choice code internal code code system code and code external code public static void set browser choice int choice get preference store set value pref browser choice choice web browserui plugin get instance save plugin preferences update default editor choice setbrowserchoice getpreferencestore setvalue pref_browser_choice webbrowseruiplugin getinstance savepluginpreferences updatedefaulteditor private static void update default editor int choice toggle from internal editor to browser support to avoid confusion between default editors and web browser preference page i editor registry registry platformui get workbench get editor registry string old id choice internal browser support id internal browser id string new id choice internal internal browser id browser support id string extensions a html html a htm htm non nls 1 non nls 2 non nls 3 non nls 4 a shtml shtml non nls 1 non nls 2 for each default editor that matches the old id change the default editor to the new id for int i 0 i extensions length i string ext extensions i i editor descriptor ddesc registry get default editor ext 0 if ddesc null ddesc get id equals old id registry set default editor ext 1 new id updatedefaulteditor ieditorregistry getworkbench geteditorregistry oldid browser_support_id internal_browser_id newid internal_browser_id browser_support_id oldid newid ieditordescriptor getdefaulteditor getid oldid setdefaulteditor newid class reflow scrolled composite extends fallback scrolled composite public reflow scrolled composite composite parent int style super parent style reflowscrolledcomposite fallbackscrolledcomposite reflowscrolledcomposite public void reflow boolean flush cache update width this super reflow flush cache flushcache updatewidth flushcache public browser text composite parent browser viewer viewer throwable ex this viewer viewer this ex ex color bg parent get display get system color swt color list background scomp new reflow scrolled composite parent swt v scroll swt h scroll composite client new composite scomp swt null fill content client bg scomp set content client scomp set background bg browsertext browserviewer getdisplay getsystemcolor color_list_background reflowscrolledcomposite v_scroll h_scroll fillcontent setcontent setbackground private void fill content composite parent color bg grid layout layout new grid layout layout vertical spacing 10 parent set layout layout title new label parent swt wrap title set text messages browsertext title title set font j face resources get header font title set layout data new grid data grid data fill horizontal title set background bg link new link parent swt wrap link set text messages browsertext link link set layout data new grid data grid data fill horizontal link set tool tip text messages browsertext tooltip link add selection listener new selection adapter public void widget selected selection event e busy indicator show while link get display new runnable public void run do open external link set background bg sep new label parent swt separator swt horizontal sep set layout data new grid data grid data fill horizontal ex title new label parent swt null ex title set background bg ex title set font j face resources get banner font ex title set text messages browsertext dtitle ex title set layout data new grid data grid data fill horizontal text new label parent swt wrap text set text messages browsertext text text set layout data new grid data grid data fill horizontal text set background bg button new button parent swt push update button text button add selection listener new selection adapter public void widget selected selection event e toggle exception exception new text parent swt multi load exception text grid data gd new grid data grid data fill both gd exclude true exception set layout data gd fillcontent gridlayout gridlayout verticalspacing setlayout settext browsertext_title setfont jfaceresources getheaderfont setlayoutdata griddata griddata fill_horizontal setbackground settext browsertext_link setlayoutdata griddata griddata fill_horizontal settooltiptext browsertext_tooltip addselectionlistener selectionadapter widgetselected selectionevent busyindicator showwhile getdisplay doopenexternal setbackground setlayoutdata griddata griddata fill_horizontal extitle extitle setbackground extitle setfont jfaceresources getbannerfont extitle settext browsertext_dtitle extitle setlayoutdata griddata griddata fill_horizontal settext browsertext_text setlayoutdata griddata griddata fill_horizontal setbackground updatebuttontext addselectionlistener selectionadapter widgetselected selectionevent toggleexception loadexceptiontext griddata griddata griddata fill_both setlayoutdata private void load exception text string writer swriter new string writer print writer writer new print writer swriter writer println ex get message ex print stack trace writer writer close exception set text swriter to string loadexceptiontext stringwriter stringwriter printwriter printwriter getmessage printstacktrace settext tostring protected void toggle exception expanded expanded update button text grid data gd grid data exception get layout data gd exclude expanded exception set visible expanded refresh toggleexception updatebuttontext griddata griddata getlayoutdata setvisible private void update button text if expanded button set text messages browsertext button collapse else button set text messages browsertext button expand updatebuttontext settext browsertext_button_collapse settext browsertext_button_expand protected void update width composite parent rectangle area parent get client area update width title area width update width text area width update width sep area width update width link area width update width ex title area width update width exception area width updatewidth getclientarea updatewidth updatewidth updatewidth updatewidth updatewidth extitle updatewidth private void update width control c int width grid data gd grid data c get layout data if gd null gd width hint width 10 updatewidth griddata griddata getlayoutdata widthhint protected void do open external i browser viewer container container viewer get container if container null container open in external browser url doopenexternal ibrowserviewercontainer getcontainer openinexternalbrowser public control get control return scomp getcontrol public boolean set url string url this url url return true seturl public void set focus link set focus setfocus setfocus public string get url return url geturl public void refresh scomp reflow true returns the formatted message for the given key in j face s resource bundle param key the resource name param args the message arguments return the string public static string format string key object args return message format format get string key args jface messageformat getstring returns the j face s banner font convenience method equivalent to pre j face resources get font registry get j face resources banner font pre return the font public static font get banner font return get font registry get banner font jface jfaceresources getfontregistry jfaceresources banner_font getbannerfont getfontregistry banner_font returns the resource bundle for j face itself the resouble bundle is obtained from code resource bundle get bundle org eclipse jface jface nls code p note that several static convenience methods are also provided on this class for directly accessing resources in this bundle p return the resource bundle public static resource bundle get bundle return bundle jface resourcebundle getbundle jface_nls resourcebundle getbundle returns the color registry for j face itself p return the code color registry code since 3 0 public static color registry get color registry if color registry null color registry new color registry return color registry jface colorregistry colorregistry getcolorregistry colorregistry colorregistry colorregistry colorregistry returns the global resource manager for the given display since 3 1 param to query display to query return the global resource manager for the given display public static resource manager get resources final display to query resource manager reg resource manager registries get to query if reg null final device resource manager mgr new device resource manager to query reg mgr registries put to query reg to query dispose exec new runnable non javadoc see java lang runnable run public void run mgr dispose registries remove to query return reg toquery resourcemanager getresources toquery resourcemanager resourcemanager toquery deviceresourcemanager deviceresourcemanager toquery toquery toquery disposeexec toquery returns the resource manager for the current display may only be called from a ui thread since 3 1 return the global resource manager for the current display public static resource manager get resources return get resources display get current resourcemanager resourcemanager resourcemanager getresources getresources getcurrent returns the j face s standard font convenience method equivalent to pre j face resources get font registry get j face resources default font pre return the font public static font get default font return get font registry default font jface jfaceresources getfontregistry jfaceresources default_font getdefaultfont getfontregistry defaultfont returns the j face s dialog font convenience method equivalent to pre j face resources get font registry get j face resources dialog font pre return the font public static font get dialog font return get font registry get dialog font jface jfaceresources getfontregistry jfaceresources dialog_font getdialogfont getfontregistry dialog_font returns the font in j face s font registry with the given symbolic font name convenience method equivalent to pre j face resources get font registry get symbolic name pre if an error occurs return the default font param symbolic name the symbolic font name return the font public static font get font string symbolic name return get font registry get symbolic name jface jfaceresources getfontregistry symbolicname symbolicname getfont symbolicname getfontregistry symbolicname returns the font registry for j face itself if the value has not been established by an earlier call to code set font registry code is it initialized to code new font registry org eclipse jface resource jfacefonts code p note that several static convenience methods are also provided on this class for directly accessing j face s standard fonts p public static font registry get font registry if font registry null font registry new font registry org eclipse jface resource jfacefonts non nls 1 return font registry jface setfontregistry fontregistry jface fontregistry getfontregistry fontregistry fontregistry fontregistry fontregistry returns the j face s header font convenience method equivalent to pre j face resources get font registry get j face resources header font pre return the font public static font get header font return get font registry get header font jface jfaceresources getfontregistry jfaceresources header_font getheaderfont getfontregistry header_font returns the image in j face s image registry with the given key or code null code if none convenience method equivalent to pre j face resources get image registry get key pre param key the key return the image or code null code if none public static image get image string key return get image registry get key jface jfaceresources getimageregistry getimage getimageregistry returns the image registry for j face itself p note that the static convenience method code get image code is also provided on this class p public static image registry get image registry if image registry null image registry new image registry get resources display get current return image registry jface getimage imageregistry getimageregistry imageregistry imageregistry imageregistry getresources getcurrent imageregistry returns the resource object with the given key in j face s resource bundle if there isn t any value under the given key the key is returned param key the resource name return the string public static string get string string key try return bundle get string key catch missing resource exception e return key jface getstring getstring missingresourceexception returns a list of string values corresponding to the given list of keys the lookup is done with code get string code the values are in the same order as the keys param keys a list of keys return a list of corresponding string values public static string get strings string keys assert is not null keys int length keys length string result new string length for int i 0 i length i result i get string keys i return result getstring getstrings isnotnull getstring returns the j face s text font convenience method equivalent to pre j face resources get font registry get j face resources text font pre return the font public static font get text font return get font registry get text font jface jfaceresources getfontregistry jfaceresources text_font gettextfont getfontregistry text_font returns the j face s viewer font convenience method equivalent to pre j face resources get font registry get j face resources viewer font pre return the font deprecated this font is not in use public static font get viewer font return get font registry get viewer font jface jfaceresources getfontregistry jfaceresources viewer_font getviewerfont getfontregistry viewer_font sets j face s font registry to the given value this method may only be called once the call must occur before code j face resources get font registry code is invoked either directly or indirectly param registry a font registry public static void set font registry font registry registry assert is true font registry null font registry can only be set once non nls 1 font registry registry jface jfaceresources getfontregistry setfontregistry fontregistry istrue fontregistry fontregistry declare a private constructor to block instantiation private j face resources no op jfaceresources returns the formatted message for the given key in j face s resource bundle param key the resource name param args the message arguments return the string public static string format string key object args return message format format get string key args jface messageformat getstring returns the j face s banner font convenience method equivalent to pre j face resources get font registry get j face resources banner font pre return the font public static font get banner font return get font registry get banner font jface jfaceresources getfontregistry jfaceresources banner_font getbannerfont getfontregistry banner_font returns the resource bundle for j face itself the resouble bundle is obtained from code resource bundle get bundle org eclipse jface jface nls code p note that several static convenience methods are also provided on this class for directly accessing resources in this bundle p return the resource bundle public static resource bundle get bundle return bundle jface resourcebundle getbundle jface_nls resourcebundle getbundle returns the color registry for j face itself p return the code color registry code since 3 0 public static color registry get color registry if color registry null color registry new color registry return color registry jface colorregistry colorregistry getcolorregistry colorregistry colorregistry colorregistry colorregistry returns the global resource manager for the given display since 3 1 param to query display to query return the global resource manager for the given display public static resource manager get resources final display to query resource manager reg resource manager registries get to query if reg null final device resource manager mgr new device resource manager to query reg mgr registries put to query reg to query dispose exec new runnable non javadoc see java lang runnable run public void run mgr dispose registries remove to query return reg toquery resourcemanager getresources toquery resourcemanager resourcemanager toquery deviceresourcemanager deviceresourcemanager toquery toquery toquery disposeexec toquery returns the resource manager for the current display may only be called from a ui thread since 3 1 return the global resource manager for the current display public static resource manager get resources return get resources display get current resourcemanager resourcemanager resourcemanager getresources getresources getcurrent returns the j face s standard font convenience method equivalent to pre j face resources get font registry get j face resources default font pre return the font public static font get default font return get font registry default font jface jfaceresources getfontregistry jfaceresources default_font getdefaultfont getfontregistry defaultfont returns the j face s dialog font convenience method equivalent to pre j face resources get font registry get j face resources dialog font pre return the font public static font get dialog font return get font registry get dialog font jface jfaceresources getfontregistry jfaceresources dialog_font getdialogfont getfontregistry dialog_font returns the font in j face s font registry with the given symbolic font name convenience method equivalent to pre j face resources get font registry get symbolic name pre if an error occurs return the default font param symbolic name the symbolic font name return the font public static font get font string symbolic name return get font registry get symbolic name jface jfaceresources getfontregistry symbolicname symbolicname getfont symbolicname getfontregistry symbolicname returns the font registry for j face itself if the value has not been established by an earlier call to code set font registry code is it initialized to code new font registry org eclipse jface resource jfacefonts code p note that several static convenience methods are also provided on this class for directly accessing j face s standard fonts p public static font registry get font registry if font registry null font registry new font registry org eclipse jface resource jfacefonts non nls 1 return font registry jface setfontregistry fontregistry jface fontregistry getfontregistry fontregistry fontregistry fontregistry fontregistry returns the j face s header font convenience method equivalent to pre j face resources get font registry get j face resources header font pre return the font public static font get header font return get font registry get header font jface jfaceresources getfontregistry jfaceresources header_font getheaderfont getfontregistry header_font returns the image in j face s image registry with the given key or code null code if none convenience method equivalent to pre j face resources get image registry get key pre param key the key return the image or code null code if none public static image get image string key return get image registry get key jface jfaceresources getimageregistry getimage getimageregistry returns the image registry for j face itself p note that the static convenience method code get image code is also provided on this class p public static image registry get image registry if image registry null image registry new image registry get resources display get current return image registry jface getimage imageregistry getimageregistry imageregistry imageregistry imageregistry getresources getcurrent imageregistry returns the resource object with the given key in j face s resource bundle if there isn t any value under the given key the key is returned param key the resource name return the string public static string get string string key try return bundle get string key catch missing resource exception e return key jface getstring getstring missingresourceexception returns a list of string values corresponding to the given list of keys the lookup is done with code get string code the values are in the same order as the keys param keys a list of keys return a list of corresponding string values public static string get strings string keys assert is not null keys int length keys length string result new string length for int i 0 i length i result i get string keys i return result getstring getstrings isnotnull getstring returns the j face s text font convenience method equivalent to pre j face resources get font registry get j face resources text font pre return the font public static font get text font return get font registry get text font jface jfaceresources getfontregistry jfaceresources text_font gettextfont getfontregistry text_font returns the j face s viewer font convenience method equivalent to pre j face resources get font registry get j face resources viewer font pre return the font deprecated this font is not in use public static font get viewer font return get font registry get viewer font jface jfaceresources getfontregistry jfaceresources viewer_font getviewerfont getfontregistry viewer_font sets j face s font registry to the given value this method may only be called once the call must occur before code j face resources get font registry code is invoked either directly or indirectly param registry a font registry public static void set font registry font registry registry assert is true font registry null font registry can only be set once non nls 1 font registry registry jface jfaceresources getfontregistry setfontregistry fontregistry istrue fontregistry fontregistry declare a private constructor to block instantiation private j face resources no op jfaceresources returns the formatted message for the given key in j face s resource bundle param key the resource name param args the message arguments return the string public static string format string key object args return message format format get string key args jface messageformat getstring returns the j face s banner font convenience method equivalent to pre j face resources get font registry get j face resources banner font pre return the font public static font get banner font return get font registry get banner font jface jfaceresources getfontregistry jfaceresources banner_font getbannerfont getfontregistry banner_font returns the resource bundle for j face itself the resouble bundle is obtained from code resource bundle get bundle org eclipse jface jface nls code p note that several static convenience methods are also provided on this class for directly accessing resources in this bundle p return the resource bundle public static resource bundle get bundle return bundle jface resourcebundle getbundle jface_nls resourcebundle getbundle returns the color registry for j face itself p return the code color registry code since 3 0 public static color registry get color registry if color registry null color registry new color registry return color registry jface colorregistry colorregistry getcolorregistry colorregistry colorregistry colorregistry colorregistry returns the global resource manager for the given display since 3 1 param to query display to query return the global resource manager for the given display public static resource manager get resources final display to query resource manager reg resource manager registries get to query if reg null final device resource manager mgr new device resource manager to query reg mgr registries put to query reg to query dispose exec new runnable non javadoc see java lang runnable run public void run mgr dispose registries remove to query return reg toquery resourcemanager getresources toquery resourcemanager resourcemanager toquery deviceresourcemanager deviceresourcemanager toquery toquery toquery disposeexec toquery returns the resource manager for the current display may only be called from a ui thread since 3 1 return the global resource manager for the current display public static resource manager get resources return get resources display get current resourcemanager resourcemanager resourcemanager getresources getresources getcurrent returns the j face s standard font convenience method equivalent to pre j face resources get font registry get j face resources default font pre return the font public static font get default font return get font registry default font jface jfaceresources getfontregistry jfaceresources default_font getdefaultfont getfontregistry defaultfont returns the j face s dialog font convenience method equivalent to pre j face resources get font registry get j face resources dialog font pre return the font public static font get dialog font return get font registry get dialog font jface jfaceresources getfontregistry jfaceresources dialog_font getdialogfont getfontregistry dialog_font returns the font in j face s font registry with the given symbolic font name convenience method equivalent to pre j face resources get font registry get symbolic name pre if an error occurs return the default font param symbolic name the symbolic font name return the font public static font get font string symbolic name return get font registry get symbolic name jface jfaceresources getfontregistry symbolicname symbolicname getfont symbolicname getfontregistry symbolicname returns the font registry for j face itself if the value has not been established by an earlier call to code set font registry code is it initialized to code new font registry org eclipse jface resource jfacefonts code p note that several static convenience methods are also provided on this class for directly accessing j face s standard fonts p public static font registry get font registry if font registry null font registry new font registry org eclipse jface resource jfacefonts non nls 1 return font registry jface setfontregistry fontregistry jface fontregistry getfontregistry fontregistry fontregistry fontregistry fontregistry returns the j face s header font convenience method equivalent to pre j face resources get font registry get j face resources header font pre return the font public static font get header font return get font registry get header font jface jfaceresources getfontregistry jfaceresources header_font getheaderfont getfontregistry header_font returns the image in j face s image registry with the given key or code null code if none convenience method equivalent to pre j face resources get image registry get key pre param key the key return the image or code null code if none public static image get image string key return get image registry get key jface jfaceresources getimageregistry getimage getimageregistry returns the image registry for j face itself p note that the static convenience method code get image code is also provided on this class p public static image registry get image registry if image registry null image registry new image registry get resources display get current return image registry jface getimage imageregistry getimageregistry imageregistry imageregistry imageregistry getresources getcurrent imageregistry returns the resource object with the given key in j face s resource bundle if there isn t any value under the given key the key is returned param key the resource name return the string public static string get string string key try return bundle get string key catch missing resource exception e return key jface getstring getstring missingresourceexception returns a list of string values corresponding to the given list of keys the lookup is done with code get string code the values are in the same order as the keys param keys a list of keys return a list of corresponding string values public static string get strings string keys assert is not null keys int length keys length string result new string length for int i 0 i length i result i get string keys i return result getstring getstrings isnotnull getstring returns the j face s text font convenience method equivalent to pre j face resources get font registry get j face resources text font pre return the font public static font get text font return get font registry get text font jface jfaceresources getfontregistry jfaceresources text_font gettextfont getfontregistry text_font returns the j face s viewer font convenience method equivalent to pre j face resources get font registry get j face resources viewer font pre return the font deprecated this font is not in use public static font get viewer font return get font registry get viewer font jface jfaceresources getfontregistry jfaceresources viewer_font getviewerfont getfontregistry viewer_font sets j face s font registry to the given value this method may only be called once the call must occur before code j face resources get font registry code is invoked either directly or indirectly param registry a font registry public static void set font registry font registry registry assert is true font registry null font registry can only be set once non nls 1 font registry registry jface jfaceresources getfontregistry setfontregistry fontregistry istrue fontregistry fontregistry declare a private constructor to block instantiation private j face resources no op jfaceresources returns the formatted message for the given key in j face s resource bundle param key the resource name param args the message arguments return the string public static string format string key object args return message format format get string key args jface messageformat getstring returns the j face s banner font convenience method equivalent to pre j face resources get font registry get j face resources banner font pre return the font public static font get banner font return get font registry get banner font jface jfaceresources getfontregistry jfaceresources banner_font getbannerfont getfontregistry banner_font returns the resource bundle for j face itself the resouble bundle is obtained from code resource bundle get bundle org eclipse jface jface nls code p note that several static convenience methods are also provided on this class for directly accessing resources in this bundle p return the resource bundle public static resource bundle get bundle return bundle jface resourcebundle getbundle jface_nls resourcebundle getbundle returns the color registry for j face itself p return the code color registry code since 3 0 public static color registry get color registry if color registry null color registry new color registry return color registry jface colorregistry colorregistry getcolorregistry colorregistry colorregistry colorregistry colorregistry returns the global resource manager for the given display since 3 1 param to query display to query return the global resource manager for the given display public static resource manager get resources final display to query resource manager reg resource manager registries get to query if reg null final device resource manager mgr new device resource manager to query reg mgr registries put to query reg to query dispose exec new runnable non javadoc see java lang runnable run public void run mgr dispose registries remove to query return reg toquery resourcemanager getresources toquery resourcemanager resourcemanager toquery deviceresourcemanager deviceresourcemanager toquery toquery toquery disposeexec toquery returns the resource manager for the current display may only be called from a ui thread since 3 1 return the global resource manager for the current display public static resource manager get resources return get resources display get current resourcemanager resourcemanager resourcemanager getresources getresources getcurrent returns the j face s standard font convenience method equivalent to pre j face resources get font registry get j face resources default font pre return the font public static font get default font return get font registry default font jface jfaceresources getfontregistry jfaceresources default_font getdefaultfont getfontregistry defaultfont returns the j face s dialog font convenience method equivalent to pre j face resources get font registry get j face resources dialog font pre return the font public static font get dialog font return get font registry get dialog font jface jfaceresources getfontregistry jfaceresources dialog_font getdialogfont getfontregistry dialog_font returns the font in j face s font registry with the given symbolic font name convenience method equivalent to pre j face resources get font registry get symbolic name pre if an error occurs return the default font param symbolic name the symbolic font name return the font public static font get font string symbolic name return get font registry get symbolic name jface jfaceresources getfontregistry symbolicname symbolicname getfont symbolicname getfontregistry symbolicname returns the font registry for j face itself if the value has not been established by an earlier call to code set font registry code is it initialized to code new font registry org eclipse jface resource jfacefonts code p note that several static convenience methods are also provided on this class for directly accessing j face s standard fonts p public static font registry get font registry if font registry null font registry new font registry org eclipse jface resource jfacefonts non nls 1 return font registry jface setfontregistry fontregistry jface fontregistry getfontregistry fontregistry fontregistry fontregistry fontregistry returns the j face s header font convenience method equivalent to pre j face resources get font registry get j face resources header font pre return the font public static font get header font return get font registry get header font jface jfaceresources getfontregistry jfaceresources header_font getheaderfont getfontregistry header_font returns the image in j face s image registry with the given key or code null code if none convenience method equivalent to pre j face resources get image registry get key pre param key the key return the image or code null code if none public static image get image string key return get image registry get key jface jfaceresources getimageregistry getimage getimageregistry returns the image registry for j face itself p note that the static convenience method code get image code is also provided on this class p public static image registry get image registry if image registry null image registry new image registry get resources display get current return image registry jface getimage imageregistry getimageregistry imageregistry imageregistry imageregistry getresources getcurrent imageregistry returns the resource object with the given key in j face s resource bundle if there isn t any value under the given key the key is returned param key the resource name return the string public static string get string string key try return bundle get string key catch missing resource exception e return key jface getstring getstring missingresourceexception returns a list of string values corresponding to the given list of keys the lookup is done with code get string code the values are in the same order as the keys param keys a list of keys return a list of corresponding string values public static string get strings string keys assert is not null keys int length keys length string result new string length for int i 0 i length i result i get string keys i return result getstring getstrings isnotnull getstring returns the j face s text font convenience method equivalent to pre j face resources get font registry get j face resources text font pre return the font public static font get text font return get font registry get text font jface jfaceresources getfontregistry jfaceresources text_font gettextfont getfontregistry text_font returns the j face s viewer font convenience method equivalent to pre j face resources get font registry get j face resources viewer font pre return the font deprecated this font is not in use public static font get viewer font return get font registry get viewer font jface jfaceresources getfontregistry jfaceresources viewer_font getviewerfont getfontregistry viewer_font sets j face s font registry to the given value this method may only be called once the call must occur before code j face resources get font registry code is invoked either directly or indirectly param registry a font registry public static void set font registry font registry registry assert is true font registry null font registry can only be set once non nls 1 font registry registry jface jfaceresources getfontregistry setfontregistry fontregistry istrue fontregistry fontregistry declare a private constructor to block instantiation private j face resources no op jfaceresources returns the formatted message for the given key in j face s resource bundle param key the resource name param args the message arguments return the string public static string format string key object args return message format format get string key args jface messageformat getstring returns the j face s banner font convenience method equivalent to pre j face resources get font registry get j face resources banner font pre return the font public static font get banner font return get font registry get banner font jface jfaceresources getfontregistry jfaceresources banner_font getbannerfont getfontregistry banner_font returns the resource bundle for j face itself the resouble bundle is obtained from code resource bundle get bundle org eclipse jface jface nls code p note that several static convenience methods are also provided on this class for directly accessing resources in this bundle p return the resource bundle public static resource bundle get bundle return bundle jface resourcebundle getbundle jface_nls resourcebundle getbundle returns the color registry for j face itself p return the code color registry code since 3 0 public static color registry get color registry if color registry null color registry new color registry return color registry jface colorregistry colorregistry getcolorregistry colorregistry colorregistry colorregistry colorregistry returns the global resource manager for the given display since 3 1 param to query display to query return the global resource manager for the given display public static resource manager get resources final display to query resource manager reg resource manager registries get to query if reg null final device resource manager mgr new device resource manager to query reg mgr registries put to query reg to query dispose exec new runnable non javadoc see java lang runnable run public void run mgr dispose registries remove to query return reg toquery resourcemanager getresources toquery resourcemanager resourcemanager toquery deviceresourcemanager deviceresourcemanager toquery toquery toquery disposeexec toquery returns the resource manager for the current display may only be called from a ui thread since 3 1 return the global resource manager for the current display public static resource manager get resources return get resources display get current resourcemanager resourcemanager resourcemanager getresources getresources getcurrent returns the j face s standard font convenience method equivalent to pre j face resources get font registry get j face resources default font pre return the font public static font get default font return get font registry default font jface jfaceresources getfontregistry jfaceresources default_font getdefaultfont getfontregistry defaultfont returns the j face s dialog font convenience method equivalent to pre j face resources get font registry get j face resources dialog font pre return the font public static font get dialog font return get font registry get dialog font jface jfaceresources getfontregistry jfaceresources dialog_font getdialogfont getfontregistry dialog_font returns the font in j face s font registry with the given symbolic font name convenience method equivalent to pre j face resources get font registry get symbolic name pre if an error occurs return the default font param symbolic name the symbolic font name return the font public static font get font string symbolic name return get font registry get symbolic name jface jfaceresources getfontregistry symbolicname symbolicname getfont symbolicname getfontregistry symbolicname returns the font registry for j face itself if the value has not been established by an earlier call to code set font registry code is it initialized to code new font registry org eclipse jface resource jfacefonts code p note that several static convenience methods are also provided on this class for directly accessing j face s standard fonts p public static font registry get font registry if font registry null font registry new font registry org eclipse jface resource jfacefonts non nls 1 return font registry jface setfontregistry fontregistry jface fontregistry getfontregistry fontregistry fontregistry fontregistry fontregistry returns the j face s header font convenience method equivalent to pre j face resources get font registry get j face resources header font pre return the font public static font get header font return get font registry get header font jface jfaceresources getfontregistry jfaceresources header_font getheaderfont getfontregistry header_font returns the image in j face s image registry with the given key or code null code if none convenience method equivalent to pre j face resources get image registry get key pre param key the key return the image or code null code if none public static image get image string key return get image registry get key jface jfaceresources getimageregistry getimage getimageregistry returns the image registry for j face itself p note that the static convenience method code get image code is also provided on this class p public static image registry get image registry if image registry null image registry new image registry get resources display get current return image registry jface getimage imageregistry getimageregistry imageregistry imageregistry imageregistry getresources getcurrent imageregistry returns the resource object with the given key in j face s resource bundle if there isn t any value under the given key the key is returned param key the resource name return the string public static string get string string key try return bundle get string key catch missing resource exception e return key jface getstring getstring missingresourceexception returns a list of string values corresponding to the given list of keys the lookup is done with code get string code the values are in the same order as the keys param keys a list of keys return a list of corresponding string values public static string get strings string keys assert is not null keys int length keys length string result new string length for int i 0 i length i result i get string keys i return result getstring getstrings isnotnull getstring returns the j face s text font convenience method equivalent to pre j face resources get font registry get j face resources text font pre return the font public static font get text font return get font registry get text font jface jfaceresources getfontregistry jfaceresources text_font gettextfont getfontregistry text_font returns the j face s viewer font convenience method equivalent to pre j face resources get font registry get j face resources viewer font pre return the font deprecated this font is not in use public static font get viewer font return get font registry get viewer font jface jfaceresources getfontregistry jfaceresources viewer_font getviewerfont getfontregistry viewer_font sets j face s font registry to the given value this method may only be called once the call must occur before code j face resources get font registry code is invoked either directly or indirectly param registry a font registry public static void set font registry font registry registry assert is true font registry null font registry can only be set once non nls 1 font registry registry jface jfaceresources getfontregistry setfontregistry fontregistry istrue fontregistry fontregistry declare a private constructor to block instantiation private j face resources no op jfaceresources returns the formatted message for the given key in j face s resource bundle param key the resource name param args the message arguments return the string public static string format string key object args return message format format get string key args jface messageformat getstring returns the j face s banner font convenience method equivalent to pre j face resources get font registry get j face resources banner font pre return the font public static font get banner font return get font registry get banner font jface jfaceresources getfontregistry jfaceresources banner_font getbannerfont getfontregistry banner_font returns the resource bundle for j face itself the resouble bundle is obtained from code resource bundle get bundle org eclipse jface jface nls code p note that several static convenience methods are also provided on this class for directly accessing resources in this bundle p return the resource bundle public static resource bundle get bundle return bundle jface resourcebundle getbundle jface_nls resourcebundle getbundle returns the color registry for j face itself p return the code color registry code since 3 0 public static color registry get color registry if color registry null color registry new color registry return color registry jface colorregistry colorregistry getcolorregistry colorregistry colorregistry colorregistry colorregistry returns the global resource manager for the given display since 3 1 param to query display to query return the global resource manager for the given display public static resource manager get resources final display to query resource manager reg resource manager registries get to query if reg null final device resource manager mgr new device resource manager to query reg mgr registries put to query reg to query dispose exec new runnable non javadoc see java lang runnable run public void run mgr dispose registries remove to query return reg toquery resourcemanager getresources toquery resourcemanager resourcemanager toquery deviceresourcemanager deviceresourcemanager toquery toquery toquery disposeexec toquery returns the resource manager for the current display may only be called from a ui thread since 3 1 return the global resource manager for the current display public static resource manager get resources return get resources display get current resourcemanager resourcemanager resourcemanager getresources getresources getcurrent returns the j face s standard font convenience method equivalent to pre j face resources get font registry get j face resources default font pre return the font public static font get default font return get font registry default font jface jfaceresources getfontregistry jfaceresources default_font getdefaultfont getfontregistry defaultfont returns the j face s dialog font convenience method equivalent to pre j face resources get font registry get j face resources dialog font pre return the font public static font get dialog font return get font registry get dialog font jface jfaceresources getfontregistry jfaceresources dialog_font getdialogfont getfontregistry dialog_font returns the font in j face s font registry with the given symbolic font name convenience method equivalent to pre j face resources get font registry get symbolic name pre if an error occurs return the default font param symbolic name the symbolic font name return the font public static font get font string symbolic name return get font registry get symbolic name jface jfaceresources getfontregistry symbolicname symbolicname getfont symbolicname getfontregistry symbolicname returns the font registry for j face itself if the value has not been established by an earlier call to code set font registry code is it initialized to code new font registry org eclipse jface resource jfacefonts code p note that several static convenience methods are also provided on this class for directly accessing j face s standard fonts p public static font registry get font registry if font registry null font registry new font registry org eclipse jface resource jfacefonts non nls 1 return font registry jface setfontregistry fontregistry jface fontregistry getfontregistry fontregistry fontregistry fontregistry fontregistry returns the j face s header font convenience method equivalent to pre j face resources get font registry get j face resources header font pre return the font public static font get header font return get font registry get header font jface jfaceresources getfontregistry jfaceresources header_font getheaderfont getfontregistry header_font returns the image in j face s image registry with the given key or code null code if none convenience method equivalent to pre j face resources get image registry get key pre param key the key return the image or code null code if none public static image get image string key return get image registry get key jface jfaceresources getimageregistry getimage getimageregistry returns the image registry for j face itself p note that the static convenience method code get image code is also provided on this class p public static image registry get image registry if image registry null image registry new image registry get resources display get current return image registry jface getimage imageregistry getimageregistry imageregistry imageregistry imageregistry getresources getcurrent imageregistry returns the resource object with the given key in j face s resource bundle if there isn t any value under the given key the key is returned param key the resource name return the string public static string get string string key try return bundle get string key catch missing resource exception e return key jface getstring getstring missingresourceexception returns a list of string values corresponding to the given list of keys the lookup is done with code get string code the values are in the same order as the keys param keys a list of keys return a list of corresponding string values public static string get strings string keys assert is not null keys int length keys length string result new string length for int i 0 i length i result i get string keys i return result getstring getstrings isnotnull getstring returns the j face s text font convenience method equivalent to pre j face resources get font registry get j face resources text font pre return the font public static font get text font return get font registry get text font jface jfaceresources getfontregistry jfaceresources text_font gettextfont getfontregistry text_font returns the j face s viewer font convenience method equivalent to pre j face resources get font registry get j face resources viewer font pre return the font deprecated this font is not in use public static font get viewer font return get font registry get viewer font jface jfaceresources getfontregistry jfaceresources viewer_font getviewerfont getfontregistry viewer_font sets j face s font registry to the given value this method may only be called once the call must occur before code j face resources get font registry code is invoked either directly or indirectly param registry a font registry public static void set font registry font registry registry assert is true font registry null font registry can only be set once non nls 1 font registry registry jface jfaceresources getfontregistry setfontregistry fontregistry istrue fontregistry fontregistry declare a private constructor to block instantiation private j face resources no op jfaceresources returns the formatted message for the given key in j face s resource bundle param key the resource name param args the message arguments return the string public static string format string key object args return message format format get string key args jface messageformat getstring returns the j face s banner font convenience method equivalent to pre j face resources get font registry get j face resources banner font pre return the font public static font get banner font return get font registry get banner font jface jfaceresources getfontregistry jfaceresources banner_font getbannerfont getfontregistry banner_font returns the resource bundle for j face itself the resouble bundle is obtained from code resource bundle get bundle org eclipse jface jface nls code p note that several static convenience methods are also provided on this class for directly accessing resources in this bundle p return the resource bundle public static resource bundle get bundle return bundle jface resourcebundle getbundle jface_nls resourcebundle getbundle returns the color registry for j face itself p return the code color registry code since 3 0 public static color registry get color registry if color registry null color registry new color registry return color registry jface colorregistry colorregistry getcolorregistry colorregistry colorregistry colorregistry colorregistry returns the global resource manager for the given display since 3 1 param to query display to query return the global resource manager for the given display public static resource manager get resources final display to query resource manager reg resource manager registries get to query if reg null final device resource manager mgr new device resource manager to query reg mgr registries put to query reg to query dispose exec new runnable non javadoc see java lang runnable run public void run mgr dispose registries remove to query return reg toquery resourcemanager getresources toquery resourcemanager resourcemanager toquery deviceresourcemanager deviceresourcemanager toquery toquery toquery disposeexec toquery returns the resource manager for the current display may only be called from a ui thread since 3 1 return the global resource manager for the current display public static resource manager get resources return get resources display get current resourcemanager resourcemanager resourcemanager getresources getresources getcurrent returns the j face s standard font convenience method equivalent to pre j face resources get font registry get j face resources default font pre return the font public static font get default font return get font registry default font jface jfaceresources getfontregistry jfaceresources default_font getdefaultfont getfontregistry defaultfont returns the j face s dialog font convenience method equivalent to pre j face resources get font registry get j face resources dialog font pre return the font public static font get dialog font return get font registry get dialog font jface jfaceresources getfontregistry jfaceresources dialog_font getdialogfont getfontregistry dialog_font returns the font in j face s font registry with the given symbolic font name convenience method equivalent to pre j face resources get font registry get symbolic name pre if an error occurs return the default font param symbolic name the symbolic font name return the font public static font get font string symbolic name return get font registry get symbolic name jface jfaceresources getfontregistry symbolicname symbolicname getfont symbolicname getfontregistry symbolicname returns the font registry for j face itself if the value has not been established by an earlier call to code set font registry code is it initialized to code new font registry org eclipse jface resource jfacefonts code p note that several static convenience methods are also provided on this class for directly accessing j face s standard fonts p public static font registry get font registry if font registry null font registry new font registry org eclipse jface resource jfacefonts non nls 1 return font registry jface setfontregistry fontregistry jface fontregistry getfontregistry fontregistry fontregistry fontregistry fontregistry returns the j face s header font convenience method equivalent to pre j face resources get font registry get j face resources header font pre return the font public static font get header font return get font registry get header font jface jfaceresources getfontregistry jfaceresources header_font getheaderfont getfontregistry header_font returns the image in j face s image registry with the given key or code null code if none convenience method equivalent to pre j face resources get image registry get key pre param key the key return the image or code null code if none public static image get image string key return get image registry get key jface jfaceresources getimageregistry getimage getimageregistry returns the image registry for j face itself p note that the static convenience method code get image code is also provided on this class p public static image registry get image registry if image registry null image registry new image registry get resources display get current return image registry jface getimage imageregistry getimageregistry imageregistry imageregistry imageregistry getresources getcurrent imageregistry returns the resource object with the given key in j face s resource bundle if there isn t any value under the given key the key is returned param key the resource name return the string public static string get string string key try return bundle get string key catch missing resource exception e return key jface getstring getstring missingresourceexception returns a list of string values corresponding to the given list of keys the lookup is done with code get string code the values are in the same order as the keys param keys a list of keys return a list of corresponding string values public static string get strings string keys assert is not null keys int length keys length string result new string length for int i 0 i length i result i get string keys i return result getstring getstrings isnotnull getstring returns the j face s text font convenience method equivalent to pre j face resources get font registry get j face resources text font pre return the font public static font get text font return get font registry get text font jface jfaceresources getfontregistry jfaceresources text_font gettextfont getfontregistry text_font returns the j face s viewer font convenience method equivalent to pre j face resources get font registry get j face resources viewer font pre return the font deprecated this font is not in use public static font get viewer font return get font registry get viewer font jface jfaceresources getfontregistry jfaceresources viewer_font getviewerfont getfontregistry viewer_font sets j face s font registry to the given value this method may only be called once the call must occur before code j face resources get font registry code is invoked either directly or indirectly param registry a font registry public static void set font registry font registry registry assert is true font registry null font registry can only be set once non nls 1 font registry registry jface jfaceresources getfontregistry setfontregistry fontregistry istrue fontregistry fontregistry declare a private constructor to block instantiation private j face resources no op jfaceresources returns the formatted message for the given key in j face s resource bundle param key the resource name param args the message arguments return the string public static string format string key object args return message format format get string key args jface messageformat getstring returns the j face s banner font convenience method equivalent to pre j face resources get font registry get j face resources banner font pre return the font public static font get banner font return get font registry get banner font jface jfaceresources getfontregistry jfaceresources banner_font getbannerfont getfontregistry banner_font returns the resource bundle for j face itself the resouble bundle is obtained from code resource bundle get bundle org eclipse jface jface nls code p note that several static convenience methods are also provided on this class for directly accessing resources in this bundle p return the resource bundle public static resource bundle get bundle return bundle jface resourcebundle getbundle jface_nls resourcebundle getbundle returns the color registry for j face itself p return the code color registry code since 3 0 public static color registry get color registry if color registry null color registry new color registry return color registry jface colorregistry colorregistry getcolorregistry colorregistry colorregistry colorregistry colorregistry returns the global resource manager for the given display since 3 1 param to query display to query return the global resource manager for the given display public static resource manager get resources final display to query resource manager reg resource manager registries get to query if reg null final device resource manager mgr new device resource manager to query reg mgr registries put to query reg to query dispose exec new runnable non javadoc see java lang runnable run public void run mgr dispose registries remove to query return reg toquery resourcemanager getresources toquery resourcemanager resourcemanager toquery deviceresourcemanager deviceresourcemanager toquery toquery toquery disposeexec toquery returns the resource manager for the current display may only be called from a ui thread since 3 1 return the global resource manager for the current display public static resource manager get resources return get resources display get current resourcemanager resourcemanager resourcemanager getresources getresources getcurrent returns the j face s standard font convenience method equivalent to pre j face resources get font registry get j face resources default font pre return the font public static font get default font return get font registry default font jface jfaceresources getfontregistry jfaceresources default_font getdefaultfont getfontregistry defaultfont returns the j face s dialog font convenience method equivalent to pre j face resources get font registry get j face resources dialog font pre return the font public static font get dialog font return get font registry get dialog font jface jfaceresources getfontregistry jfaceresources dialog_font getdialogfont getfontregistry dialog_font returns the font in j face s font registry with the given symbolic font name convenience method equivalent to pre j face resources get font registry get symbolic name pre if an error occurs return the default font param symbolic name the symbolic font name return the font public static font get font string symbolic name return get font registry get symbolic name jface jfaceresources getfontregistry symbolicname symbolicname getfont symbolicname getfontregistry symbolicname returns the font registry for j face itself if the value has not been established by an earlier call to code set font registry code is it initialized to code new font registry org eclipse jface resource jfacefonts code p note that several static convenience methods are also provided on this class for directly accessing j face s standard fonts p public static font registry get font registry if font registry null font registry new font registry org eclipse jface resource jfacefonts non nls 1 return font registry jface setfontregistry fontregistry jface fontregistry getfontregistry fontregistry fontregistry fontregistry fontregistry returns the j face s header font convenience method equivalent to pre j face resources get font registry get j face resources header font pre return the font public static font get header font return get font registry get header font jface jfaceresources getfontregistry jfaceresources header_font getheaderfont getfontregistry header_font returns the image in j face s image registry with the given key or code null code if none convenience method equivalent to pre j face resources get image registry get key pre param key the key return the image or code null code if none public static image get image string key return get image registry get key jface jfaceresources getimageregistry getimage getimageregistry returns the image registry for j face itself p note that the static convenience method code get image code is also provided on this class p public static image registry get image registry if image registry null image registry new image registry get resources display get current return image registry jface getimage imageregistry getimageregistry imageregistry imageregistry imageregistry getresources getcurrent imageregistry returns the resource object with the given key in j face s resource bundle if there isn t any value under the given key the key is returned param key the resource name return the string public static string get string string key try return bundle get string key catch missing resource exception e return key jface getstring getstring missingresourceexception returns a list of string values corresponding to the given list of keys the lookup is done with code get string code the values are in the same order as the keys param keys a list of keys return a list of corresponding string values public static string get strings string keys assert is not null keys int length keys length string result new string length for int i 0 i length i result i get string keys i return result getstring getstrings isnotnull getstring returns the j face s text font convenience method equivalent to pre j face resources get font registry get j face resources text font pre return the font public static font get text font return get font registry get text font jface jfaceresources getfontregistry jfaceresources text_font gettextfont getfontregistry text_font returns the j face s viewer font convenience method equivalent to pre j face resources get font registry get j face resources viewer font pre return the font deprecated this font is not in use public static font get viewer font return get font registry get viewer font jface jfaceresources getfontregistry jfaceresources viewer_font getviewerfont getfontregistry viewer_font sets j face s font registry to the given value this method may only be called once the call must occur before code j face resources get font registry code is invoked either directly or indirectly param registry a font registry public static void set font registry font registry registry assert is true font registry null font registry can only be set once non nls 1 font registry registry jface jfaceresources getfontregistry setfontregistry fontregistry istrue fontregistry fontregistry declare a private constructor to block instantiation private j face resources no op jfaceresources returns the formatted message for the given key in j face s resource bundle param key the resource name param args the message arguments return the string public static string format string key object args return message format format get string key args jface messageformat getstring returns the j face s banner font convenience method equivalent to pre j face resources get font registry get j face resources banner font pre return the font public static font get banner font return get font registry get banner font jface jfaceresources getfontregistry jfaceresources banner_font getbannerfont getfontregistry banner_font returns the resource bundle for j face itself the resouble bundle is obtained from code resource bundle get bundle org eclipse jface jface nls code p note that several static convenience methods are also provided on this class for directly accessing resources in this bundle p return the resource bundle public static resource bundle get bundle return bundle jface resourcebundle getbundle jface_nls resourcebundle getbundle returns the color registry for j face itself p return the code color registry code since 3 0 public static color registry get color registry if color registry null color registry new color registry return color registry jface colorregistry colorregistry getcolorregistry colorregistry colorregistry colorregistry colorregistry returns the global resource manager for the given display since 3 1 param to query display to query return the global resource manager for the given display public static resource manager get resources final display to query resource manager reg resource manager registries get to query if reg null final device resource manager mgr new device resource manager to query reg mgr registries put to query reg to query dispose exec new runnable non javadoc see java lang runnable run public void run mgr dispose registries remove to query return reg toquery resourcemanager getresources toquery resourcemanager resourcemanager toquery deviceresourcemanager deviceresourcemanager toquery toquery toquery disposeexec toquery returns the resource manager for the current display may only be called from a ui thread since 3 1 return the global resource manager for the current display public static resource manager get resources return get resources display get current resourcemanager resourcemanager resourcemanager getresources getresources getcurrent returns the j face s standard font convenience method equivalent to pre j face resources get font registry get j face resources default font pre return the font public static font get default font return get font registry default font jface jfaceresources getfontregistry jfaceresources default_font getdefaultfont getfontregistry defaultfont returns the j face s dialog font convenience method equivalent to pre j face resources get font registry get j face resources dialog font pre return the font public static font get dialog font return get font registry get dialog font jface jfaceresources getfontregistry jfaceresources dialog_font getdialogfont getfontregistry dialog_font returns the font in j face s font registry with the given symbolic font name convenience method equivalent to pre j face resources get font registry get symbolic name pre if an error occurs return the default font param symbolic name the symbolic font name return the font public static font get font string symbolic name return get font registry get symbolic name jface jfaceresources getfontregistry symbolicname symbolicname getfont symbolicname getfontregistry symbolicname returns the font registry for j face itself if the value has not been established by an earlier call to code set font registry code is it initialized to code new font registry org eclipse jface resource jfacefonts code p note that several static convenience methods are also provided on this class for directly accessing j face s standard fonts p public static font registry get font registry if font registry null font registry new font registry org eclipse jface resource jfacefonts non nls 1 return font registry jface setfontregistry fontregistry jface fontregistry getfontregistry fontregistry fontregistry fontregistry fontregistry returns the j face s header font convenience method equivalent to pre j face resources get font registry get j face resources header font pre return the font public static font get header font return get font registry get header font jface jfaceresources getfontregistry jfaceresources header_font getheaderfont getfontregistry header_font returns the image in j face s image registry with the given key or code null code if none convenience method equivalent to pre j face resources get image registry get key pre param key the key return the image or code null code if none public static image get image string key return get image registry get key jface jfaceresources getimageregistry getimage getimageregistry returns the image registry for j face itself p note that the static convenience method code get image code is also provided on this class p public static image registry get image registry if image registry null image registry new image registry get resources display get current return image registry jface getimage imageregistry getimageregistry imageregistry imageregistry imageregistry getresources getcurrent imageregistry returns the resource object with the given key in j face s resource bundle if there isn t any value under the given key the key is returned param key the resource name return the string public static string get string string key try return bundle get string key catch missing resource exception e return key jface getstring getstring missingresourceexception returns a list of string values corresponding to the given list of keys the lookup is done with code get string code the values are in the same order as the keys param keys a list of keys return a list of corresponding string values public static string get strings string keys assert is not null keys int length keys length string result new string length for int i 0 i length i result i get string keys i return result getstring getstrings isnotnull getstring returns the j face s text font convenience method equivalent to pre j face resources get font registry get j face resources text font pre return the font public static font get text font return get font registry get text font jface jfaceresources getfontregistry jfaceresources text_font gettextfont getfontregistry text_font returns the j face s viewer font convenience method equivalent to pre j face resources get font registry get j face resources viewer font pre return the font deprecated this font is not in use public static font get viewer font return get font registry get viewer font jface jfaceresources getfontregistry jfaceresources viewer_font getviewerfont getfontregistry viewer_font sets j face s font registry to the given value this method may only be called once the call must occur before code j face resources get font registry code is invoked either directly or indirectly param registry a font registry public static void set font registry font registry registry assert is true font registry null font registry can only be set once non nls 1 font registry registry jface jfaceresources getfontregistry setfontregistry fontregistry istrue fontregistry fontregistry declare a private constructor to block instantiation private j face resources no op jfaceresources returns the formatted message for the given key in j face s resource bundle param key the resource name param args the message arguments return the string public static string format string key object args return message format format get string key args jface messageformat getstring returns the j face s banner font convenience method equivalent to pre j face resources get font registry get j face resources banner font pre return the font public static font get banner font return get font registry get banner font jface jfaceresources getfontregistry jfaceresources banner_font getbannerfont getfontregistry banner_font returns the resource bundle for j face itself the resouble bundle is obtained from code resource bundle get bundle org eclipse jface jface nls code p note that several static convenience methods are also provided on this class for directly accessing resources in this bundle p return the resource bundle public static resource bundle get bundle return bundle jface resourcebundle getbundle jface_nls resourcebundle getbundle returns the color registry for j face itself p return the code color registry code since 3 0 public static color registry get color registry if color registry null color registry new color registry return color registry jface colorregistry colorregistry getcolorregistry colorregistry colorregistry colorregistry colorregistry returns the global resource manager for the given display since 3 1 param to query display to query return the global resource manager for the given display public static resource manager get resources final display to query resource manager reg resource manager registries get to query if reg null final device resource manager mgr new device resource manager to query reg mgr registries put to query reg to query dispose exec new runnable non javadoc see java lang runnable run public void run mgr dispose registries remove to query return reg toquery resourcemanager getresources toquery resourcemanager resourcemanager toquery deviceresourcemanager deviceresourcemanager toquery toquery toquery disposeexec toquery returns the resource manager for the current display may only be called from a ui thread since 3 1 return the global resource manager for the current display public static resource manager get resources return get resources display get current resourcemanager resourcemanager resourcemanager getresources getresources getcurrent returns the j face s standard font convenience method equivalent to pre j face resources get font registry get j face resources default font pre return the font public static font get default font return get font registry default font jface jfaceresources getfontregistry jfaceresources default_font getdefaultfont getfontregistry defaultfont returns the j face s dialog font convenience method equivalent to pre j face resources get font registry get j face resources dialog font pre return the font public static font get dialog font return get font registry get dialog font jface jfaceresources getfontregistry jfaceresources dialog_font getdialogfont getfontregistry dialog_font returns the font in j face s font registry with the given symbolic font name convenience method equivalent to pre j face resources get font registry get symbolic name pre if an error occurs return the default font param symbolic name the symbolic font name return the font public static font get font string symbolic name return get font registry get symbolic name jface jfaceresources getfontregistry symbolicname symbolicname getfont symbolicname getfontregistry symbolicname returns the font registry for j face itself if the value has not been established by an earlier call to code set font registry code is it initialized to code new font registry org eclipse jface resource jfacefonts code p note that several static convenience methods are also provided on this class for directly accessing j face s standard fonts p public static font registry get font registry if font registry null font registry new font registry org eclipse jface resource jfacefonts non nls 1 return font registry jface setfontregistry fontregistry jface fontregistry getfontregistry fontregistry fontregistry fontregistry fontregistry returns the j face s header font convenience method equivalent to pre j face resources get font registry get j face resources header font pre return the font public static font get header font return get font registry get header font jface jfaceresources getfontregistry jfaceresources header_font getheaderfont getfontregistry header_font returns the image in j face s image registry with the given key or code null code if none convenience method equivalent to pre j face resources get image registry get key pre param key the key return the image or code null code if none public static image get image string key return get image registry get key jface jfaceresources getimageregistry getimage getimageregistry returns the image registry for j face itself p note that the static convenience method code get image code is also provided on this class p public static image registry get image registry if image registry null image registry new image registry get resources display get current return image registry jface getimage imageregistry getimageregistry imageregistry imageregistry imageregistry getresources getcurrent imageregistry returns the resource object with the given key in j face s resource bundle if there isn t any value under the given key the key is returned param key the resource name return the string public static string get string string key try return bundle get string key catch missing resource exception e return key jface getstring getstring missingresourceexception returns a list of string values corresponding to the given list of keys the lookup is done with code get string code the values are in the same order as the keys param keys a list of keys return a list of corresponding string values public static string get strings string keys assert is not null keys int length keys length string result new string length for int i 0 i length i result i get string keys i return result getstring getstrings isnotnull getstring returns the j face s text font convenience method equivalent to pre j face resources get font registry get j face resources text font pre return the font public static font get text font return get font registry get text font jface jfaceresources getfontregistry jfaceresources text_font gettextfont getfontregistry text_font returns the j face s viewer font convenience method equivalent to pre j face resources get font registry get j face resources viewer font pre return the font deprecated this font is not in use public static font get viewer font return get font registry get viewer font jface jfaceresources getfontregistry jfaceresources viewer_font getviewerfont getfontregistry viewer_font sets j face s font registry to the given value this method may only be called once the call must occur before code j face resources get font registry code is invoked either directly or indirectly param registry a font registry public static void set font registry font registry registry assert is true font registry null font registry can only be set once non nls 1 font registry registry jface jfaceresources getfontregistry setfontregistry fontregistry istrue fontregistry fontregistry declare a private constructor to block instantiation private j face resources no op jfaceresources returns the formatted message for the given key in j face s resource bundle param key the resource name param args the message arguments return the string public static string format string key object args return message format format get string key args jface messageformat getstring returns the j face s banner font convenience method equivalent to pre j face resources get font registry get j face resources banner font pre return the font public static font get banner font return get font registry get banner font jface jfaceresources getfontregistry jfaceresources banner_font getbannerfont getfontregistry banner_font returns the resource bundle for j face itself the resouble bundle is obtained from code resource bundle get bundle org eclipse jface jface nls code p note that several static convenience methods are also provided on this class for directly accessing resources in this bundle p return the resource bundle public static resource bundle get bundle return bundle jface resourcebundle getbundle jface_nls resourcebundle getbundle returns the color registry for j face itself p return the code color registry code since 3 0 public static color registry get color registry if color registry null color registry new color registry return color registry jface colorregistry colorregistry getcolorregistry colorregistry colorregistry colorregistry colorregistry returns the global resource manager for the given display since 3 1 param to query display to query return the global resource manager for the given display public static resource manager get resources final display to query resource manager reg resource manager registries get to query if reg null final device resource manager mgr new device resource manager to query reg mgr registries put to query reg to query dispose exec new runnable non javadoc see java lang runnable run public void run mgr dispose registries remove to query return reg toquery resourcemanager getresources toquery resourcemanager resourcemanager toquery deviceresourcemanager deviceresourcemanager toquery toquery toquery disposeexec toquery returns the resource manager for the current display may only be called from a ui thread since 3 1 return the global resource manager for the current display public static resource manager get resources return get resources display get current resourcemanager resourcemanager resourcemanager getresources getresources getcurrent returns the j face s standard font convenience method equivalent to pre j face resources get font registry get j face resources default font pre return the font public static font get default font return get font registry default font jface jfaceresources getfontregistry jfaceresources default_font getdefaultfont getfontregistry defaultfont returns the j face s dialog font convenience method equivalent to pre j face resources get font registry get j face resources dialog font pre return the font public static font get dialog font return get font registry get dialog font jface jfaceresources getfontregistry jfaceresources dialog_font getdialogfont getfontregistry dialog_font returns the font in j face s font registry with the given symbolic font name convenience method equivalent to pre j face resources get font registry get symbolic name pre if an error occurs return the default font param symbolic name the symbolic font name return the font public static font get font string symbolic name return get font registry get symbolic name jface jfaceresources getfontregistry symbolicname symbolicname getfont symbolicname getfontregistry symbolicname returns the font registry for j face itself if the value has not been established by an earlier call to code set font registry code is it initialized to code new font registry org eclipse jface resource jfacefonts code p note that several static convenience methods are also provided on this class for directly accessing j face s standard fonts p public static font registry get font registry if font registry null font registry new font registry org eclipse jface resource jfacefonts non nls 1 return font registry jface setfontregistry fontregistry jface fontregistry getfontregistry fontregistry fontregistry fontregistry fontregistry returns the j face s header font convenience method equivalent to pre j face resources get font registry get j face resources header font pre return the font public static font get header font return get font registry get header font jface jfaceresources getfontregistry jfaceresources header_font getheaderfont getfontregistry header_font returns the image in j face s image registry with the given key or code null code if none convenience method equivalent to pre j face resources get image registry get key pre param key the key return the image or code null code if none public static image get image string key return get image registry get key jface jfaceresources getimageregistry getimage getimageregistry returns the image registry for j face itself p note that the static convenience method code get image code is also provided on this class p public static image registry get image registry if image registry null image registry new image registry get resources display get current return image registry jface getimage imageregistry getimageregistry imageregistry imageregistry imageregistry getresources getcurrent imageregistry returns the resource object with the given key in j face s resource bundle if there isn t any value under the given key the key is returned param key the resource name return the string public static string get string string key try return bundle get string key catch missing resource exception e return key jface getstring getstring missingresourceexception returns a list of string values corresponding to the given list of keys the lookup is done with code get string code the values are in the same order as the keys param keys a list of keys return a list of corresponding string values public static string get strings string keys assert is not null keys int length keys length string result new string length for int i 0 i length i result i get string keys i return result getstring getstrings isnotnull getstring returns the j face s text font convenience method equivalent to pre j face resources get font registry get j face resources text font pre return the font public static font get text font return get font registry get text font jface jfaceresources getfontregistry jfaceresources text_font gettextfont getfontregistry text_font returns the j face s viewer font convenience method equivalent to pre j face resources get font registry get j face resources viewer font pre return the font deprecated this font is not in use public static font get viewer font return get font registry get viewer font jface jfaceresources getfontregistry jfaceresources viewer_font getviewerfont getfontregistry viewer_font sets j face s font registry to the given value this method may only be called once the call must occur before code j face resources get font registry code is invoked either directly or indirectly param registry a font registry public static void set font registry font registry registry assert is true font registry null font registry can only be set once non nls 1 font registry registry jface jfaceresources getfontregistry setfontregistry fontregistry istrue fontregistry fontregistry declare a private constructor to block instantiation private j face resources no op jfaceresources returns the formatted message for the given key in j face s resource bundle param key the resource name param args the message arguments return the string public static string format string key object args return message format format get string key args jface messageformat getstring returns the j face s banner font convenience method equivalent to pre j face resources get font registry get j face resources banner font pre return the font public static font get banner font return get font registry get banner font jface jfaceresources getfontregistry jfaceresources banner_font getbannerfont getfontregistry banner_font returns the resource bundle for j face itself the resouble bundle is obtained from code resource bundle get bundle org eclipse jface jface nls code p note that several static convenience methods are also provided on this class for directly accessing resources in this bundle p return the resource bundle public static resource bundle get bundle return bundle jface resourcebundle getbundle jface_nls resourcebundle getbundle returns the color registry for j face itself p return the code color registry code since 3 0 public static color registry get color registry if color registry null color registry new color registry return color registry jface colorregistry colorregistry getcolorregistry colorregistry colorregistry colorregistry colorregistry returns the global resource manager for the given display since 3 1 param to query display to query return the global resource manager for the given display public static resource manager get resources final display to query resource manager reg resource manager registries get to query if reg null final device resource manager mgr new device resource manager to query reg mgr registries put to query reg to query dispose exec new runnable non javadoc see java lang runnable run public void run mgr dispose registries remove to query return reg toquery resourcemanager getresources toquery resourcemanager resourcemanager toquery deviceresourcemanager deviceresourcemanager toquery toquery toquery disposeexec toquery see java lang runnable run public void run mgr dispose registries remove to query toquery returns the resource manager for the current display may only be called from a ui thread since 3 1 return the global resource manager for the current display public static resource manager get resources return get resources display get current resourcemanager resourcemanager resourcemanager getresources getresources getcurrent returns the j face s standard font convenience method equivalent to pre j face resources get font registry get j face resources default font pre return the font public static font get default font return get font registry default font jface jfaceresources getfontregistry jfaceresources default_font getdefaultfont getfontregistry defaultfont returns the j face s dialog font convenience method equivalent to pre j face resources get font registry get j face resources dialog font pre return the font public static font get dialog font return get font registry get dialog font jface jfaceresources getfontregistry jfaceresources dialog_font getdialogfont getfontregistry dialog_font returns the font in j face s font registry with the given symbolic font name convenience method equivalent to pre j face resources get font registry get symbolic name pre if an error occurs return the default font param symbolic name the symbolic font name return the font public static font get font string symbolic name return get font registry get symbolic name jface jfaceresources getfontregistry symbolicname symbolicname getfont symbolicname getfontregistry symbolicname returns the font registry for j face itself if the value has not been established by an earlier call to code set font registry code is it initialized to code new font registry org eclipse jface resource jfacefonts code p note that several static convenience methods are also provided on this class for directly accessing j face s standard fonts p public static font registry get font registry if font registry null font registry new font registry org eclipse jface resource jfacefonts non nls 1 return font registry jface setfontregistry fontregistry jface fontregistry getfontregistry fontregistry fontregistry fontregistry fontregistry returns the j face s header font convenience method equivalent to pre j face resources get font registry get j face resources header font pre return the font public static font get header font return get font registry get header font jface jfaceresources getfontregistry jfaceresources header_font getheaderfont getfontregistry header_font returns the image in j face s image registry with the given key or code null code if none convenience method equivalent to pre j face resources get image registry get key pre param key the key return the image or code null code if none public static image get image string key return get image registry get key jface jfaceresources getimageregistry getimage getimageregistry returns the image registry for j face itself p note that the static convenience method code get image code is also provided on this class p public static image registry get image registry if image registry null image registry new image registry get resources display get current return image registry jface getimage imageregistry getimageregistry imageregistry imageregistry imageregistry getresources getcurrent imageregistry returns the resource object with the given key in j face s resource bundle if there isn t any value under the given key the key is returned param key the resource name return the string public static string get string string key try return bundle get string key catch missing resource exception e return key jface getstring getstring missingresourceexception returns a list of string values corresponding to the given list of keys the lookup is done with code get string code the values are in the same order as the keys param keys a list of keys return a list of corresponding string values public static string get strings string keys assert is not null keys int length keys length string result new string length for int i 0 i length i result i get string keys i return result getstring getstrings isnotnull getstring returns the j face s text font convenience method equivalent to pre j face resources get font registry get j face resources text font pre return the font public static font get text font return get font registry get text font jface jfaceresources getfontregistry jfaceresources text_font gettextfont getfontregistry text_font returns the j face s viewer font convenience method equivalent to pre j face resources get font registry get j face resources viewer font pre return the font deprecated this font is not in use public static font get viewer font return get font registry get viewer font jface jfaceresources getfontregistry jfaceresources viewer_font getviewerfont getfontregistry viewer_font sets j face s font registry to the given value this method may only be called once the call must occur before code j face resources get font registry code is invoked either directly or indirectly param registry a font registry public static void set font registry font registry registry assert is true font registry null font registry can only be set once non nls 1 font registry registry jface jfaceresources getfontregistry setfontregistry fontregistry istrue fontregistry fontregistry declare a private constructor to block instantiation private j face resources no op jfaceresources returns the formatted message for the given key in j face s resource bundle param key the resource name param args the message arguments return the string public static string format string key object args return message format format get string key args jface messageformat getstring returns the j face s banner font convenience method equivalent to pre j face resources get font registry get j face resources banner font pre return the font public static font get banner font return get font registry get banner font jface jfaceresources getfontregistry jfaceresources banner_font getbannerfont getfontregistry banner_font returns the resource bundle for j face itself the resouble bundle is obtained from code resource bundle get bundle org eclipse jface jface nls code p note that several static convenience methods are also provided on this class for directly accessing resources in this bundle p return the resource bundle public static resource bundle get bundle return bundle jface resourcebundle getbundle jface_nls resourcebundle getbundle returns the color registry for j face itself p return the code color registry code since 3 0 public static color registry get color registry if color registry null color registry new color registry return color registry jface colorregistry colorregistry getcolorregistry colorregistry colorregistry colorregistry colorregistry returns the global resource manager for the given display since 3 1 param to query display to query return the global resource manager for the given display public static resource manager get resources final display to query resource manager reg resource manager registries get to query if reg null final device resource manager mgr new device resource manager to query reg mgr registries put to query reg to query dispose exec new runnable non javadoc see java lang runnable run public void run mgr dispose registries remove to query return reg toquery resourcemanager getresources toquery resourcemanager resourcemanager toquery deviceresourcemanager deviceresourcemanager toquery toquery toquery disposeexec toquery returns the resource manager for the current display may only be called from a ui thread since 3 1 return the global resource manager for the current display public static resource manager get resources return get resources display get current resourcemanager resourcemanager resourcemanager getresources getresources getcurrent returns the j face s standard font convenience method equivalent to pre j face resources get font registry get j face resources default font pre return the font public static font get default font return get font registry default font jface jfaceresources getfontregistry jfaceresources default_font getdefaultfont getfontregistry defaultfont returns the j face s dialog font convenience method equivalent to pre j face resources get font registry get j face resources dialog font pre return the font public static font get dialog font return get font registry get dialog font jface jfaceresources getfontregistry jfaceresources dialog_font getdialogfont getfontregistry dialog_font returns the font in j face s font registry with the given symbolic font name convenience method equivalent to pre j face resources get font registry get symbolic name pre if an error occurs return the default font param symbolic name the symbolic font name return the font public static font get font string symbolic name return get font registry get symbolic name jface jfaceresources getfontregistry symbolicname symbolicname getfont symbolicname getfontregistry symbolicname returns the font registry for j face itself if the value has not been established by an earlier call to code set font registry code is it initialized to code new font registry org eclipse jface resource jfacefonts code p note that several static convenience methods are also provided on this class for directly accessing j face s standard fonts p public static font registry get font registry if font registry null font registry new font registry org eclipse jface resource jfacefonts non nls 1 return font registry jface setfontregistry fontregistry jface fontregistry getfontregistry fontregistry fontregistry fontregistry fontregistry returns the j face s header font convenience method equivalent to pre j face resources get font registry get j face resources header font pre return the font public static font get header font return get font registry get header font jface jfaceresources getfontregistry jfaceresources header_font getheaderfont getfontregistry header_font returns the image in j face s image registry with the given key or code null code if none convenience method equivalent to pre j face resources get image registry get key pre param key the key return the image or code null code if none public static image get image string key return get image registry get key jface jfaceresources getimageregistry getimage getimageregistry returns the image registry for j face itself p note that the static convenience method code get image code is also provided on this class p public static image registry get image registry if image registry null image registry new image registry get resources display get current return image registry jface getimage imageregistry getimageregistry imageregistry imageregistry imageregistry getresources getcurrent imageregistry returns the resource object with the given key in j face s resource bundle if there isn t any value under the given key the key is returned param key the resource name return the string public static string get string string key try return bundle get string key catch missing resource exception e return key jface getstring getstring missingresourceexception returns a list of string values corresponding to the given list of keys the lookup is done with code get string code the values are in the same order as the keys param keys a list of keys return a list of corresponding string values public static string get strings string keys assert is not null keys int length keys length string result new string length for int i 0 i length i result i get string keys i return result getstring getstrings isnotnull getstring returns the j face s text font convenience method equivalent to pre j face resources get font registry get j face resources text font pre return the font public static font get text font return get font registry get text font jface jfaceresources getfontregistry jfaceresources text_font gettextfont getfontregistry text_font returns the j face s viewer font convenience method equivalent to pre j face resources get font registry get j face resources viewer font pre return the font deprecated this font is not in use public static font get viewer font return get font registry get viewer font jface jfaceresources getfontregistry jfaceresources viewer_font getviewerfont getfontregistry viewer_font sets j face s font registry to the given value this method may only be called once the call must occur before code j face resources get font registry code is invoked either directly or indirectly param registry a font registry public static void set font registry font registry registry assert is true font registry null font registry can only be set once non nls 1 font registry registry jface jfaceresources getfontregistry setfontregistry fontregistry istrue fontregistry fontregistry declare a private constructor to block instantiation private j face resources no op jfaceresources returns the formatted message for the given key in j face s resource bundle param key the resource name param args the message arguments return the string public static string format string key object args return message format format get string key args jface messageformat getstring returns the j face s banner font convenience method equivalent to pre j face resources get font registry get j face resources banner font pre return the font public static font get banner font return get font registry get banner font jface jfaceresources getfontregistry jfaceresources banner_font getbannerfont getfontregistry banner_font returns the resource bundle for j face itself the resouble bundle is obtained from code resource bundle get bundle org eclipse jface jface nls code p note that several static convenience methods are also provided on this class for directly accessing resources in this bundle p return the resource bundle public static resource bundle get bundle return bundle jface resourcebundle getbundle jface_nls resourcebundle getbundle returns the color registry for j face itself p return the code color registry code since 3 0 public static color registry get color registry if color registry null color registry new color registry return color registry jface colorregistry colorregistry getcolorregistry colorregistry colorregistry colorregistry colorregistry returns the global resource manager for the given display since 3 1 param to query display to query return the global resource manager for the given display public static resource manager get resources final display to query resource manager reg resource manager registries get to query if reg null final device resource manager mgr new device resource manager to query reg mgr registries put to query reg to query dispose exec new runnable non javadoc see java lang runnable run public void run mgr dispose registries remove to query return reg toquery resourcemanager getresources toquery resourcemanager resourcemanager toquery deviceresourcemanager deviceresourcemanager toquery toquery toquery disposeexec toquery returns the resource manager for the current display may only be called from a ui thread since 3 1 return the global resource manager for the current display public static resource manager get resources return get resources display get current resourcemanager resourcemanager resourcemanager getresources getresources getcurrent returns the j face s standard font convenience method equivalent to pre j face resources get font registry get j face resources default font pre return the font public static font get default font return get font registry default font jface jfaceresources getfontregistry jfaceresources default_font getdefaultfont getfontregistry defaultfont returns the j face s dialog font convenience method equivalent to pre j face resources get font registry get j face resources dialog font pre return the font public static font get dialog font return get font registry get dialog font jface jfaceresources getfontregistry jfaceresources dialog_font getdialogfont getfontregistry dialog_font returns the font in j face s font registry with the given symbolic font name convenience method equivalent to pre j face resources get font registry get symbolic name pre if an error occurs return the default font param symbolic name the symbolic font name return the font public static font get font string symbolic name return get font registry get symbolic name jface jfaceresources getfontregistry symbolicname symbolicname getfont symbolicname getfontregistry symbolicname returns the font registry for j face itself if the value has not been established by an earlier call to code set font registry code is it initialized to code new font registry org eclipse jface resource jfacefonts code p note that several static convenience methods are also provided on this class for directly accessing j face s standard fonts p public static font registry get font registry if font registry null font registry new font registry org eclipse jface resource jfacefonts non nls 1 return font registry jface setfontregistry fontregistry jface fontregistry getfontregistry fontregistry fontregistry fontregistry fontregistry returns the j face s header font convenience method equivalent to pre j face resources get font registry get j face resources header font pre return the font public static font get header font return get font registry get header font jface jfaceresources getfontregistry jfaceresources header_font getheaderfont getfontregistry header_font returns the image in j face s image registry with the given key or code null code if none convenience method equivalent to pre j face resources get image registry get key pre param key the key return the image or code null code if none public static image get image string key return get image registry get key jface jfaceresources getimageregistry getimage getimageregistry returns the image registry for j face itself p note that the static convenience method code get image code is also provided on this class p public static image registry get image registry if image registry null image registry new image registry get resources display get current return image registry jface getimage imageregistry getimageregistry imageregistry imageregistry imageregistry getresources getcurrent imageregistry returns the resource object with the given key in j face s resource bundle if there isn t any value under the given key the key is returned param key the resource name return the string public static string get string string key try return bundle get string key catch missing resource exception e return key jface getstring getstring missingresourceexception returns a list of string values corresponding to the given list of keys the lookup is done with code get string code the values are in the same order as the keys param keys a list of keys return a list of corresponding string values public static string get strings string keys assert is not null keys int length keys length string result new string length for int i 0 i length i result i get string keys i return result getstring getstrings isnotnull getstring returns the j face s text font convenience method equivalent to pre j face resources get font registry get j face resources text font pre return the font public static font get text font return get font registry get text font jface jfaceresources getfontregistry jfaceresources text_font gettextfont getfontregistry text_font returns the j face s viewer font convenience method equivalent to pre j face resources get font registry get j face resources viewer font pre return the font deprecated this font is not in use public static font get viewer font return get font registry get viewer font jface jfaceresources getfontregistry jfaceresources viewer_font getviewerfont getfontregistry viewer_font sets j face s font registry to the given value this method may only be called once the call must occur before code j face resources get font registry code is invoked either directly or indirectly param registry a font registry public static void set font registry font registry registry assert is true font registry null font registry can only be set once non nls 1 font registry registry jface jfaceresources getfontregistry setfontregistry fontregistry istrue fontregistry fontregistry declare a private constructor to block instantiation private j face resources no op jfaceresources returns the formatted message for the given key in j face s resource bundle param key the resource name param args the message arguments return the string public static string format string key object args return message format format get string key args jface messageformat getstring returns the j face s banner font convenience method equivalent to pre j face resources get font registry get j face resources banner font pre return the font public static font get banner font return get font registry get banner font jface jfaceresources getfontregistry jfaceresources banner_font getbannerfont getfontregistry banner_font returns the resource bundle for j face itself the resouble bundle is obtained from code resource bundle get bundle org eclipse jface jface nls code p note that several static convenience methods are also provided on this class for directly accessing resources in this bundle p return the resource bundle public static resource bundle get bundle return bundle jface resourcebundle getbundle jface_nls resourcebundle getbundle returns the color registry for j face itself p return the code color registry code since 3 0 public static color registry get color registry if color registry null color registry new color registry return color registry jface colorregistry colorregistry getcolorregistry colorregistry colorregistry colorregistry colorregistry returns the global resource manager for the given display since 3 1 param to query display to query return the global resource manager for the given display public static resource manager get resources final display to query resource manager reg resource manager registries get to query if reg null final device resource manager mgr new device resource manager to query reg mgr registries put to query reg to query dispose exec new runnable non javadoc see java lang runnable run public void run mgr dispose registries remove to query return reg toquery resourcemanager getresources toquery resourcemanager resourcemanager toquery deviceresourcemanager deviceresourcemanager toquery toquery toquery disposeexec toquery returns the resource manager for the current display may only be called from a ui thread since 3 1 return the global resource manager for the current display public static resource manager get resources return get resources display get current resourcemanager resourcemanager resourcemanager getresources getresources getcurrent returns the j face s standard font convenience method equivalent to pre j face resources get font registry get j face resources default font pre return the font public static font get default font return get font registry default font jface jfaceresources getfontregistry jfaceresources default_font getdefaultfont getfontregistry defaultfont returns the j face s dialog font convenience method equivalent to pre j face resources get font registry get j face resources dialog font pre return the font public static font get dialog font return get font registry get dialog font jface jfaceresources getfontregistry jfaceresources dialog_font getdialogfont getfontregistry dialog_font returns the font in j face s font registry with the given symbolic font name convenience method equivalent to pre j face resources get font registry get symbolic name pre if an error occurs return the default font param symbolic name the symbolic font name return the font public static font get font string symbolic name return get font registry get symbolic name jface jfaceresources getfontregistry symbolicname symbolicname getfont symbolicname getfontregistry symbolicname returns the font registry for j face itself if the value has not been established by an earlier call to code set font registry code is it initialized to code new font registry org eclipse jface resource jfacefonts code p note that several static convenience methods are also provided on this class for directly accessing j face s standard fonts p public static font registry get font registry if font registry null font registry new font registry org eclipse jface resource jfacefonts non nls 1 return font registry jface setfontregistry fontregistry jface fontregistry getfontregistry fontregistry fontregistry fontregistry fontregistry returns the j face s header font convenience method equivalent to pre j face resources get font registry get j face resources header font pre return the font public static font get header font return get font registry get header font jface jfaceresources getfontregistry jfaceresources header_font getheaderfont getfontregistry header_font returns the image in j face s image registry with the given key or code null code if none convenience method equivalent to pre j face resources get image registry get key pre param key the key return the image or code null code if none public static image get image string key return get image registry get key jface jfaceresources getimageregistry getimage getimageregistry returns the image registry for j face itself p note that the static convenience method code get image code is also provided on this class p public static image registry get image registry if image registry null image registry new image registry get resources display get current return image registry jface getimage imageregistry getimageregistry imageregistry imageregistry imageregistry getresources getcurrent imageregistry returns the resource object with the given key in j face s resource bundle if there isn t any value under the given key the key is returned param key the resource name return the string public static string get string string key try return bundle get string key catch missing resource exception e return key jface getstring getstring missingresourceexception returns a list of string values corresponding to the given list of keys the lookup is done with code get string code the values are in the same order as the keys param keys a list of keys return a list of corresponding string values public static string get strings string keys assert is not null keys int length keys length string result new string length for int i 0 i length i result i get string keys i return result getstring getstrings isnotnull getstring returns the j face s text font convenience method equivalent to pre j face resources get font registry get j face resources text font pre return the font public static font get text font return get font registry get text font jface jfaceresources getfontregistry jfaceresources text_font gettextfont getfontregistry text_font returns the j face s viewer font convenience method equivalent to pre j face resources get font registry get j face resources viewer font pre return the font deprecated this font is not in use public static font get viewer font return get font registry get viewer font jface jfaceresources getfontregistry jfaceresources viewer_font getviewerfont getfontregistry viewer_font sets j face s font registry to the given value this method may only be called once the call must occur before code j face resources get font registry code is invoked either directly or indirectly param registry a font registry public static void set font registry font registry registry assert is true font registry null font registry can only be set once non nls 1 font registry registry jface jfaceresources getfontregistry setfontregistry fontregistry istrue fontregistry fontregistry declare a private constructor to block instantiation private j face resources no op jfaceresources returns the formatted message for the given key in j face s resource bundle param key the resource name param args the message arguments return the string public static string format string key object args return message format format get string key args jface messageformat getstring returns the j face s banner font convenience method equivalent to pre j face resources get font registry get j face resources banner font pre return the font public static font get banner font return get font registry get banner font jface jfaceresources getfontregistry jfaceresources banner_font getbannerfont getfontregistry banner_font returns the resource bundle for j face itself the resouble bundle is obtained from code resource bundle get bundle org eclipse jface jface nls code p note that several static convenience methods are also provided on this class for directly accessing resources in this bundle p return the resource bundle public static resource bundle get bundle return bundle jface resourcebundle getbundle jface_nls resourcebundle getbundle returns the color registry for j face itself p return the code color registry code since 3 0 public static color registry get color registry if color registry null color registry new color registry return color registry jface colorregistry colorregistry getcolorregistry colorregistry colorregistry colorregistry colorregistry returns the global resource manager for the given display since 3 1 param to query display to query return the global resource manager for the given display public static resource manager get resources final display to query resource manager reg resource manager registries get to query if reg null final device resource manager mgr new device resource manager to query reg mgr registries put to query reg to query dispose exec new runnable non javadoc see java lang runnable run public void run mgr dispose registries remove to query return reg toquery resourcemanager getresources toquery resourcemanager resourcemanager toquery deviceresourcemanager deviceresourcemanager toquery toquery toquery disposeexec toquery returns the resource manager for the current display may only be called from a ui thread since 3 1 return the global resource manager for the current display public static resource manager get resources return get resources display get current resourcemanager resourcemanager resourcemanager getresources getresources getcurrent returns the j face s standard font convenience method equivalent to pre j face resources get font registry get j face resources default font pre return the font public static font get default font return get font registry default font jface jfaceresources getfontregistry jfaceresources default_font getdefaultfont getfontregistry defaultfont returns the j face s dialog font convenience method equivalent to pre j face resources get font registry get j face resources dialog font pre return the font public static font get dialog font return get font registry get dialog font jface jfaceresources getfontregistry jfaceresources dialog_font getdialogfont getfontregistry dialog_font returns the font in j face s font registry with the given symbolic font name convenience method equivalent to pre j face resources get font registry get symbolic name pre if an error occurs return the default font param symbolic name the symbolic font name return the font public static font get font string symbolic name return get font registry get symbolic name jface jfaceresources getfontregistry symbolicname symbolicname getfont symbolicname getfontregistry symbolicname returns the font registry for j face itself if the value has not been established by an earlier call to code set font registry code is it initialized to code new font registry org eclipse jface resource jfacefonts code p note that several static convenience methods are also provided on this class for directly accessing j face s standard fonts p public static font registry get font registry if font registry null font registry new font registry org eclipse jface resource jfacefonts non nls 1 return font registry jface setfontregistry fontregistry jface fontregistry getfontregistry fontregistry fontregistry fontregistry fontregistry returns the j face s header font convenience method equivalent to pre j face resources get font registry get j face resources header font pre return the font public static font get header font return get font registry get header font jface jfaceresources getfontregistry jfaceresources header_font getheaderfont getfontregistry header_font returns the image in j face s image registry with the given key or code null code if none convenience method equivalent to pre j face resources get image registry get key pre param key the key return the image or code null code if none public static image get image string key return get image registry get key jface jfaceresources getimageregistry getimage getimageregistry returns the image registry for j face itself p note that the static convenience method code get image code is also provided on this class p public static image registry get image registry if image registry null image registry new image registry get resources display get current return image registry jface getimage imageregistry getimageregistry imageregistry imageregistry imageregistry getresources getcurrent imageregistry returns the resource object with the given key in j face s resource bundle if there isn t any value under the given key the key is returned param key the resource name return the string public static string get string string key try return bundle get string key catch missing resource exception e return key jface getstring getstring missingresourceexception returns a list of string values corresponding to the given list of keys the lookup is done with code get string code the values are in the same order as the keys param keys a list of keys return a list of corresponding string values public static string get strings string keys assert is not null keys int length keys length string result new string length for int i 0 i length i result i get string keys i return result getstring getstrings isnotnull getstring returns the j face s text font convenience method equivalent to pre j face resources get font registry get j face resources text font pre return the font public static font get text font return get font registry get text font jface jfaceresources getfontregistry jfaceresources text_font gettextfont getfontregistry text_font returns the j face s viewer font convenience method equivalent to pre j face resources get font registry get j face resources viewer font pre return the font deprecated this font is not in use public static font get viewer font return get font registry get viewer font jface jfaceresources getfontregistry jfaceresources viewer_font getviewerfont getfontregistry viewer_font sets j face s font registry to the given value this method may only be called once the call must occur before code j face resources get font registry code is invoked either directly or indirectly param registry a font registry public static void set font registry font registry registry assert is true font registry null font registry can only be set once non nls 1 font registry registry jface jfaceresources getfontregistry setfontregistry fontregistry istrue fontregistry fontregistry declare a private constructor to block instantiation private j face resources no op jfaceresources returns the formatted message for the given key in j face s resource bundle param key the resource name param args the message arguments return the string public static string format string key object args return message format format get string key args jface messageformat getstring returns the j face s banner font convenience method equivalent to pre j face resources get font registry get j face resources banner font pre return the font public static font get banner font return get font registry get banner font jface jfaceresources getfontregistry jfaceresources banner_font getbannerfont getfontregistry banner_font returns the resource bundle for j face itself the resouble bundle is obtained from code resource bundle get bundle org eclipse jface jface nls code p note that several static convenience methods are also provided on this class for directly accessing resources in this bundle p return the resource bundle public static resource bundle get bundle return bundle jface resourcebundle getbundle jface_nls resourcebundle getbundle returns the color registry for j face itself p return the code color registry code since 3 0 public static color registry get color registry if color registry null color registry new color registry return color registry jface colorregistry colorregistry getcolorregistry colorregistry colorregistry colorregistry colorregistry returns the global resource manager for the given display since 3 1 param to query display to query return the global resource manager for the given display public static resource manager get resources final display to query resource manager reg resource manager registries get to query if reg null final device resource manager mgr new device resource manager to query reg mgr registries put to query reg to query dispose exec new runnable non javadoc see java lang runnable run public void run mgr dispose registries remove to query return reg toquery resourcemanager getresources toquery resourcemanager resourcemanager toquery deviceresourcemanager deviceresourcemanager toquery toquery toquery disposeexec toquery returns the resource manager for the current display may only be called from a ui thread since 3 1 return the global resource manager for the current display public static resource manager get resources return get resources display get current resourcemanager resourcemanager resourcemanager getresources getresources getcurrent returns the j face s standard font convenience method equivalent to pre j face resources get font registry get j face resources default font pre return the font public static font get default font return get font registry default font jface jfaceresources getfontregistry jfaceresources default_font getdefaultfont getfontregistry defaultfont returns the j face s dialog font convenience method equivalent to pre j face resources get font registry get j face resources dialog font pre return the font public static font get dialog font return get font registry get dialog font jface jfaceresources getfontregistry jfaceresources dialog_font getdialogfont getfontregistry dialog_font returns the font in j face s font registry with the given symbolic font name convenience method equivalent to pre j face resources get font registry get symbolic name pre if an error occurs return the default font param symbolic name the symbolic font name return the font public static font get font string symbolic name return get font registry get symbolic name jface jfaceresources getfontregistry symbolicname symbolicname getfont symbolicname getfontregistry symbolicname returns the font registry for j face itself if the value has not been established by an earlier call to code set font registry code is it initialized to code new font registry org eclipse jface resource jfacefonts code p note that several static convenience methods are also provided on this class for directly accessing j face s standard fonts p public static font registry get font registry if font registry null font registry new font registry org eclipse jface resource jfacefonts non nls 1 return font registry jface setfontregistry fontregistry jface fontregistry getfontregistry fontregistry fontregistry fontregistry fontregistry returns the j face s header font convenience method equivalent to pre j face resources get font registry get j face resources header font pre return the font public static font get header font return get font registry get header font jface jfaceresources getfontregistry jfaceresources header_font getheaderfont getfontregistry header_font returns the image in j face s image registry with the given key or code null code if none convenience method equivalent to pre j face resources get image registry get key pre param key the key return the image or code null code if none public static image get image string key return get image registry get key jface jfaceresources getimageregistry getimage getimageregistry returns the image registry for j face itself p note that the static convenience method code get image code is also provided on this class p public static image registry get image registry if image registry null image registry new image registry get resources display get current return image registry jface getimage imageregistry getimageregistry imageregistry imageregistry imageregistry getresources getcurrent imageregistry returns the resource object with the given key in j face s resource bundle if there isn t any value under the given key the key is returned param key the resource name return the string public static string get string string key try return bundle get string key catch missing resource exception e return key jface getstring getstring missingresourceexception returns a list of string values corresponding to the given list of keys the lookup is done with code get string code the values are in the same order as the keys param keys a list of keys return a list of corresponding string values public static string get strings string keys assert is not null keys int length keys length string result new string length for int i 0 i length i result i get string keys i return result getstring getstrings isnotnull getstring returns the j face s text font convenience method equivalent to pre j face resources get font registry get j face resources text font pre return the font public static font get text font return get font registry get text font jface jfaceresources getfontregistry jfaceresources text_font gettextfont getfontregistry text_font returns the j face s viewer font convenience method equivalent to pre j face resources get font registry get j face resources viewer font pre return the font deprecated this font is not in use public static font get viewer font return get font registry get viewer font jface jfaceresources getfontregistry jfaceresources viewer_font getviewerfont getfontregistry viewer_font sets j face s font registry to the given value this method may only be called once the call must occur before code j face resources get font registry code is invoked either directly or indirectly param registry a font registry public static void set font registry font registry registry assert is true font registry null font registry can only be set once non nls 1 font registry registry jface jfaceresources getfontregistry setfontregistry fontregistry istrue fontregistry fontregistry declare a private constructor to block instantiation private j face resources no op jfaceresources returns the formatted message for the given key in j face s resource bundle param key the resource name param args the message arguments return the string public static string format string key object args return message format format get string key args jface messageformat getstring returns the j face s banner font convenience method equivalent to pre j face resources get font registry get j face resources banner font pre return the font public static font get banner font return get font registry get banner font jface jfaceresources getfontregistry jfaceresources banner_font getbannerfont getfontregistry banner_font returns the resource bundle for j face itself the resouble bundle is obtained from code resource bundle get bundle org eclipse jface jface nls code p note that several static convenience methods are also provided on this class for directly accessing resources in this bundle p return the resource bundle public static resource bundle get bundle return bundle jface resourcebundle getbundle jface_nls resourcebundle getbundle returns the color registry for j face itself p return the code color registry code since 3 0 public static color registry get color registry if color registry null color registry new color registry return color registry jface colorregistry colorregistry getcolorregistry colorregistry colorregistry colorregistry colorregistry returns the global resource manager for the given display since 3 1 param to query display to query return the global resource manager for the given display public static resource manager get resources final display to query resource manager reg resource manager registries get to query if reg null final device resource manager mgr new device resource manager to query reg mgr registries put to query reg to query dispose exec new runnable non javadoc see java lang runnable run public void run mgr dispose registries remove to query return reg toquery resourcemanager getresources toquery resourcemanager resourcemanager toquery deviceresourcemanager deviceresourcemanager toquery toquery toquery disposeexec toquery returns the resource manager for the current display may only be called from a ui thread since 3 1 return the global resource manager for the current display public static resource manager get resources return get resources display get current resourcemanager resourcemanager resourcemanager getresources getresources getcurrent returns the j face s standard font convenience method equivalent to pre j face resources get font registry get j face resources default font pre return the font public static font get default font return get font registry default font jface jfaceresources getfontregistry jfaceresources default_font getdefaultfont getfontregistry defaultfont returns the j face s dialog font convenience method equivalent to pre j face resources get font registry get j face resources dialog font pre return the font public static font get dialog font return get font registry get dialog font jface jfaceresources getfontregistry jfaceresources dialog_font getdialogfont getfontregistry dialog_font returns the font in j face s font registry with the given symbolic font name convenience method equivalent to pre j face resources get font registry get symbolic name pre if an error occurs return the default font param symbolic name the symbolic font name return the font public static font get font string symbolic name return get font registry get symbolic name jface jfaceresources getfontregistry symbolicname symbolicname getfont symbolicname getfontregistry symbolicname returns the font registry for j face itself if the value has not been established by an earlier call to code set font registry code is it initialized to code new font registry org eclipse jface resource jfacefonts code p note that several static convenience methods are also provided on this class for directly accessing j face s standard fonts p public static font registry get font registry if font registry null font registry new font registry org eclipse jface resource jfacefonts non nls 1 return font registry jface setfontregistry fontregistry jface fontregistry getfontregistry fontregistry fontregistry fontregistry fontregistry returns the j face s header font convenience method equivalent to pre j face resources get font registry get j face resources header font pre return the font public static font get header font return get font registry get header font jface jfaceresources getfontregistry jfaceresources header_font getheaderfont getfontregistry header_font returns the image in j face s image registry with the given key or code null code if none convenience method equivalent to pre j face resources get image registry get key pre param key the key return the image or code null code if none public static image get image string key return get image registry get key jface jfaceresources getimageregistry getimage getimageregistry returns the image registry for j face itself p note that the static convenience method code get image code is also provided on this class p public static image registry get image registry if image registry null image registry new image registry get resources display get current return image registry jface getimage imageregistry getimageregistry imageregistry imageregistry imageregistry getresources getcurrent imageregistry returns the resource object with the given key in j face s resource bundle if there isn t any value under the given key the key is returned param key the resource name return the string public static string get string string key try return bundle get string key catch missing resource exception e return key jface getstring getstring missingresourceexception returns a list of string values corresponding to the given list of keys the lookup is done with code get string code the values are in the same order as the keys param keys a list of keys return a list of corresponding string values public static string get strings string keys assert is not null keys int length keys length string result new string length for int i 0 i length i result i get string keys i return result getstring getstrings isnotnull getstring returns the j face s text font convenience method equivalent to pre j face resources get font registry get j face resources text font pre return the font public static font get text font return get font registry get text font jface jfaceresources getfontregistry jfaceresources text_font gettextfont getfontregistry text_font returns the j face s viewer font convenience method equivalent to pre j face resources get font registry get j face resources viewer font pre return the font deprecated this font is not in use public static font get viewer font return get font registry get viewer font jface jfaceresources getfontregistry jfaceresources viewer_font getviewerfont getfontregistry viewer_font sets j face s font registry to the given value this method may only be called once the call must occur before code j face resources get font registry code is invoked either directly or indirectly param registry a font registry public static void set font registry font registry registry assert is true font registry null font registry can only be set once non nls 1 font registry registry jface jfaceresources getfontregistry setfontregistry fontregistry istrue fontregistry fontregistry declare a private constructor to block instantiation private j face resources no op jfaceresources returns the formatted message for the given key in j face s resource bundle param key the resource name param args the message arguments return the string public static string format string key object args return message format format get string key args jface messageformat getstring returns the j face s banner font convenience method equivalent to pre j face resources get font registry get j face resources banner font pre return the font public static font get banner font return get font registry get banner font jface jfaceresources getfontregistry jfaceresources banner_font getbannerfont getfontregistry banner_font returns the resource bundle for j face itself the resouble bundle is obtained from code resource bundle get bundle org eclipse jface jface nls code p note that several static convenience methods are also provided on this class for directly accessing resources in this bundle p return the resource bundle public static resource bundle get bundle return bundle jface resourcebundle getbundle jface_nls resourcebundle getbundle returns the color registry for j face itself p return the code color registry code since 3 0 public static color registry get color registry if color registry null color registry new color registry return color registry jface colorregistry colorregistry getcolorregistry colorregistry colorregistry colorregistry colorregistry returns the global resource manager for the given display since 3 1 param to query display to query return the global resource manager for the given display public static resource manager get resources final display to query resource manager reg resource manager registries get to query if reg null final device resource manager mgr new device resource manager to query reg mgr registries put to query reg to query dispose exec new runnable non javadoc see java lang runnable run public void run mgr dispose registries remove to query return reg toquery resourcemanager getresources toquery resourcemanager resourcemanager toquery deviceresourcemanager deviceresourcemanager toquery toquery toquery disposeexec toquery returns the resource manager for the current display may only be called from a ui thread since 3 1 return the global resource manager for the current display public static resource manager get resources return get resources display get current resourcemanager resourcemanager resourcemanager getresources getresources getcurrent returns the j face s standard font convenience method equivalent to pre j face resources get font registry get j face resources default font pre return the font public static font get default font return get font registry default font jface jfaceresources getfontregistry jfaceresources default_font getdefaultfont getfontregistry defaultfont returns the j face s dialog font convenience method equivalent to pre j face resources get font registry get j face resources dialog font pre return the font public static font get dialog font return get font registry get dialog font jface jfaceresources getfontregistry jfaceresources dialog_font getdialogfont getfontregistry dialog_font returns the font in j face s font registry with the given symbolic font name convenience method equivalent to pre j face resources get font registry get symbolic name pre if an error occurs return the default font param symbolic name the symbolic font name return the font public static font get font string symbolic name return get font registry get symbolic name jface jfaceresources getfontregistry symbolicname symbolicname getfont symbolicname getfontregistry symbolicname returns the font registry for j face itself if the value has not been established by an earlier call to code set font registry code is it initialized to code new font registry org eclipse jface resource jfacefonts code p note that several static convenience methods are also provided on this class for directly accessing j face s standard fonts p public static font registry get font registry if font registry null font registry new font registry org eclipse jface resource jfacefonts non nls 1 return font registry jface setfontregistry fontregistry jface fontregistry getfontregistry fontregistry fontregistry fontregistry fontregistry returns the j face s header font convenience method equivalent to pre j face resources get font registry get j face resources header font pre return the font public static font get header font return get font registry get header font jface jfaceresources getfontregistry jfaceresources header_font getheaderfont getfontregistry header_font returns the image in j face s image registry with the given key or code null code if none convenience method equivalent to pre j face resources get image registry get key pre param key the key return the image or code null code if none public static image get image string key return get image registry get key jface jfaceresources getimageregistry getimage getimageregistry returns the image registry for j face itself p note that the static convenience method code get image code is also provided on this class p public static image registry get image registry if image registry null image registry new image registry get resources display get current return image registry jface getimage imageregistry getimageregistry imageregistry imageregistry imageregistry getresources getcurrent imageregistry returns the resource object with the given key in j face s resource bundle if there isn t any value under the given key the key is returned param key the resource name return the string public static string get string string key try return bundle get string key catch missing resource exception e return key jface getstring getstring missingresourceexception returns a list of string values corresponding to the given list of keys the lookup is done with code get string code the values are in the same order as the keys param keys a list of keys return a list of corresponding string values public static string get strings string keys assert is not null keys int length keys length string result new string length for int i 0 i length i result i get string keys i return result getstring getstrings isnotnull getstring returns the j face s text font convenience method equivalent to pre j face resources get font registry get j face resources text font pre return the font public static font get text font return get font registry get text font jface jfaceresources getfontregistry jfaceresources text_font gettextfont getfontregistry text_font returns the j face s viewer font convenience method equivalent to pre j face resources get font registry get j face resources viewer font pre return the font deprecated this font is not in use public static font get viewer font return get font registry get viewer font jface jfaceresources getfontregistry jfaceresources viewer_font getviewerfont getfontregistry viewer_font sets j face s font registry to the given value this method may only be called once the call must occur before code j face resources get font registry code is invoked either directly or indirectly param registry a font registry public static void set font registry font registry registry assert is true font registry null font registry can only be set once non nls 1 font registry registry jface jfaceresources getfontregistry setfontregistry fontregistry istrue fontregistry fontregistry declare a private constructor to block instantiation private j face resources no op jfaceresources returns the formatted message for the given key in j face s resource bundle param key the resource name param args the message arguments return the string public static string format string key object args return message format format get string key args jface messageformat getstring returns the j face s banner font convenience method equivalent to pre j face resources get font registry get j face resources banner font pre return the font public static font get banner font return get font registry get banner font jface jfaceresources getfontregistry jfaceresources banner_font getbannerfont getfontregistry banner_font returns the resource bundle for j face itself the resouble bundle is obtained from code resource bundle get bundle org eclipse jface jface nls code p note that several static convenience methods are also provided on this class for directly accessing resources in this bundle p return the resource bundle public static resource bundle get bundle return bundle jface resourcebundle getbundle jface_nls resourcebundle getbundle returns the color registry for j face itself p return the code color registry code since 3 0 public static color registry get color registry if color registry null color registry new color registry return color registry jface colorregistry colorregistry getcolorregistry colorregistry colorregistry colorregistry colorregistry returns the global resource manager for the given display since 3 1 param to query display to query return the global resource manager for the given display public static resource manager get resources final display to query resource manager reg resource manager registries get to query if reg null final device resource manager mgr new device resource manager to query reg mgr registries put to query reg to query dispose exec new runnable non javadoc see java lang runnable run public void run mgr dispose registries remove to query return reg toquery resourcemanager getresources toquery resourcemanager resourcemanager toquery deviceresourcemanager deviceresourcemanager toquery toquery toquery disposeexec toquery returns the resource manager for the current display may only be called from a ui thread since 3 1 return the global resource manager for the current display public static resource manager get resources return get resources display get current resourcemanager resourcemanager resourcemanager getresources getresources getcurrent returns the j face s standard font convenience method equivalent to pre j face resources get font registry get j face resources default font pre return the font public static font get default font return get font registry default font jface jfaceresources getfontregistry jfaceresources default_font getdefaultfont getfontregistry defaultfont returns the j face s dialog font convenience method equivalent to pre j face resources get font registry get j face resources dialog font pre return the font public static font get dialog font return get font registry get dialog font jface jfaceresources getfontregistry jfaceresources dialog_font getdialogfont getfontregistry dialog_font returns the font in j face s font registry with the given symbolic font name convenience method equivalent to pre j face resources get font registry get symbolic name pre if an error occurs return the default font param symbolic name the symbolic font name return the font public static font get font string symbolic name return get font registry get symbolic name jface jfaceresources getfontregistry symbolicname symbolicname getfont symbolicname getfontregistry symbolicname returns the font registry for j face itself if the value has not been established by an earlier call to code set font registry code is it initialized to code new font registry org eclipse jface resource jfacefonts code p note that several static convenience methods are also provided on this class for directly accessing j face s standard fonts p public static font registry get font registry if font registry null font registry new font registry org eclipse jface resource jfacefonts non nls 1 return font registry jface setfontregistry fontregistry jface fontregistry getfontregistry fontregistry fontregistry fontregistry fontregistry returns the j face s header font convenience method equivalent to pre j face resources get font registry get j face resources header font pre return the font public static font get header font return get font registry get header font jface jfaceresources getfontregistry jfaceresources header_font getheaderfont getfontregistry header_font returns the image in j face s image registry with the given key or code null code if none convenience method equivalent to pre j face resources get image registry get key pre param key the key return the image or code null code if none public static image get image string key return get image registry get key jface jfaceresources getimageregistry getimage getimageregistry returns the image registry for j face itself p note that the static convenience method code get image code is also provided on this class p public static image registry get image registry if image registry null image registry new image registry get resources display get current return image registry jface getimage imageregistry getimageregistry imageregistry imageregistry imageregistry getresources getcurrent imageregistry returns the resource object with the given key in j face s resource bundle if there isn t any value under the given key the key is returned param key the resource name return the string public static string get string string key try return bundle get string key catch missing resource exception e return key jface getstring getstring missingresourceexception returns a list of string values corresponding to the given list of keys the lookup is done with code get string code the values are in the same order as the keys param keys a list of keys return a list of corresponding string values public static string get strings string keys assert is not null keys int length keys length string result new string length for int i 0 i length i result i get string keys i return result getstring getstrings isnotnull getstring returns the j face s text font convenience method equivalent to pre j face resources get font registry get j face resources text font pre return the font public static font get text font return get font registry get text font jface jfaceresources getfontregistry jfaceresources text_font gettextfont getfontregistry text_font returns the j face s viewer font convenience method equivalent to pre j face resources get font registry get j face resources viewer font pre return the font deprecated this font is not in use public static font get viewer font return get font registry get viewer font jface jfaceresources getfontregistry jfaceresources viewer_font getviewerfont getfontregistry viewer_font sets j face s font registry to the given value this method may only be called once the call must occur before code j face resources get font registry code is invoked either directly or indirectly param registry a font registry public static void set font registry font registry registry assert is true font registry null font registry can only be set once non nls 1 font registry registry jface jfaceresources getfontregistry setfontregistry fontregistry istrue fontregistry fontregistry declare a private constructor to block instantiation private j face resources no op jfaceresources returns the formatted message for the given key in j face s resource bundle param key the resource name param args the message arguments return the string public static string format string key object args return message format format get string key args jface messageformat getstring returns the j face s banner font convenience method equivalent to pre j face resources get font registry get j face resources banner font pre return the font public static font get banner font return get font registry get banner font jface jfaceresources getfontregistry jfaceresources banner_font getbannerfont getfontregistry banner_font returns the resource bundle for j face itself the resouble bundle is obtained from code resource bundle get bundle org eclipse jface jface nls code p note that several static convenience methods are also provided on this class for directly accessing resources in this bundle p return the resource bundle public static resource bundle get bundle return bundle jface resourcebundle getbundle jface_nls resourcebundle getbundle returns the color registry for j face itself p return the code color registry code since 3 0 public static color registry get color registry if color registry null color registry new color registry return color registry jface colorregistry colorregistry getcolorregistry colorregistry colorregistry colorregistry colorregistry returns the global resource manager for the given display since 3 1 param to query display to query return the global resource manager for the given display public static resource manager get resources final display to query resource manager reg resource manager registries get to query if reg null final device resource manager mgr new device resource manager to query reg mgr registries put to query reg to query dispose exec new runnable non javadoc see java lang runnable run public void run mgr dispose registries remove to query return reg toquery resourcemanager getresources toquery resourcemanager resourcemanager toquery deviceresourcemanager deviceresourcemanager toquery toquery toquery disposeexec toquery returns the resource manager for the current display may only be called from a ui thread since 3 1 return the global resource manager for the current display public static resource manager get resources return get resources display get current resourcemanager resourcemanager resourcemanager getresources getresources getcurrent returns the j face s standard font convenience method equivalent to pre j face resources get font registry get j face resources default font pre return the font public static font get default font return get font registry default font jface jfaceresources getfontregistry jfaceresources default_font getdefaultfont getfontregistry defaultfont returns the j face s dialog font convenience method equivalent to pre j face resources get font registry get j face resources dialog font pre return the font public static font get dialog font return get font registry get dialog font jface jfaceresources getfontregistry jfaceresources dialog_font getdialogfont getfontregistry dialog_font returns the font in j face s font registry with the given symbolic font name convenience method equivalent to pre j face resources get font registry get symbolic name pre if an error occurs return the default font param symbolic name the symbolic font name return the font public static font get font string symbolic name return get font registry get symbolic name jface jfaceresources getfontregistry symbolicname symbolicname getfont symbolicname getfontregistry symbolicname returns the font registry for j face itself if the value has not been established by an earlier call to code set font registry code is it initialized to code new font registry org eclipse jface resource jfacefonts code p note that several static convenience methods are also provided on this class for directly accessing j face s standard fonts p public static font registry get font registry if font registry null font registry new font registry org eclipse jface resource jfacefonts non nls 1 return font registry jface setfontregistry fontregistry jface fontregistry getfontregistry fontregistry fontregistry fontregistry fontregistry returns the j face s header font convenience method equivalent to pre j face resources get font registry get j face resources header font pre return the font public static font get header font return get font registry get header font jface jfaceresources getfontregistry jfaceresources header_font getheaderfont getfontregistry header_font returns the image in j face s image registry with the given key or code null code if none convenience method equivalent to pre j face resources get image registry get key pre param key the key return the image or code null code if none public static image get image string key return get image registry get key jface jfaceresources getimageregistry getimage getimageregistry returns the image registry for j face itself p note that the static convenience method code get image code is also provided on this class p public static image registry get image registry if image registry null image registry new image registry get resources display get current return image registry jface getimage imageregistry getimageregistry imageregistry imageregistry imageregistry getresources getcurrent imageregistry returns the resource object with the given key in j face s resource bundle if there isn t any value under the given key the key is returned param key the resource name return the string public static string get string string key try return bundle get string key catch missing resource exception e return key jface getstring getstring missingresourceexception returns a list of string values corresponding to the given list of keys the lookup is done with code get string code the values are in the same order as the keys param keys a list of keys return a list of corresponding string values public static string get strings string keys assert is not null keys int length keys length string result new string length for int i 0 i length i result i get string keys i return result getstring getstrings isnotnull getstring returns the j face s text font convenience method equivalent to pre j face resources get font registry get j face resources text font pre return the font public static font get text font return get font registry get text font jface jfaceresources getfontregistry jfaceresources text_font gettextfont getfontregistry text_font returns the j face s viewer font convenience method equivalent to pre j face resources get font registry get j face resources viewer font pre return the font deprecated this font is not in use public static font get viewer font return get font registry get viewer font jface jfaceresources getfontregistry jfaceresources viewer_font getviewerfont getfontregistry viewer_font sets j face s font registry to the given value this method may only be called once the call must occur before code j face resources get font registry code is invoked either directly or indirectly param registry a font registry public static void set font registry font registry registry assert is true font registry null font registry can only be set once non nls 1 font registry registry jface jfaceresources getfontregistry setfontregistry fontregistry istrue fontregistry fontregistry declare a private constructor to block instantiation private j face resources no op jfaceresources returns the formatted message for the given key in j face s resource bundle param key the resource name param args the message arguments return the string public static string format string key object args return message format format get string key args jface messageformat getstring returns the j face s banner font convenience method equivalent to pre j face resources get font registry get j face resources banner font pre return the font public static font get banner font return get font registry get banner font jface jfaceresources getfontregistry jfaceresources banner_font getbannerfont getfontregistry banner_font returns the resource bundle for j face itself the resouble bundle is obtained from code resource bundle get bundle org eclipse jface jface nls code p note that several static convenience methods are also provided on this class for directly accessing resources in this bundle p return the resource bundle public static resource bundle get bundle return bundle jface resourcebundle getbundle jface_nls resourcebundle getbundle returns the color registry for j face itself p return the code color registry code since 3 0 public static color registry get color registry if color registry null color registry new color registry return color registry jface colorregistry colorregistry getcolorregistry colorregistry colorregistry colorregistry colorregistry returns the global resource manager for the given display since 3 1 param to query display to query return the global resource manager for the given display public static resource manager get resources final display to query resource manager reg resource manager registries get to query if reg null final device resource manager mgr new device resource manager to query reg mgr registries put to query reg to query dispose exec new runnable non javadoc see java lang runnable run public void run mgr dispose registries remove to query return reg toquery resourcemanager getresources toquery resourcemanager resourcemanager toquery deviceresourcemanager deviceresourcemanager toquery toquery toquery disposeexec toquery returns the resource manager for the current display may only be called from a ui thread since 3 1 return the global resource manager for the current display public static resource manager get resources return get resources display get current resourcemanager resourcemanager resourcemanager getresources getresources getcurrent returns the j face s standard font convenience method equivalent to pre j face resources get font registry get j face resources default font pre return the font public static font get default font return get font registry default font jface jfaceresources getfontregistry jfaceresources default_font getdefaultfont getfontregistry defaultfont returns the j face s dialog font convenience method equivalent to pre j face resources get font registry get j face resources dialog font pre return the font public static font get dialog font return get font registry get dialog font jface jfaceresources getfontregistry jfaceresources dialog_font getdialogfont getfontregistry dialog_font returns the font in j face s font registry with the given symbolic font name convenience method equivalent to pre j face resources get font registry get symbolic name pre if an error occurs return the default font param symbolic name the symbolic font name return the font public static font get font string symbolic name return get font registry get symbolic name jface jfaceresources getfontregistry symbolicname symbolicname getfont symbolicname getfontregistry symbolicname returns the font registry for j face itself if the value has not been established by an earlier call to code set font registry code is it initialized to code new font registry org eclipse jface resource jfacefonts code p note that several static convenience methods are also provided on this class for directly accessing j face s standard fonts p public static font registry get font registry if font registry null font registry new font registry org eclipse jface resource jfacefonts non nls 1 return font registry jface setfontregistry fontregistry jface fontregistry getfontregistry fontregistry fontregistry fontregistry fontregistry returns the j face s header font convenience method equivalent to pre j face resources get font registry get j face resources header font pre return the font public static font get header font return get font registry get header font jface jfaceresources getfontregistry jfaceresources header_font getheaderfont getfontregistry header_font returns the image in j face s image registry with the given key or code null code if none convenience method equivalent to pre j face resources get image registry get key pre param key the key return the image or code null code if none public static image get image string key return get image registry get key jface jfaceresources getimageregistry getimage getimageregistry returns the image registry for j face itself p note that the static convenience method code get image code is also provided on this class p public static image registry get image registry if image registry null image registry new image registry get resources display get current return image registry jface getimage imageregistry getimageregistry imageregistry imageregistry imageregistry getresources getcurrent imageregistry returns the resource object with the given key in j face s resource bundle if there isn t any value under the given key the key is returned param key the resource name return the string public static string get string string key try return bundle get string key catch missing resource exception e return key jface getstring getstring missingresourceexception returns a list of string values corresponding to the given list of keys the lookup is done with code get string code the values are in the same order as the keys param keys a list of keys return a list of corresponding string values public static string get strings string keys assert is not null keys int length keys length string result new string length for int i 0 i length i result i get string keys i return result getstring getstrings isnotnull getstring returns the j face s text font convenience method equivalent to pre j face resources get font registry get j face resources text font pre return the font public static font get text font return get font registry get text font jface jfaceresources getfontregistry jfaceresources text_font gettextfont getfontregistry text_font returns the j face s viewer font convenience method equivalent to pre j face resources get font registry get j face resources viewer font pre return the font deprecated this font is not in use public static font get viewer font return get font registry get viewer font jface jfaceresources getfontregistry jfaceresources viewer_font getviewerfont getfontregistry viewer_font sets j face s font registry to the given value this method may only be called once the call must occur before code j face resources get font registry code is invoked either directly or indirectly param registry a font registry public static void set font registry font registry registry assert is true font registry null font registry can only be set once non nls 1 font registry registry jface jfaceresources getfontregistry setfontregistry fontregistry istrue fontregistry fontregistry declare a private constructor to block instantiation private j face resources no op jfaceresources public static browser manager get instance if instance null instance new browser manager return instance browsermanager getinstance browsermanager private browser manager pcl new preferences i property change listener public void property change preferences property change event event if ignore preference changes return string property event get property if property equals browsers non nls 1 load browsers else if property equals web browser preference pref browser choice set changed notify observers web browserui plugin get instance get plugin preferences add property change listener pcl browsermanager ipropertychangelistener propertychange propertychangeevent ignorepreferencechanges getproperty loadbrowsers webbrowserpreference pref_browser_choice setchanged notifyobservers webbrowseruiplugin getinstance getpluginpreferences addpropertychangelistener pcl new preferences i property change listener public void property change preferences property change event event if ignore preference changes return string property event get property if property equals browsers non nls 1 load browsers else if property equals web browser preference pref browser choice set changed notify observers ipropertychangelistener propertychange propertychangeevent ignorepreferencechanges getproperty loadbrowsers webbrowserpreference pref_browser_choice setchanged notifyobservers protected static void safe dispose if instance null return instance dispose safedispose protected void dispose preferences prefs web browserui plugin get instance get plugin preferences if prefs null prefs remove property change listener pcl webbrowseruiplugin getinstance getpluginpreferences removepropertychangelistener public i browser descriptor working copy create external web browser return new browser descriptor working copy ibrowserdescriptorworkingcopy createexternalwebbrowser browserdescriptorworkingcopy public list get web browsers if browsers null load browsers return new array list browsers getwebbrowsers loadbrowsers arraylist protected void load browsers trace trace trace finest loading web browsers non nls 1 preferences prefs web browserui plugin get instance get plugin preferences string xml string prefs get string browsers non nls 1 if xml string null xml string length 0 browsers new array list try byte array input stream in new byte array input stream xml string get bytes reader reader new input stream reader in i memento memento xml memento create read root reader i memento system memento get child system non nls 1 if system null web browser util can use system browser browsers add new system browser descriptor i memento children memento get children external non nls 1 int size children length for int i 0 i size i browser descriptor browser new browser descriptor browser load children i browsers add browser integer current memento get integer current non nls 1 if current null current browser i browser descriptor browsers get current int value catch exception e trace trace trace warning could not load browsers e get message non nls 1 i browser descriptor system new system browser descriptor if web browser util can use system browser browsers contains system browsers add 0 system current browser system save browsers else setup default browsers save browsers if current browser null browsers size 0 current browser i browser descriptor browsers get 0 set changed notify observers loadbrowsers webbrowseruiplugin getinstance getpluginpreferences xmlstring getstring xmlstring xmlstring arraylist bytearrayinputstream bytearrayinputstream xmlstring getbytes inputstreamreader imemento xmlmemento createreadroot imemento getchild webbrowserutil canusesystembrowser systembrowserdescriptor imemento getchildren browserdescriptor browserdescriptor getinteger currentbrowser ibrowserdescriptor intvalue getmessage ibrowserdescriptor systembrowserdescriptor webbrowserutil canusesystembrowser currentbrowser savebrowsers setupdefaultbrowsers savebrowsers currentbrowser currentbrowser ibrowserdescriptor setchanged notifyobservers protected void save browsers try ignore preference changes true xml memento memento xml memento create write root web browsers non nls 1 iterator iterator browsers iterator while iterator has next object obj iterator next if obj instanceof browser descriptor browser descriptor browser browser descriptor obj i memento child memento create child external non nls 1 browser save child else if obj instanceof system browser descriptor memento create child system non nls 1 memento put integer current browsers index of current browser non nls 1 string writer writer new string writer memento save writer string xml string writer get buffer to string preferences prefs web browserui plugin get instance get plugin preferences prefs set value browsers xml string non nls 1 web browserui plugin get instance save plugin preferences catch exception e trace trace trace severe could not save browsers e non nls 1 ignore preference changes false savebrowsers ignorepreferencechanges xmlmemento xmlmemento createwriteroot hasnext browserdescriptor browserdescriptor browserdescriptor imemento createchild systembrowserdescriptor createchild putinteger indexof currentbrowser stringwriter stringwriter xmlstring getbuffer tostring webbrowseruiplugin getinstance getpluginpreferences setvalue xmlstring webbrowseruiplugin getinstance savepluginpreferences ignorepreferencechanges protected void setup default browsers browsers new array list add system browser if web browser util can use system browser i browser descriptor system new system browser descriptor browsers add system handle all the external browsers by criteria and add those too at startup web browser util add found browsers browsers by default if internal is there that is current else set the first external one if browsers is empty current browser null current browser i browser descriptor browsers get 0 setupdefaultbrowsers arraylist webbrowserutil canusesystembrowser ibrowserdescriptor systembrowserdescriptor webbrowserutil addfoundbrowsers isempty currentbrowser currentbrowser ibrowserdescriptor protected void add browser i browser descriptor browser if browsers null load browsers if browsers contains browser browsers add browser if browsers size 1 set current web browser browser save browsers addbrowser ibrowserdescriptor loadbrowsers setcurrentwebbrowser savebrowsers protected void remove web browser i browser descriptor browser if browsers null load browsers browsers remove browser if current browser null current browser equals browser current browser null if browsers size 0 current browser i browser descriptor browsers get 0 removewebbrowser ibrowserdescriptor loadbrowsers currentbrowser currentbrowser currentbrowser currentbrowser ibrowserdescriptor public i browser descriptor get current web browser if browsers null load browsers if current browser null browsers size 0 return i browser descriptor browsers get 0 return current browser ibrowserdescriptor getcurrentwebbrowser loadbrowsers currentbrowser ibrowserdescriptor currentbrowser public void set current web browser i browser descriptor wb if wb null throw new illegal argument exception if browsers contains wb current browser wb else throw new illegal argument exception save browsers setcurrentwebbrowser ibrowserdescriptor illegalargumentexception currentbrowser illegalargumentexception savebrowsers creates an empty editor action bar contributor the action bars are furnished later via the code init code method public editor action bar contributor editoractionbarcontributor contributes to the given menu p the code editor action bar contributor code implementation of this method does nothing subclasses may reimplement to add to the menu portion of this contribution p param menu manager the manager that controls the menu public void contribute to menu i menu manager menu manager editoractionbarcontributor menumanager contributetomenu imenumanager menumanager contributes to the given status line p the code editor action bar contributor code implementation of this method does nothing subclasses may reimplement to add to the status line portion of this contribution p param status line manager the manager of the status line public void contribute to status line i status line manager status line manager editoractionbarcontributor statuslinemanager contributetostatusline istatuslinemanager statuslinemanager contributes to the given tool bar p the code editor action bar contributor code implementation of this method does nothing subclasses may reimplement to add to the tool bar portion of this contribution p param tool bar manager the manager that controls the workbench tool bar public void contribute to tool bar i tool bar manager tool bar manager editoractionbarcontributor toolbarmanager contributetotoolbar itoolbarmanager toolbarmanager contributes to the given cool bar p the code editor action bar contributor code implementation of this method does nothing subclasses may reimplement to add to the cool bar portion of this contribution there can only be conributions from a cool bar or a tool bar p param cool bar manager the manager that controls the workbench cool bar since 3 0 public void contribute to cool bar i cool bar manager cool bar manager editoractionbarcontributor coolbarmanager contributetocoolbar icoolbarmanager coolbarmanager returns this contributor s action bars return the action bars public i action bars get action bars return bars iactionbars getactionbars returns this contributor s workbench page return the workbench page public i workbench page get page return page iworkbenchpage getpage the code editor action bar contributor code implementation of this code i editor action bar contributor code method does nothing subclasses may override public void dispose editoractionbarcontributor ieditoractionbarcontributor the code editor action bar contributor code implementation of this code i editor action bar contributor code method remembers the page then forwards the call to code init i action bars code for backward compatibility public void init i action bars bars i workbench page page this page page init bars editoractionbarcontributor ieditoractionbarcontributor iactionbars iactionbars iworkbenchpage this method calls ul li code contribute to menu code with code bars code menu manager li li code contribute to tool bar code with code bars code tool bar manager li li code contribute to cool bar code with code bars code cool bar manager if code i action bars code is of extended type code i action bars2 code li li code contribute to status line code with code bars code status line manager li ul the given action bars are also remembered and made accessible via code get action bars code param bars the action bars public void init i action bars bars this bars bars contribute to menu bars get menu manager contribute to tool bar bars get tool bar manager if bars instanceof i action bars2 contribute to cool bar i action bars2 bars get cool bar manager contribute to status line bars get status line manager contributetomenu contributetotoolbar contributetocoolbar iactionbars iactionbars2 contributetostatusline getactionbars iactionbars contributetomenu getmenumanager contributetotoolbar gettoolbarmanager iactionbars2 contributetocoolbar iactionbars2 getcoolbarmanager contributetostatusline getstatuslinemanager sets the active editor for the contributor p the code editor action bar contributor code implementation of this method does nothing subclasses may reimplement this generally entails disconnecting from the old editor connecting to the new editor and updating the actions to reflect the new editor p param target editor the new target editor public void set active editor i editor part target editor editoractionbarcontributor targeteditor setactiveeditor ieditorpart targeteditor creates an empty editor action bar contributor the action bars are furnished later via the code init code method public editor action bar contributor editoractionbarcontributor contributes to the given menu p the code editor action bar contributor code implementation of this method does nothing subclasses may reimplement to add to the menu portion of this contribution p param menu manager the manager that controls the menu public void contribute to menu i menu manager menu manager editoractionbarcontributor menumanager contributetomenu imenumanager menumanager contributes to the given status line p the code editor action bar contributor code implementation of this method does nothing subclasses may reimplement to add to the status line portion of this contribution p param status line manager the manager of the status line public void contribute to status line i status line manager status line manager editoractionbarcontributor statuslinemanager contributetostatusline istatuslinemanager statuslinemanager contributes to the given tool bar p the code editor action bar contributor code implementation of this method does nothing subclasses may reimplement to add to the tool bar portion of this contribution p param tool bar manager the manager that controls the workbench tool bar public void contribute to tool bar i tool bar manager tool bar manager editoractionbarcontributor toolbarmanager contributetotoolbar itoolbarmanager toolbarmanager contributes to the given cool bar p the code editor action bar contributor code implementation of this method does nothing subclasses may reimplement to add to the cool bar portion of this contribution there can only be conributions from a cool bar or a tool bar p param cool bar manager the manager that controls the workbench cool bar since 3 0 public void contribute to cool bar i cool bar manager cool bar manager editoractionbarcontributor coolbarmanager contributetocoolbar icoolbarmanager coolbarmanager returns this contributor s action bars return the action bars public i action bars get action bars return bars iactionbars getactionbars returns this contributor s workbench page return the workbench page public i workbench page get page return page iworkbenchpage getpage the code editor action bar contributor code implementation of this code i editor action bar contributor code method does nothing subclasses may override public void dispose editoractionbarcontributor ieditoractionbarcontributor the code editor action bar contributor code implementation of this code i editor action bar contributor code method remembers the page then forwards the call to code init i action bars code for backward compatibility public void init i action bars bars i workbench page page this page page init bars editoractionbarcontributor ieditoractionbarcontributor iactionbars iactionbars iworkbenchpage this method calls ul li code contribute to menu code with code bars code menu manager li li code contribute to tool bar code with code bars code tool bar manager li li code contribute to cool bar code with code bars code cool bar manager if code i action bars code is of extended type code i action bars2 code li li code contribute to status line code with code bars code status line manager li ul the given action bars are also remembered and made accessible via code get action bars code param bars the action bars public void init i action bars bars this bars bars contribute to menu bars get menu manager contribute to tool bar bars get tool bar manager if bars instanceof i action bars2 contribute to cool bar i action bars2 bars get cool bar manager contribute to status line bars get status line manager contributetomenu contributetotoolbar contributetocoolbar iactionbars iactionbars2 contributetostatusline getactionbars iactionbars contributetomenu getmenumanager contributetotoolbar gettoolbarmanager iactionbars2 contributetocoolbar iactionbars2 getcoolbarmanager contributetostatusline getstatuslinemanager sets the active editor for the contributor p the code editor action bar contributor code implementation of this method does nothing subclasses may reimplement this generally entails disconnecting from the old editor connecting to the new editor and updating the actions to reflect the new editor p param target editor the new target editor public void set active editor i editor part target editor editoractionbarcontributor targeteditor setactiveeditor ieditorpart targeteditor creates an empty editor action bar contributor the action bars are furnished later via the code init code method public editor action bar contributor editoractionbarcontributor contributes to the given menu p the code editor action bar contributor code implementation of this method does nothing subclasses may reimplement to add to the menu portion of this contribution p param menu manager the manager that controls the menu public void contribute to menu i menu manager menu manager editoractionbarcontributor menumanager contributetomenu imenumanager menumanager contributes to the given status line p the code editor action bar contributor code implementation of this method does nothing subclasses may reimplement to add to the status line portion of this contribution p param status line manager the manager of the status line public void contribute to status line i status line manager status line manager editoractionbarcontributor statuslinemanager contributetostatusline istatuslinemanager statuslinemanager contributes to the given tool bar p the code editor action bar contributor code implementation of this method does nothing subclasses may reimplement to add to the tool bar portion of this contribution p param tool bar manager the manager that controls the workbench tool bar public void contribute to tool bar i tool bar manager tool bar manager editoractionbarcontributor toolbarmanager contributetotoolbar itoolbarmanager toolbarmanager contributes to the given cool bar p the code editor action bar contributor code implementation of this method does nothing subclasses may reimplement to add to the cool bar portion of this contribution there can only be conributions from a cool bar or a tool bar p param cool bar manager the manager that controls the workbench cool bar since 3 0 public void contribute to cool bar i cool bar manager cool bar manager editoractionbarcontributor coolbarmanager contributetocoolbar icoolbarmanager coolbarmanager returns this contributor s action bars return the action bars public i action bars get action bars return bars iactionbars getactionbars returns this contributor s workbench page return the workbench page public i workbench page get page return page iworkbenchpage getpage the code editor action bar contributor code implementation of this code i editor action bar contributor code method does nothing subclasses may override public void dispose editoractionbarcontributor ieditoractionbarcontributor the code editor action bar contributor code implementation of this code i editor action bar contributor code method remembers the page then forwards the call to code init i action bars code for backward compatibility public void init i action bars bars i workbench page page this page page init bars editoractionbarcontributor ieditoractionbarcontributor iactionbars iactionbars iworkbenchpage this method calls ul li code contribute to menu code with code bars code menu manager li li code contribute to tool bar code with code bars code tool bar manager li li code contribute to cool bar code with code bars code cool bar manager if code i action bars code is of extended type code i action bars2 code li li code contribute to status line code with code bars code status line manager li ul the given action bars are also remembered and made accessible via code get action bars code param bars the action bars public void init i action bars bars this bars bars contribute to menu bars get menu manager contribute to tool bar bars get tool bar manager if bars instanceof i action bars2 contribute to cool bar i action bars2 bars get cool bar manager contribute to status line bars get status line manager contributetomenu contributetotoolbar contributetocoolbar iactionbars iactionbars2 contributetostatusline getactionbars iactionbars contributetomenu getmenumanager contributetotoolbar gettoolbarmanager iactionbars2 contributetocoolbar iactionbars2 getcoolbarmanager contributetostatusline getstatuslinemanager sets the active editor for the contributor p the code editor action bar contributor code implementation of this method does nothing subclasses may reimplement this generally entails disconnecting from the old editor connecting to the new editor and updating the actions to reflect the new editor p param target editor the new target editor public void set active editor i editor part target editor editoractionbarcontributor targeteditor setactiveeditor ieditorpart targeteditor creates an empty editor action bar contributor the action bars are furnished later via the code init code method public editor action bar contributor editoractionbarcontributor contributes to the given menu p the code editor action bar contributor code implementation of this method does nothing subclasses may reimplement to add to the menu portion of this contribution p param menu manager the manager that controls the menu public void contribute to menu i menu manager menu manager editoractionbarcontributor menumanager contributetomenu imenumanager menumanager contributes to the given status line p the code editor action bar contributor code implementation of this method does nothing subclasses may reimplement to add to the status line portion of this contribution p param status line manager the manager of the status line public void contribute to status line i status line manager status line manager editoractionbarcontributor statuslinemanager contributetostatusline istatuslinemanager statuslinemanager contributes to the given tool bar p the code editor action bar contributor code implementation of this method does nothing subclasses may reimplement to add to the tool bar portion of this contribution p param tool bar manager the manager that controls the workbench tool bar public void contribute to tool bar i tool bar manager tool bar manager editoractionbarcontributor toolbarmanager contributetotoolbar itoolbarmanager toolbarmanager contributes to the given cool bar p the code editor action bar contributor code implementation of this method does nothing subclasses may reimplement to add to the cool bar portion of this contribution there can only be conributions from a cool bar or a tool bar p param cool bar manager the manager that controls the workbench cool bar since 3 0 public void contribute to cool bar i cool bar manager cool bar manager editoractionbarcontributor coolbarmanager contributetocoolbar icoolbarmanager coolbarmanager returns this contributor s action bars return the action bars public i action bars get action bars return bars iactionbars getactionbars returns this contributor s workbench page return the workbench page public i workbench page get page return page iworkbenchpage getpage the code editor action bar contributor code implementation of this code i editor action bar contributor code method does nothing subclasses may override public void dispose editoractionbarcontributor ieditoractionbarcontributor the code editor action bar contributor code implementation of this code i editor action bar contributor code method remembers the page then forwards the call to code init i action bars code for backward compatibility public void init i action bars bars i workbench page page this page page init bars editoractionbarcontributor ieditoractionbarcontributor iactionbars iactionbars iworkbenchpage this method calls ul li code contribute to menu code with code bars code menu manager li li code contribute to tool bar code with code bars code tool bar manager li li code contribute to cool bar code with code bars code cool bar manager if code i action bars code is of extended type code i action bars2 code li li code contribute to status line code with code bars code status line manager li ul the given action bars are also remembered and made accessible via code get action bars code param bars the action bars public void init i action bars bars this bars bars contribute to menu bars get menu manager contribute to tool bar bars get tool bar manager if bars instanceof i action bars2 contribute to cool bar i action bars2 bars get cool bar manager contribute to status line bars get status line manager contributetomenu contributetotoolbar contributetocoolbar iactionbars iactionbars2 contributetostatusline getactionbars iactionbars contributetomenu getmenumanager contributetotoolbar gettoolbarmanager iactionbars2 contributetocoolbar iactionbars2 getcoolbarmanager contributetostatusline getstatuslinemanager sets the active editor for the contributor p the code editor action bar contributor code implementation of this method does nothing subclasses may reimplement this generally entails disconnecting from the old editor connecting to the new editor and updating the actions to reflect the new editor p param target editor the new target editor public void set active editor i editor part target editor editoractionbarcontributor targeteditor setactiveeditor ieditorpart targeteditor creates an empty editor action bar contributor the action bars are furnished later via the code init code method public editor action bar contributor editoractionbarcontributor contributes to the given menu p the code editor action bar contributor code implementation of this method does nothing subclasses may reimplement to add to the menu portion of this contribution p param menu manager the manager that controls the menu public void contribute to menu i menu manager menu manager editoractionbarcontributor menumanager contributetomenu imenumanager menumanager contributes to the given status line p the code editor action bar contributor code implementation of this method does nothing subclasses may reimplement to add to the status line portion of this contribution p param status line manager the manager of the status line public void contribute to status line i status line manager status line manager editoractionbarcontributor statuslinemanager contributetostatusline istatuslinemanager statuslinemanager contributes to the given tool bar p the code editor action bar contributor code implementation of this method does nothing subclasses may reimplement to add to the tool bar portion of this contribution p param tool bar manager the manager that controls the workbench tool bar public void contribute to tool bar i tool bar manager tool bar manager editoractionbarcontributor toolbarmanager contributetotoolbar itoolbarmanager toolbarmanager contributes to the given cool bar p the code editor action bar contributor code implementation of this method does nothing subclasses may reimplement to add to the cool bar portion of this contribution there can only be conributions from a cool bar or a tool bar p param cool bar manager the manager that controls the workbench cool bar since 3 0 public void contribute to cool bar i cool bar manager cool bar manager editoractionbarcontributor coolbarmanager contributetocoolbar icoolbarmanager coolbarmanager returns this contributor s action bars return the action bars public i action bars get action bars return bars iactionbars getactionbars returns this contributor s workbench page return the workbench page public i workbench page get page return page iworkbenchpage getpage the code editor action bar contributor code implementation of this code i editor action bar contributor code method does nothing subclasses may override public void dispose editoractionbarcontributor ieditoractionbarcontributor the code editor action bar contributor code implementation of this code i editor action bar contributor code method remembers the page then forwards the call to code init i action bars code for backward compatibility public void init i action bars bars i workbench page page this page page init bars editoractionbarcontributor ieditoractionbarcontributor iactionbars iactionbars iworkbenchpage this method calls ul li code contribute to menu code with code bars code menu manager li li code contribute to tool bar code with code bars code tool bar manager li li code contribute to cool bar code with code bars code cool bar manager if code i action bars code is of extended type code i action bars2 code li li code contribute to status line code with code bars code status line manager li ul the given action bars are also remembered and made accessible via code get action bars code param bars the action bars public void init i action bars bars this bars bars contribute to menu bars get menu manager contribute to tool bar bars get tool bar manager if bars instanceof i action bars2 contribute to cool bar i action bars2 bars get cool bar manager contribute to status line bars get status line manager contributetomenu contributetotoolbar contributetocoolbar iactionbars iactionbars2 contributetostatusline getactionbars iactionbars contributetomenu getmenumanager contributetotoolbar gettoolbarmanager iactionbars2 contributetocoolbar iactionbars2 getcoolbarmanager contributetostatusline getstatuslinemanager sets the active editor for the contributor p the code editor action bar contributor code implementation of this method does nothing subclasses may reimplement this generally entails disconnecting from the old editor connecting to the new editor and updating the actions to reflect the new editor p param target editor the new target editor public void set active editor i editor part target editor editoractionbarcontributor targeteditor setactiveeditor ieditorpart targeteditor creates an empty editor action bar contributor the action bars are furnished later via the code init code method public editor action bar contributor editoractionbarcontributor contributes to the given menu p the code editor action bar contributor code implementation of this method does nothing subclasses may reimplement to add to the menu portion of this contribution p param menu manager the manager that controls the menu public void contribute to menu i menu manager menu manager editoractionbarcontributor menumanager contributetomenu imenumanager menumanager contributes to the given status line p the code editor action bar contributor code implementation of this method does nothing subclasses may reimplement to add to the status line portion of this contribution p param status line manager the manager of the status line public void contribute to status line i status line manager status line manager editoractionbarcontributor statuslinemanager contributetostatusline istatuslinemanager statuslinemanager contributes to the given tool bar p the code editor action bar contributor code implementation of this method does nothing subclasses may reimplement to add to the tool bar portion of this contribution p param tool bar manager the manager that controls the workbench tool bar public void contribute to tool bar i tool bar manager tool bar manager editoractionbarcontributor toolbarmanager contributetotoolbar itoolbarmanager toolbarmanager contributes to the given cool bar p the code editor action bar contributor code implementation of this method does nothing subclasses may reimplement to add to the cool bar portion of this contribution there can only be conributions from a cool bar or a tool bar p param cool bar manager the manager that controls the workbench cool bar since 3 0 public void contribute to cool bar i cool bar manager cool bar manager editoractionbarcontributor coolbarmanager contributetocoolbar icoolbarmanager coolbarmanager returns this contributor s action bars return the action bars public i action bars get action bars return bars iactionbars getactionbars returns this contributor s workbench page return the workbench page public i workbench page get page return page iworkbenchpage getpage the code editor action bar contributor code implementation of this code i editor action bar contributor code method does nothing subclasses may override public void dispose editoractionbarcontributor ieditoractionbarcontributor the code editor action bar contributor code implementation of this code i editor action bar contributor code method remembers the page then forwards the call to code init i action bars code for backward compatibility public void init i action bars bars i workbench page page this page page init bars editoractionbarcontributor ieditoractionbarcontributor iactionbars iactionbars iworkbenchpage this method calls ul li code contribute to menu code with code bars code menu manager li li code contribute to tool bar code with code bars code tool bar manager li li code contribute to cool bar code with code bars code cool bar manager if code i action bars code is of extended type code i action bars2 code li li code contribute to status line code with code bars code status line manager li ul the given action bars are also remembered and made accessible via code get action bars code param bars the action bars public void init i action bars bars this bars bars contribute to menu bars get menu manager contribute to tool bar bars get tool bar manager if bars instanceof i action bars2 contribute to cool bar i action bars2 bars get cool bar manager contribute to status line bars get status line manager contributetomenu contributetotoolbar contributetocoolbar iactionbars iactionbars2 contributetostatusline getactionbars iactionbars contributetomenu getmenumanager contributetotoolbar gettoolbarmanager iactionbars2 contributetocoolbar iactionbars2 getcoolbarmanager contributetostatusline getstatuslinemanager sets the active editor for the contributor p the code editor action bar contributor code implementation of this method does nothing subclasses may reimplement this generally entails disconnecting from the old editor connecting to the new editor and updating the actions to reflect the new editor p param target editor the new target editor public void set active editor i editor part target editor editoractionbarcontributor targeteditor setactiveeditor ieditorpart targeteditor creates an empty editor action bar contributor the action bars are furnished later via the code init code method public editor action bar contributor editoractionbarcontributor contributes to the given menu p the code editor action bar contributor code implementation of this method does nothing subclasses may reimplement to add to the menu portion of this contribution p param menu manager the manager that controls the menu public void contribute to menu i menu manager menu manager editoractionbarcontributor menumanager contributetomenu imenumanager menumanager contributes to the given status line p the code editor action bar contributor code implementation of this method does nothing subclasses may reimplement to add to the status line portion of this contribution p param status line manager the manager of the status line public void contribute to status line i status line manager status line manager editoractionbarcontributor statuslinemanager contributetostatusline istatuslinemanager statuslinemanager contributes to the given tool bar p the code editor action bar contributor code implementation of this method does nothing subclasses may reimplement to add to the tool bar portion of this contribution p param tool bar manager the manager that controls the workbench tool bar public void contribute to tool bar i tool bar manager tool bar manager editoractionbarcontributor toolbarmanager contributetotoolbar itoolbarmanager toolbarmanager contributes to the given cool bar p the code editor action bar contributor code implementation of this method does nothing subclasses may reimplement to add to the cool bar portion of this contribution there can only be conributions from a cool bar or a tool bar p param cool bar manager the manager that controls the workbench cool bar since 3 0 public void contribute to cool bar i cool bar manager cool bar manager editoractionbarcontributor coolbarmanager contributetocoolbar icoolbarmanager coolbarmanager returns this contributor s action bars return the action bars public i action bars get action bars return bars iactionbars getactionbars returns this contributor s workbench page return the workbench page public i workbench page get page return page iworkbenchpage getpage the code editor action bar contributor code implementation of this code i editor action bar contributor code method does nothing subclasses may override public void dispose editoractionbarcontributor ieditoractionbarcontributor the code editor action bar contributor code implementation of this code i editor action bar contributor code method remembers the page then forwards the call to code init i action bars code for backward compatibility public void init i action bars bars i workbench page page this page page init bars editoractionbarcontributor ieditoractionbarcontributor iactionbars iactionbars iworkbenchpage this method calls ul li code contribute to menu code with code bars code menu manager li li code contribute to tool bar code with code bars code tool bar manager li li code contribute to cool bar code with code bars code cool bar manager if code i action bars code is of extended type code i action bars2 code li li code contribute to status line code with code bars code status line manager li ul the given action bars are also remembered and made accessible via code get action bars code param bars the action bars public void init i action bars bars this bars bars contribute to menu bars get menu manager contribute to tool bar bars get tool bar manager if bars instanceof i action bars2 contribute to cool bar i action bars2 bars get cool bar manager contribute to status line bars get status line manager contributetomenu contributetotoolbar contributetocoolbar iactionbars iactionbars2 contributetostatusline getactionbars iactionbars contributetomenu getmenumanager contributetotoolbar gettoolbarmanager iactionbars2 contributetocoolbar iactionbars2 getcoolbarmanager contributetostatusline getstatuslinemanager sets the active editor for the contributor p the code editor action bar contributor code implementation of this method does nothing subclasses may reimplement this generally entails disconnecting from the old editor connecting to the new editor and updating the actions to reflect the new editor p param target editor the new target editor public void set active editor i editor part target editor editoractionbarcontributor targeteditor setactiveeditor ieditorpart targeteditor creates an empty editor action bar contributor the action bars are furnished later via the code init code method public editor action bar contributor editoractionbarcontributor contributes to the given menu p the code editor action bar contributor code implementation of this method does nothing subclasses may reimplement to add to the menu portion of this contribution p param menu manager the manager that controls the menu public void contribute to menu i menu manager menu manager editoractionbarcontributor menumanager contributetomenu imenumanager menumanager contributes to the given status line p the code editor action bar contributor code implementation of this method does nothing subclasses may reimplement to add to the status line portion of this contribution p param status line manager the manager of the status line public void contribute to status line i status line manager status line manager editoractionbarcontributor statuslinemanager contributetostatusline istatuslinemanager statuslinemanager contributes to the given tool bar p the code editor action bar contributor code implementation of this method does nothing subclasses may reimplement to add to the tool bar portion of this contribution p param tool bar manager the manager that controls the workbench tool bar public void contribute to tool bar i tool bar manager tool bar manager editoractionbarcontributor toolbarmanager contributetotoolbar itoolbarmanager toolbarmanager contributes to the given cool bar p the code editor action bar contributor code implementation of this method does nothing subclasses may reimplement to add to the cool bar portion of this contribution there can only be conributions from a cool bar or a tool bar p param cool bar manager the manager that controls the workbench cool bar since 3 0 public void contribute to cool bar i cool bar manager cool bar manager editoractionbarcontributor coolbarmanager contributetocoolbar icoolbarmanager coolbarmanager returns this contributor s action bars return the action bars public i action bars get action bars return bars iactionbars getactionbars returns this contributor s workbench page return the workbench page public i workbench page get page return page iworkbenchpage getpage the code editor action bar contributor code implementation of this code i editor action bar contributor code method does nothing subclasses may override public void dispose editoractionbarcontributor ieditoractionbarcontributor the code editor action bar contributor code implementation of this code i editor action bar contributor code method remembers the page then forwards the call to code init i action bars code for backward compatibility public void init i action bars bars i workbench page page this page page init bars editoractionbarcontributor ieditoractionbarcontributor iactionbars iactionbars iworkbenchpage this method calls ul li code contribute to menu code with code bars code menu manager li li code contribute to tool bar code with code bars code tool bar manager li li code contribute to cool bar code with code bars code cool bar manager if code i action bars code is of extended type code i action bars2 code li li code contribute to status line code with code bars code status line manager li ul the given action bars are also remembered and made accessible via code get action bars code param bars the action bars public void init i action bars bars this bars bars contribute to menu bars get menu manager contribute to tool bar bars get tool bar manager if bars instanceof i action bars2 contribute to cool bar i action bars2 bars get cool bar manager contribute to status line bars get status line manager contributetomenu contributetotoolbar contributetocoolbar iactionbars iactionbars2 contributetostatusline getactionbars iactionbars contributetomenu getmenumanager contributetotoolbar gettoolbarmanager iactionbars2 contributetocoolbar iactionbars2 getcoolbarmanager contributetostatusline getstatuslinemanager sets the active editor for the contributor p the code editor action bar contributor code implementation of this method does nothing subclasses may reimplement this generally entails disconnecting from the old editor connecting to the new editor and updating the actions to reflect the new editor p param target editor the new target editor public void set active editor i editor part target editor editoractionbarcontributor targeteditor setactiveeditor ieditorpart targeteditor creates an empty editor action bar contributor the action bars are furnished later via the code init code method public editor action bar contributor editoractionbarcontributor contributes to the given menu p the code editor action bar contributor code implementation of this method does nothing subclasses may reimplement to add to the menu portion of this contribution p param menu manager the manager that controls the menu public void contribute to menu i menu manager menu manager editoractionbarcontributor menumanager contributetomenu imenumanager menumanager contributes to the given status line p the code editor action bar contributor code implementation of this method does nothing subclasses may reimplement to add to the status line portion of this contribution p param status line manager the manager of the status line public void contribute to status line i status line manager status line manager editoractionbarcontributor statuslinemanager contributetostatusline istatuslinemanager statuslinemanager contributes to the given tool bar p the code editor action bar contributor code implementation of this method does nothing subclasses may reimplement to add to the tool bar portion of this contribution p param tool bar manager the manager that controls the workbench tool bar public void contribute to tool bar i tool bar manager tool bar manager editoractionbarcontributor toolbarmanager contributetotoolbar itoolbarmanager toolbarmanager contributes to the given cool bar p the code editor action bar contributor code implementation of this method does nothing subclasses may reimplement to add to the cool bar portion of this contribution there can only be conributions from a cool bar or a tool bar p param cool bar manager the manager that controls the workbench cool bar since 3 0 public void contribute to cool bar i cool bar manager cool bar manager editoractionbarcontributor coolbarmanager contributetocoolbar icoolbarmanager coolbarmanager returns this contributor s action bars return the action bars public i action bars get action bars return bars iactionbars getactionbars returns this contributor s workbench page return the workbench page public i workbench page get page return page iworkbenchpage getpage the code editor action bar contributor code implementation of this code i editor action bar contributor code method does nothing subclasses may override public void dispose editoractionbarcontributor ieditoractionbarcontributor the code editor action bar contributor code implementation of this code i editor action bar contributor code method remembers the page then forwards the call to code init i action bars code for backward compatibility public void init i action bars bars i workbench page page this page page init bars editoractionbarcontributor ieditoractionbarcontributor iactionbars iactionbars iworkbenchpage this method calls ul li code contribute to menu code with code bars code menu manager li li code contribute to tool bar code with code bars code tool bar manager li li code contribute to cool bar code with code bars code cool bar manager if code i action bars code is of extended type code i action bars2 code li li code contribute to status line code with code bars code status line manager li ul the given action bars are also remembered and made accessible via code get action bars code param bars the action bars public void init i action bars bars this bars bars contribute to menu bars get menu manager contribute to tool bar bars get tool bar manager if bars instanceof i action bars2 contribute to cool bar i action bars2 bars get cool bar manager contribute to status line bars get status line manager contributetomenu contributetotoolbar contributetocoolbar iactionbars iactionbars2 contributetostatusline getactionbars iactionbars contributetomenu getmenumanager contributetotoolbar gettoolbarmanager iactionbars2 contributetocoolbar iactionbars2 getcoolbarmanager contributetostatusline getstatuslinemanager sets the active editor for the contributor p the code editor action bar contributor code implementation of this method does nothing subclasses may reimplement this generally entails disconnecting from the old editor connecting to the new editor and updating the actions to reflect the new editor p param target editor the new target editor public void set active editor i editor part target editor editoractionbarcontributor targeteditor setactiveeditor ieditorpart targeteditor creates an empty editor action bar contributor the action bars are furnished later via the code init code method public editor action bar contributor editoractionbarcontributor contributes to the given menu p the code editor action bar contributor code implementation of this method does nothing subclasses may reimplement to add to the menu portion of this contribution p param menu manager the manager that controls the menu public void contribute to menu i menu manager menu manager editoractionbarcontributor menumanager contributetomenu imenumanager menumanager contributes to the given status line p the code editor action bar contributor code implementation of this method does nothing subclasses may reimplement to add to the status line portion of this contribution p param status line manager the manager of the status line public void contribute to status line i status line manager status line manager editoractionbarcontributor statuslinemanager contributetostatusline istatuslinemanager statuslinemanager contributes to the given tool bar p the code editor action bar contributor code implementation of this method does nothing subclasses may reimplement to add to the tool bar portion of this contribution p param tool bar manager the manager that controls the workbench tool bar public void contribute to tool bar i tool bar manager tool bar manager editoractionbarcontributor toolbarmanager contributetotoolbar itoolbarmanager toolbarmanager contributes to the given cool bar p the code editor action bar contributor code implementation of this method does nothing subclasses may reimplement to add to the cool bar portion of this contribution there can only be conributions from a cool bar or a tool bar p param cool bar manager the manager that controls the workbench cool bar since 3 0 public void contribute to cool bar i cool bar manager cool bar manager editoractionbarcontributor coolbarmanager contributetocoolbar icoolbarmanager coolbarmanager returns this contributor s action bars return the action bars public i action bars get action bars return bars iactionbars getactionbars returns this contributor s workbench page return the workbench page public i workbench page get page return page iworkbenchpage getpage the code editor action bar contributor code implementation of this code i editor action bar contributor code method does nothing subclasses may override public void dispose editoractionbarcontributor ieditoractionbarcontributor the code editor action bar contributor code implementation of this code i editor action bar contributor code method remembers the page then forwards the call to code init i action bars code for backward compatibility public void init i action bars bars i workbench page page this page page init bars editoractionbarcontributor ieditoractionbarcontributor iactionbars iactionbars iworkbenchpage this method calls ul li code contribute to menu code with code bars code menu manager li li code contribute to tool bar code with code bars code tool bar manager li li code contribute to cool bar code with code bars code cool bar manager if code i action bars code is of extended type code i action bars2 code li li code contribute to status line code with code bars code status line manager li ul the given action bars are also remembered and made accessible via code get action bars code param bars the action bars public void init i action bars bars this bars bars contribute to menu bars get menu manager contribute to tool bar bars get tool bar manager if bars instanceof i action bars2 contribute to cool bar i action bars2 bars get cool bar manager contribute to status line bars get status line manager contributetomenu contributetotoolbar contributetocoolbar iactionbars iactionbars2 contributetostatusline getactionbars iactionbars contributetomenu getmenumanager contributetotoolbar gettoolbarmanager iactionbars2 contributetocoolbar iactionbars2 getcoolbarmanager contributetostatusline getstatuslinemanager sets the active editor for the contributor p the code editor action bar contributor code implementation of this method does nothing subclasses may reimplement this generally entails disconnecting from the old editor connecting to the new editor and updating the actions to reflect the new editor p param target editor the new target editor public void set active editor i editor part target editor editoractionbarcontributor targeteditor setactiveeditor ieditorpart targeteditor see browser factory create browser public i web browser create browser string id string location string parameters return new safari browser id location parameters browserfactory createbrowser iwebbrowser createbrowser safaribrowser creates a new plug in runtime object this method is called by the platform if this class is used as a code bundle activator code this method is not needed used if this plug in requires the org eclipse core runtime compatibility plug in subclasses of code plugin code must call this method first in their constructors the resultant instance is not managed by the runtime and so should be remembered by the client typically using a singleton pattern b clients must never explicitly call this method b p p note the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p since 3 0 public plugin super bundleactivator creates a new plug in runtime object for the given plug in descriptor p instances of plug in runtime classes are automatically created by the platform in the course of plug in activation b clients must never explicitly call this method b p p note the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p param descriptor the plug in descriptor see get descriptor deprecated in eclipse 3 0 this constructor has been replaced by link plugin implementations of code my plugin i plugin descriptor descriptor code should be changed to code my plugin code and call code super code instead of code super descriptor code the code my plugin i plugin descriptor descriptor code constructor is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in public plugin i plugin descriptor descriptor assert is not null descriptor assert is true compatibility helper has plugin object descriptor nls bind messages plugin deactivatedload this get class get name descriptor get unique identifier is not activated non nls 1 this descriptor descriptor on plugin start find and start the corresponding bundle bundle internal platform get default get bundle descriptor get unique identifier try if bundle get state bundle starting bundle active bundle stopping 0 bundle start catch bundle exception e string message nls bind messages plugin startupproblems descriptor get unique identifier i status status new status i status error platform pi runtime i status error message e internal platform get default log status getdescriptor myplugin iplugindescriptor myplugin myplugin iplugindescriptor iplugindescriptor isnotnull istrue compatibilityhelper haspluginobject plugin_deactivatedload getclass getname getuniqueidentifier internalplatform getdefault getbundle getuniqueidentifier getstate bundleexception plugin_startupproblems getuniqueidentifier istatus istatus pi_runtime istatus internalplatform getdefault returns a url for the given path returns code null code if the url could not be computed or created param path path relative to plug in installation location return a url for the given path or code null code public final url find i path path return find support find bundle path null ipath findsupport returns a url for the given path returns code null code if the url could not be computed or created param path file path relative to plug in installation location param override map of override substitution arguments to be used for any arg path elements the map keys correspond to the substitution arguments eg nl or os the resulting values must be of type java lang string if the map is code null code or does not contain the required substitution argument the default is used return a url for the given path or code null code public final url find i path path map override return find support find bundle path override ipath findsupport returns the plug in descriptor for this plug in runtime object return the plug in descriptor for this plug in runtime object deprecated code i plugin descriptor code was refactored in eclipse 3 0 the code get descriptor code method may only be called by plug ins which explicitly require the org eclipse core runtime compatibility plug in see the comments on link i plugin descriptor and its methods for details public final i plugin descriptor get descriptor if descriptor null return descriptor return initialize descriptor bundle get symbolic name iplugindescriptor getdescriptor iplugindescriptor iplugindescriptor getdescriptor initializedescriptor getsymbolicname returns the log for this plug in if no such log exists one is created return the log for this plug in public final i log get log return internal platform get default get log bundle ilog getlog internalplatform getdefault getlog returns the location in the local file system of the plug in state area for this plug in if the plug in state area did not exist prior to this call it is created p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings and other configuration parameters p throws illegal state exception when the system is running with no data area data none or when a data area has not been set yet return a local file system path public final i path get state location throws illegal state exception return internal platform get default get state location bundle true illegalstateexception ipath getstatelocation illegalstateexception internalplatform getdefault getstatelocation returns the preference store for this plug in p note that if an error occurs reading the preference store from disk an empty preference store is quietly created initialized with defaults and returned p p calling this method may cause the preference store to be created and initialized subclasses which reimplement the code initialize default plugin preferences code method have this opportunity to initialize preference default values just prior to processing override default values imposed externally to this plug in specified for the product or at platform start up p p after settings in the preference store are changed for example with code preferences set value code or code set to default code code save plugin preferences code should be called to store the changed values back to disk otherwise the changes will be lost on plug in shutdown p return the preference store see save plugin preferences see preferences set value string string see preferences set to default string since 2 0 public final preferences get plugin preferences if preferences null if internal platform debug preference general policy debug plugin preferences already loaded for bundle get symbolic name non nls 1 return preferences if internal platform debug preference general policy debug loading preferences for plugin bundle get symbolic name non nls 1 preferences new preference forwarder this bundle get symbolic name return preferences initializedefaultpluginpreferences setvalue settodefault savepluginpreferences savepluginpreferences setvalue settodefault getpluginpreferences internalplatform debug_preference_general getsymbolicname internalplatform debug_preference_general getsymbolicname preferenceforwarder getsymbolicname saves preferences settings for this plug in does nothing if the preference store does not need saving p plug in preferences are b not b saved automatically on plug in shutdown p see preferences store output stream string see preferences needs saving since 2 0 public final void save plugin preferences populate the preferences instvar we still might need to save them because someone else might have made changes via the os gi ap is get plugin preferences try preferences flush catch backing store exception e i status status new status i status error platform pi runtime i status error messages preferences saveproblems e internal platform get default log status outputstream needssaving savepluginpreferences osgi apis getpluginpreferences backingstoreexception istatus istatus pi_runtime istatus preferences_saveproblems internalplatform getdefault initializes the default preferences settings for this plug in p this method is called sometime after the preference store for this plug in is created default values are never stored in preference stores they must be filled in each time this method provides the opportunity to initialize the default values p p the default implementation of this method does nothing a subclass that needs to set default values for its preferences must reimplement this method default values set at a later point will override any default override settings supplied from outside the plug in product configuration or platform start up p since 2 0 deprecated this method has been refactored in the new preference mechanism to handle the case where the runtime compatibility layer does not exist the contents of this method should be moved to the method named code initialize default preferences code in a separate subclass of link org eclipse core runtime preferences abstract preference initializer this class should be contributed via the code org eclipse core runtime preferences code extension point pre lt extension point quo org eclipse core runtime preferences quo gt lt initializer class quo com example my preference initializer quo gt lt extension gt package com example public class my preference initializer extends abstract preference initializer public my preference initializer super public void initialize default preferences preferences node new default scope get node my plugin id node put key value pre protected void initialize default plugin preferences default implementation of this method spec d to do nothing initializedefaultpreferences abstractpreferenceinitializer mypreferenceinitializer mypreferenceinitializer abstractpreferenceinitializer mypreferenceinitializer initializedefaultpreferences defaultscope getnode initializedefaultpluginpreferences internal method this method is a hook for initialization of default preference values it should not be called by clients since 3 0 public final void internal initialize default plugin preferences initialize default plugin preferences internalinitializedefaultpluginpreferences initializedefaultpluginpreferences returns whether this plug in is in debug mode by default plug ins are not in debug mode a plug in can put itself into debug mode or the user can set an execution option to do so p note that the plug in s debug flag is initialized when the plug in is started the result of calling this method before the plug in has started is unspecified p return whether this plug in is in debug mode public boolean is debugging return debug isdebugging returns an input stream for the specified file the file path must be specified relative this the plug in s installation location param file path relative to plug in installation location return an input stream exception io exception if the given path cannot be found in this plug in see open stream i path boolean public final input stream open stream i path file throws io exception return find support open stream bundle file false ioexception openstream ipath inputstream openstream ipath ioexception findsupport openstream returns an input stream for the specified file the file path must be specified relative to this plug in s installation location optionally the platform searches for the correct localized version of the specified file using the users current locale and java naming convention for localized resource files locale suffix appended to the specified file extension p the caller must close the returned stream when done p param file path relative to plug in installation location param localized code true code for the localized version of the file and code false code for the file exactly as specified return an input stream exception io exception if the given path cannot be found in this plug in public final input stream open stream i path file boolean localized throws io exception return find support open stream bundle file localized ioexception inputstream openstream ipath ioexception findsupport openstream sets whether this plug in is in debug mode by default plug ins are not in debug mode a plug in can put itself into debug mode or the user can set a debug option to do so p note that the plug in s debug flag is initialized when the plug in is started the result of calling this method before the plug in has started is unspecified p param value whether or not this plug in is in debug mode public void set debugging boolean value debug value setdebugging shuts down this plug in and discards all plug in state p this method should be re implemented in subclasses that need to do something when the plug in is shut down implementors should call the inherited method to ensure that any system requirements can be met p p plug in shutdown code should be robust in particular this method should always make an effort to shut down the plug in furthermore the code should not assume that the plug in was started successfully as this method will be invoked in the event of a failure during startup p p note 1 if a plug in has been started this method will be automatically invoked by the platform when the platform is shut down p p note 2 this method is intended to perform simple termination of the plug in environment the platform may terminate invocations that do not complete in a timely fashion p b clients must never explicitly call this method b p exception core exception if this method fails to shut down this plug in deprecated in eclipse 3 0 this method has been replaced by link plugin stop bundle context context implementations of code shutdown code should be changed to override code stop bundle context context code and call code super stop context code instead of code super shutdown code the code shutdown code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in public void shutdown throws core exception if compatibility helper initialize compatibility null return throwable exception null method m try m descriptor get class get method do plugin deactivation new class 0 non nls 1 m invoke descriptor null catch security exception e exception e catch no such method exception e exception e catch illegal argument exception e exception e catch illegal access exception e exception e catch invocation target exception e exception e if exception null return string message nls bind messages plugin shutdownproblems descriptor get unique identifier i status status new status i status error platform pi runtime i status error message exception internal platform get default log status coreexception bundlecontext bundlecontext coreexception compatibilityhelper initializecompatibility getclass getmethod doplugindeactivation securityexception nosuchmethodexception illegalargumentexception illegalaccessexception invocationtargetexception plugin_shutdownproblems getuniqueidentifier istatus istatus pi_runtime istatus internalplatform getdefault starts up this plug in p this method should be overridden in subclasses that need to do something when this plug in is started implementors should call the inherited method to ensure that any system requirements can be met p p if this method throws an exception it is taken as an indication that plug in initialization has failed as a result the plug in will not be activated moreover the plug in will be marked as disabled and ineligible for activation for the duration p p plug in startup code should be robust in the event of a startup failure the plug in s code shutdown code method will be invoked automatically in an attempt to close open files etc p p note 1 this method is automatically invoked by the platform the first time any code in the plug in is executed p p note 2 this method is intended to perform simple initialization of the plug in environment the platform may terminate initializers that do not complete in a timely fashion p p note 3 the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p b clients must never explicitly call this method b p exception core exception if this plug in did not start up properly deprecated in eclipse 3 0 this method has been replaced by link plugin start bundle context context implementations of code startup code should be changed to extend code start bundle context context code and call code super start context code instead of code super startup code the code startup code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in public void startup throws core exception coreexception bundlecontext bundlecontext coreexception returns a string representation of the plug in suitable for debugging purposes only public string to string string name bundle get symbolic name return name null new long bundle get bundle id to string name tostring getsymbolicname getbundleid tostring starts up this plug in p this method should be overridden in subclasses that need to do something when this plug in is started implementors should call the inherited method at the first possible point to ensure that any system requirements can be met p p if this method throws an exception it is taken as an indication that plug in initialization has failed as a result the plug in will not be activated moreover the plug in will be marked as disabled and ineligible for activation for the duration p p plug in startup code should be robust in the event of a startup failure the plug in s code shutdown code method will be invoked automatically in an attempt to close open files etc p p note 1 this method is automatically invoked by the platform the first time any code in the plug in is executed p p note 2 this method is intended to perform simple initialization of the plug in environment the platform may terminate initializers that do not complete in a timely fashion p p note 3 the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p p note 4 the supplied bundle context represents the plug in to the os gi framework for security reasons it is strongly recommended that this object should not be divulged p b clients must never explicitly call this method b param context the bundle context for this plug in exception exception if this plug in did not start up properly since 3 0 public void start bundle context context throws exception bundle context get bundle string symbolic name bundle get symbolic name if symbolic name null string key symbolic name debug non nls 1 string value internal platform get default get option key this debug value null false value equals ignore case true non nls 1 initialize descriptor symbolic name osgi bundlecontext getbundle symbolicname getsymbolicname symbolicname symbolicname internalplatform getdefault getoption equalsignorecase initializedescriptor symbolicname deprecated marked as deprecated to suppress deprecation warnings private i plugin descriptor initialize descriptor string symbolic name if compatibility helper initialize compatibility null return null this associate a descriptor to any real bundle that uses this to start if symbolic name null return null i plugin descriptor tmp compatibility helper get plugin descriptor symbolic name runtime descriptor is never set to support dynamic re installation of compatibility if symbolic name equals platform pi runtime descriptor tmp compatibility helper set plugin tmp this compatibility helper set active tmp return tmp iplugindescriptor initializedescriptor symbolicname compatibilityhelper initializecompatibility symbolicname iplugindescriptor compatibilityhelper getplugindescriptor symbolicname symbolicname pi_runtime compatibilityhelper setplugin compatibilityhelper setactive stops this plug in p this method should be re implemented in subclasses that need to do something when the plug in is shut down implementors should call the inherited method as late as possible to ensure that any system requirements can be met p p plug in shutdown code should be robust in particular this method should always make an effort to shut down the plug in furthermore the code should not assume that the plug in was started successfully as this method will be invoked in the event of a failure during startup p p note 1 if a plug in has been automatically started this method will be automatically invoked by the platform when the platform is shut down p p note 2 this method is intended to perform simple termination of the plug in environment the platform may terminate invocations that do not complete in a timely fashion p p note 3 the supplied bundle context represents the plug in to the os gi framework for security reasons it is strongly recommended that this object should not be divulged p b clients must never explicitly call this method b param context the bundle context for this plug in exception exception if this method fails to shut down this plug in since 3 0 public void stop bundle context context throws exception sub classes to override osgi bundlecontext returns the bundle associated with this plug in return the associated bundle since 3 0 public final bundle get bundle return bundle getbundle creates a new plug in runtime object this method is called by the platform if this class is used as a code bundle activator code this method is not needed used if this plug in requires the org eclipse core runtime compatibility plug in subclasses of code plugin code must call this method first in their constructors the resultant instance is not managed by the runtime and so should be remembered by the client typically using a singleton pattern b clients must never explicitly call this method b p p note the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p since 3 0 public plugin super bundleactivator creates a new plug in runtime object for the given plug in descriptor p instances of plug in runtime classes are automatically created by the platform in the course of plug in activation b clients must never explicitly call this method b p p note the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p param descriptor the plug in descriptor see get descriptor deprecated in eclipse 3 0 this constructor has been replaced by link plugin implementations of code my plugin i plugin descriptor descriptor code should be changed to code my plugin code and call code super code instead of code super descriptor code the code my plugin i plugin descriptor descriptor code constructor is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in public plugin i plugin descriptor descriptor assert is not null descriptor assert is true compatibility helper has plugin object descriptor nls bind messages plugin deactivatedload this get class get name descriptor get unique identifier is not activated non nls 1 this descriptor descriptor on plugin start find and start the corresponding bundle bundle internal platform get default get bundle descriptor get unique identifier try if bundle get state bundle starting bundle active bundle stopping 0 bundle start catch bundle exception e string message nls bind messages plugin startupproblems descriptor get unique identifier i status status new status i status error platform pi runtime i status error message e internal platform get default log status getdescriptor myplugin iplugindescriptor myplugin myplugin iplugindescriptor iplugindescriptor isnotnull istrue compatibilityhelper haspluginobject plugin_deactivatedload getclass getname getuniqueidentifier internalplatform getdefault getbundle getuniqueidentifier getstate bundleexception plugin_startupproblems getuniqueidentifier istatus istatus pi_runtime istatus internalplatform getdefault returns a url for the given path returns code null code if the url could not be computed or created param path path relative to plug in installation location return a url for the given path or code null code public final url find i path path return find support find bundle path null ipath findsupport returns a url for the given path returns code null code if the url could not be computed or created param path file path relative to plug in installation location param override map of override substitution arguments to be used for any arg path elements the map keys correspond to the substitution arguments eg nl or os the resulting values must be of type java lang string if the map is code null code or does not contain the required substitution argument the default is used return a url for the given path or code null code public final url find i path path map override return find support find bundle path override ipath findsupport returns the plug in descriptor for this plug in runtime object return the plug in descriptor for this plug in runtime object deprecated code i plugin descriptor code was refactored in eclipse 3 0 the code get descriptor code method may only be called by plug ins which explicitly require the org eclipse core runtime compatibility plug in see the comments on link i plugin descriptor and its methods for details public final i plugin descriptor get descriptor if descriptor null return descriptor return initialize descriptor bundle get symbolic name iplugindescriptor getdescriptor iplugindescriptor iplugindescriptor getdescriptor initializedescriptor getsymbolicname returns the log for this plug in if no such log exists one is created return the log for this plug in public final i log get log return internal platform get default get log bundle ilog getlog internalplatform getdefault getlog returns the location in the local file system of the plug in state area for this plug in if the plug in state area did not exist prior to this call it is created p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings and other configuration parameters p throws illegal state exception when the system is running with no data area data none or when a data area has not been set yet return a local file system path public final i path get state location throws illegal state exception return internal platform get default get state location bundle true illegalstateexception ipath getstatelocation illegalstateexception internalplatform getdefault getstatelocation returns the preference store for this plug in p note that if an error occurs reading the preference store from disk an empty preference store is quietly created initialized with defaults and returned p p calling this method may cause the preference store to be created and initialized subclasses which reimplement the code initialize default plugin preferences code method have this opportunity to initialize preference default values just prior to processing override default values imposed externally to this plug in specified for the product or at platform start up p p after settings in the preference store are changed for example with code preferences set value code or code set to default code code save plugin preferences code should be called to store the changed values back to disk otherwise the changes will be lost on plug in shutdown p return the preference store see save plugin preferences see preferences set value string string see preferences set to default string since 2 0 public final preferences get plugin preferences if preferences null if internal platform debug preference general policy debug plugin preferences already loaded for bundle get symbolic name non nls 1 return preferences if internal platform debug preference general policy debug loading preferences for plugin bundle get symbolic name non nls 1 preferences new preference forwarder this bundle get symbolic name return preferences initializedefaultpluginpreferences setvalue settodefault savepluginpreferences savepluginpreferences setvalue settodefault getpluginpreferences internalplatform debug_preference_general getsymbolicname internalplatform debug_preference_general getsymbolicname preferenceforwarder getsymbolicname saves preferences settings for this plug in does nothing if the preference store does not need saving p plug in preferences are b not b saved automatically on plug in shutdown p see preferences store output stream string see preferences needs saving since 2 0 public final void save plugin preferences populate the preferences instvar we still might need to save them because someone else might have made changes via the os gi ap is get plugin preferences try preferences flush catch backing store exception e i status status new status i status error platform pi runtime i status error messages preferences saveproblems e internal platform get default log status outputstream needssaving savepluginpreferences osgi apis getpluginpreferences backingstoreexception istatus istatus pi_runtime istatus preferences_saveproblems internalplatform getdefault initializes the default preferences settings for this plug in p this method is called sometime after the preference store for this plug in is created default values are never stored in preference stores they must be filled in each time this method provides the opportunity to initialize the default values p p the default implementation of this method does nothing a subclass that needs to set default values for its preferences must reimplement this method default values set at a later point will override any default override settings supplied from outside the plug in product configuration or platform start up p since 2 0 deprecated this method has been refactored in the new preference mechanism to handle the case where the runtime compatibility layer does not exist the contents of this method should be moved to the method named code initialize default preferences code in a separate subclass of link org eclipse core runtime preferences abstract preference initializer this class should be contributed via the code org eclipse core runtime preferences code extension point pre lt extension point quo org eclipse core runtime preferences quo gt lt initializer class quo com example my preference initializer quo gt lt extension gt package com example public class my preference initializer extends abstract preference initializer public my preference initializer super public void initialize default preferences preferences node new default scope get node my plugin id node put key value pre protected void initialize default plugin preferences default implementation of this method spec d to do nothing initializedefaultpreferences abstractpreferenceinitializer mypreferenceinitializer mypreferenceinitializer abstractpreferenceinitializer mypreferenceinitializer initializedefaultpreferences defaultscope getnode initializedefaultpluginpreferences internal method this method is a hook for initialization of default preference values it should not be called by clients since 3 0 public final void internal initialize default plugin preferences initialize default plugin preferences internalinitializedefaultpluginpreferences initializedefaultpluginpreferences returns whether this plug in is in debug mode by default plug ins are not in debug mode a plug in can put itself into debug mode or the user can set an execution option to do so p note that the plug in s debug flag is initialized when the plug in is started the result of calling this method before the plug in has started is unspecified p return whether this plug in is in debug mode public boolean is debugging return debug isdebugging returns an input stream for the specified file the file path must be specified relative this the plug in s installation location param file path relative to plug in installation location return an input stream exception io exception if the given path cannot be found in this plug in see open stream i path boolean public final input stream open stream i path file throws io exception return find support open stream bundle file false ioexception openstream ipath inputstream openstream ipath ioexception findsupport openstream returns an input stream for the specified file the file path must be specified relative to this plug in s installation location optionally the platform searches for the correct localized version of the specified file using the users current locale and java naming convention for localized resource files locale suffix appended to the specified file extension p the caller must close the returned stream when done p param file path relative to plug in installation location param localized code true code for the localized version of the file and code false code for the file exactly as specified return an input stream exception io exception if the given path cannot be found in this plug in public final input stream open stream i path file boolean localized throws io exception return find support open stream bundle file localized ioexception inputstream openstream ipath ioexception findsupport openstream sets whether this plug in is in debug mode by default plug ins are not in debug mode a plug in can put itself into debug mode or the user can set a debug option to do so p note that the plug in s debug flag is initialized when the plug in is started the result of calling this method before the plug in has started is unspecified p param value whether or not this plug in is in debug mode public void set debugging boolean value debug value setdebugging shuts down this plug in and discards all plug in state p this method should be re implemented in subclasses that need to do something when the plug in is shut down implementors should call the inherited method to ensure that any system requirements can be met p p plug in shutdown code should be robust in particular this method should always make an effort to shut down the plug in furthermore the code should not assume that the plug in was started successfully as this method will be invoked in the event of a failure during startup p p note 1 if a plug in has been started this method will be automatically invoked by the platform when the platform is shut down p p note 2 this method is intended to perform simple termination of the plug in environment the platform may terminate invocations that do not complete in a timely fashion p b clients must never explicitly call this method b p exception core exception if this method fails to shut down this plug in deprecated in eclipse 3 0 this method has been replaced by link plugin stop bundle context context implementations of code shutdown code should be changed to override code stop bundle context context code and call code super stop context code instead of code super shutdown code the code shutdown code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in public void shutdown throws core exception if compatibility helper initialize compatibility null return throwable exception null method m try m descriptor get class get method do plugin deactivation new class 0 non nls 1 m invoke descriptor null catch security exception e exception e catch no such method exception e exception e catch illegal argument exception e exception e catch illegal access exception e exception e catch invocation target exception e exception e if exception null return string message nls bind messages plugin shutdownproblems descriptor get unique identifier i status status new status i status error platform pi runtime i status error message exception internal platform get default log status coreexception bundlecontext bundlecontext coreexception compatibilityhelper initializecompatibility getclass getmethod doplugindeactivation securityexception nosuchmethodexception illegalargumentexception illegalaccessexception invocationtargetexception plugin_shutdownproblems getuniqueidentifier istatus istatus pi_runtime istatus internalplatform getdefault starts up this plug in p this method should be overridden in subclasses that need to do something when this plug in is started implementors should call the inherited method to ensure that any system requirements can be met p p if this method throws an exception it is taken as an indication that plug in initialization has failed as a result the plug in will not be activated moreover the plug in will be marked as disabled and ineligible for activation for the duration p p plug in startup code should be robust in the event of a startup failure the plug in s code shutdown code method will be invoked automatically in an attempt to close open files etc p p note 1 this method is automatically invoked by the platform the first time any code in the plug in is executed p p note 2 this method is intended to perform simple initialization of the plug in environment the platform may terminate initializers that do not complete in a timely fashion p p note 3 the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p b clients must never explicitly call this method b p exception core exception if this plug in did not start up properly deprecated in eclipse 3 0 this method has been replaced by link plugin start bundle context context implementations of code startup code should be changed to extend code start bundle context context code and call code super start context code instead of code super startup code the code startup code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in public void startup throws core exception coreexception bundlecontext bundlecontext coreexception returns a string representation of the plug in suitable for debugging purposes only public string to string string name bundle get symbolic name return name null new long bundle get bundle id to string name tostring getsymbolicname getbundleid tostring starts up this plug in p this method should be overridden in subclasses that need to do something when this plug in is started implementors should call the inherited method at the first possible point to ensure that any system requirements can be met p p if this method throws an exception it is taken as an indication that plug in initialization has failed as a result the plug in will not be activated moreover the plug in will be marked as disabled and ineligible for activation for the duration p p plug in startup code should be robust in the event of a startup failure the plug in s code shutdown code method will be invoked automatically in an attempt to close open files etc p p note 1 this method is automatically invoked by the platform the first time any code in the plug in is executed p p note 2 this method is intended to perform simple initialization of the plug in environment the platform may terminate initializers that do not complete in a timely fashion p p note 3 the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p p note 4 the supplied bundle context represents the plug in to the os gi framework for security reasons it is strongly recommended that this object should not be divulged p b clients must never explicitly call this method b param context the bundle context for this plug in exception exception if this plug in did not start up properly since 3 0 public void start bundle context context throws exception bundle context get bundle string symbolic name bundle get symbolic name if symbolic name null string key symbolic name debug non nls 1 string value internal platform get default get option key this debug value null false value equals ignore case true non nls 1 initialize descriptor symbolic name osgi bundlecontext getbundle symbolicname getsymbolicname symbolicname symbolicname internalplatform getdefault getoption equalsignorecase initializedescriptor symbolicname deprecated marked as deprecated to suppress deprecation warnings private i plugin descriptor initialize descriptor string symbolic name if compatibility helper initialize compatibility null return null this associate a descriptor to any real bundle that uses this to start if symbolic name null return null i plugin descriptor tmp compatibility helper get plugin descriptor symbolic name runtime descriptor is never set to support dynamic re installation of compatibility if symbolic name equals platform pi runtime descriptor tmp compatibility helper set plugin tmp this compatibility helper set active tmp return tmp iplugindescriptor initializedescriptor symbolicname compatibilityhelper initializecompatibility symbolicname iplugindescriptor compatibilityhelper getplugindescriptor symbolicname symbolicname pi_runtime compatibilityhelper setplugin compatibilityhelper setactive stops this plug in p this method should be re implemented in subclasses that need to do something when the plug in is shut down implementors should call the inherited method as late as possible to ensure that any system requirements can be met p p plug in shutdown code should be robust in particular this method should always make an effort to shut down the plug in furthermore the code should not assume that the plug in was started successfully as this method will be invoked in the event of a failure during startup p p note 1 if a plug in has been automatically started this method will be automatically invoked by the platform when the platform is shut down p p note 2 this method is intended to perform simple termination of the plug in environment the platform may terminate invocations that do not complete in a timely fashion p p note 3 the supplied bundle context represents the plug in to the os gi framework for security reasons it is strongly recommended that this object should not be divulged p b clients must never explicitly call this method b param context the bundle context for this plug in exception exception if this method fails to shut down this plug in since 3 0 public void stop bundle context context throws exception sub classes to override osgi bundlecontext returns the bundle associated with this plug in return the associated bundle since 3 0 public final bundle get bundle return bundle getbundle creates a new plug in runtime object this method is called by the platform if this class is used as a code bundle activator code this method is not needed used if this plug in requires the org eclipse core runtime compatibility plug in subclasses of code plugin code must call this method first in their constructors the resultant instance is not managed by the runtime and so should be remembered by the client typically using a singleton pattern b clients must never explicitly call this method b p p note the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p since 3 0 public plugin super bundleactivator creates a new plug in runtime object for the given plug in descriptor p instances of plug in runtime classes are automatically created by the platform in the course of plug in activation b clients must never explicitly call this method b p p note the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p param descriptor the plug in descriptor see get descriptor deprecated in eclipse 3 0 this constructor has been replaced by link plugin implementations of code my plugin i plugin descriptor descriptor code should be changed to code my plugin code and call code super code instead of code super descriptor code the code my plugin i plugin descriptor descriptor code constructor is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in public plugin i plugin descriptor descriptor assert is not null descriptor assert is true compatibility helper has plugin object descriptor nls bind messages plugin deactivatedload this get class get name descriptor get unique identifier is not activated non nls 1 this descriptor descriptor on plugin start find and start the corresponding bundle bundle internal platform get default get bundle descriptor get unique identifier try if bundle get state bundle starting bundle active bundle stopping 0 bundle start catch bundle exception e string message nls bind messages plugin startupproblems descriptor get unique identifier i status status new status i status error platform pi runtime i status error message e internal platform get default log status getdescriptor myplugin iplugindescriptor myplugin myplugin iplugindescriptor iplugindescriptor isnotnull istrue compatibilityhelper haspluginobject plugin_deactivatedload getclass getname getuniqueidentifier internalplatform getdefault getbundle getuniqueidentifier getstate bundleexception plugin_startupproblems getuniqueidentifier istatus istatus pi_runtime istatus internalplatform getdefault returns a url for the given path returns code null code if the url could not be computed or created param path path relative to plug in installation location return a url for the given path or code null code public final url find i path path return find support find bundle path null ipath findsupport returns a url for the given path returns code null code if the url could not be computed or created param path file path relative to plug in installation location param override map of override substitution arguments to be used for any arg path elements the map keys correspond to the substitution arguments eg nl or os the resulting values must be of type java lang string if the map is code null code or does not contain the required substitution argument the default is used return a url for the given path or code null code public final url find i path path map override return find support find bundle path override ipath findsupport returns the plug in descriptor for this plug in runtime object return the plug in descriptor for this plug in runtime object deprecated code i plugin descriptor code was refactored in eclipse 3 0 the code get descriptor code method may only be called by plug ins which explicitly require the org eclipse core runtime compatibility plug in see the comments on link i plugin descriptor and its methods for details public final i plugin descriptor get descriptor if descriptor null return descriptor return initialize descriptor bundle get symbolic name iplugindescriptor getdescriptor iplugindescriptor iplugindescriptor getdescriptor initializedescriptor getsymbolicname returns the log for this plug in if no such log exists one is created return the log for this plug in public final i log get log return internal platform get default get log bundle ilog getlog internalplatform getdefault getlog returns the location in the local file system of the plug in state area for this plug in if the plug in state area did not exist prior to this call it is created p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings and other configuration parameters p throws illegal state exception when the system is running with no data area data none or when a data area has not been set yet return a local file system path public final i path get state location throws illegal state exception return internal platform get default get state location bundle true illegalstateexception ipath getstatelocation illegalstateexception internalplatform getdefault getstatelocation returns the preference store for this plug in p note that if an error occurs reading the preference store from disk an empty preference store is quietly created initialized with defaults and returned p p calling this method may cause the preference store to be created and initialized subclasses which reimplement the code initialize default plugin preferences code method have this opportunity to initialize preference default values just prior to processing override default values imposed externally to this plug in specified for the product or at platform start up p p after settings in the preference store are changed for example with code preferences set value code or code set to default code code save plugin preferences code should be called to store the changed values back to disk otherwise the changes will be lost on plug in shutdown p return the preference store see save plugin preferences see preferences set value string string see preferences set to default string since 2 0 public final preferences get plugin preferences if preferences null if internal platform debug preference general policy debug plugin preferences already loaded for bundle get symbolic name non nls 1 return preferences if internal platform debug preference general policy debug loading preferences for plugin bundle get symbolic name non nls 1 preferences new preference forwarder this bundle get symbolic name return preferences initializedefaultpluginpreferences setvalue settodefault savepluginpreferences savepluginpreferences setvalue settodefault getpluginpreferences internalplatform debug_preference_general getsymbolicname internalplatform debug_preference_general getsymbolicname preferenceforwarder getsymbolicname saves preferences settings for this plug in does nothing if the preference store does not need saving p plug in preferences are b not b saved automatically on plug in shutdown p see preferences store output stream string see preferences needs saving since 2 0 public final void save plugin preferences populate the preferences instvar we still might need to save them because someone else might have made changes via the os gi ap is get plugin preferences try preferences flush catch backing store exception e i status status new status i status error platform pi runtime i status error messages preferences saveproblems e internal platform get default log status outputstream needssaving savepluginpreferences osgi apis getpluginpreferences backingstoreexception istatus istatus pi_runtime istatus preferences_saveproblems internalplatform getdefault initializes the default preferences settings for this plug in p this method is called sometime after the preference store for this plug in is created default values are never stored in preference stores they must be filled in each time this method provides the opportunity to initialize the default values p p the default implementation of this method does nothing a subclass that needs to set default values for its preferences must reimplement this method default values set at a later point will override any default override settings supplied from outside the plug in product configuration or platform start up p since 2 0 deprecated this method has been refactored in the new preference mechanism to handle the case where the runtime compatibility layer does not exist the contents of this method should be moved to the method named code initialize default preferences code in a separate subclass of link org eclipse core runtime preferences abstract preference initializer this class should be contributed via the code org eclipse core runtime preferences code extension point pre lt extension point quo org eclipse core runtime preferences quo gt lt initializer class quo com example my preference initializer quo gt lt extension gt package com example public class my preference initializer extends abstract preference initializer public my preference initializer super public void initialize default preferences preferences node new default scope get node my plugin id node put key value pre protected void initialize default plugin preferences default implementation of this method spec d to do nothing initializedefaultpreferences abstractpreferenceinitializer mypreferenceinitializer mypreferenceinitializer abstractpreferenceinitializer mypreferenceinitializer initializedefaultpreferences defaultscope getnode initializedefaultpluginpreferences internal method this method is a hook for initialization of default preference values it should not be called by clients since 3 0 public final void internal initialize default plugin preferences initialize default plugin preferences internalinitializedefaultpluginpreferences initializedefaultpluginpreferences returns whether this plug in is in debug mode by default plug ins are not in debug mode a plug in can put itself into debug mode or the user can set an execution option to do so p note that the plug in s debug flag is initialized when the plug in is started the result of calling this method before the plug in has started is unspecified p return whether this plug in is in debug mode public boolean is debugging return debug isdebugging returns an input stream for the specified file the file path must be specified relative this the plug in s installation location param file path relative to plug in installation location return an input stream exception io exception if the given path cannot be found in this plug in see open stream i path boolean public final input stream open stream i path file throws io exception return find support open stream bundle file false ioexception openstream ipath inputstream openstream ipath ioexception findsupport openstream returns an input stream for the specified file the file path must be specified relative to this plug in s installation location optionally the platform searches for the correct localized version of the specified file using the users current locale and java naming convention for localized resource files locale suffix appended to the specified file extension p the caller must close the returned stream when done p param file path relative to plug in installation location param localized code true code for the localized version of the file and code false code for the file exactly as specified return an input stream exception io exception if the given path cannot be found in this plug in public final input stream open stream i path file boolean localized throws io exception return find support open stream bundle file localized ioexception inputstream openstream ipath ioexception findsupport openstream sets whether this plug in is in debug mode by default plug ins are not in debug mode a plug in can put itself into debug mode or the user can set a debug option to do so p note that the plug in s debug flag is initialized when the plug in is started the result of calling this method before the plug in has started is unspecified p param value whether or not this plug in is in debug mode public void set debugging boolean value debug value setdebugging shuts down this plug in and discards all plug in state p this method should be re implemented in subclasses that need to do something when the plug in is shut down implementors should call the inherited method to ensure that any system requirements can be met p p plug in shutdown code should be robust in particular this method should always make an effort to shut down the plug in furthermore the code should not assume that the plug in was started successfully as this method will be invoked in the event of a failure during startup p p note 1 if a plug in has been started this method will be automatically invoked by the platform when the platform is shut down p p note 2 this method is intended to perform simple termination of the plug in environment the platform may terminate invocations that do not complete in a timely fashion p b clients must never explicitly call this method b p exception core exception if this method fails to shut down this plug in deprecated in eclipse 3 0 this method has been replaced by link plugin stop bundle context context implementations of code shutdown code should be changed to override code stop bundle context context code and call code super stop context code instead of code super shutdown code the code shutdown code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in public void shutdown throws core exception if compatibility helper initialize compatibility null return throwable exception null method m try m descriptor get class get method do plugin deactivation new class 0 non nls 1 m invoke descriptor null catch security exception e exception e catch no such method exception e exception e catch illegal argument exception e exception e catch illegal access exception e exception e catch invocation target exception e exception e if exception null return string message nls bind messages plugin shutdownproblems descriptor get unique identifier i status status new status i status error platform pi runtime i status error message exception internal platform get default log status coreexception bundlecontext bundlecontext coreexception compatibilityhelper initializecompatibility getclass getmethod doplugindeactivation securityexception nosuchmethodexception illegalargumentexception illegalaccessexception invocationtargetexception plugin_shutdownproblems getuniqueidentifier istatus istatus pi_runtime istatus internalplatform getdefault starts up this plug in p this method should be overridden in subclasses that need to do something when this plug in is started implementors should call the inherited method to ensure that any system requirements can be met p p if this method throws an exception it is taken as an indication that plug in initialization has failed as a result the plug in will not be activated moreover the plug in will be marked as disabled and ineligible for activation for the duration p p plug in startup code should be robust in the event of a startup failure the plug in s code shutdown code method will be invoked automatically in an attempt to close open files etc p p note 1 this method is automatically invoked by the platform the first time any code in the plug in is executed p p note 2 this method is intended to perform simple initialization of the plug in environment the platform may terminate initializers that do not complete in a timely fashion p p note 3 the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p b clients must never explicitly call this method b p exception core exception if this plug in did not start up properly deprecated in eclipse 3 0 this method has been replaced by link plugin start bundle context context implementations of code startup code should be changed to extend code start bundle context context code and call code super start context code instead of code super startup code the code startup code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in public void startup throws core exception coreexception bundlecontext bundlecontext coreexception returns a string representation of the plug in suitable for debugging purposes only public string to string string name bundle get symbolic name return name null new long bundle get bundle id to string name tostring getsymbolicname getbundleid tostring starts up this plug in p this method should be overridden in subclasses that need to do something when this plug in is started implementors should call the inherited method at the first possible point to ensure that any system requirements can be met p p if this method throws an exception it is taken as an indication that plug in initialization has failed as a result the plug in will not be activated moreover the plug in will be marked as disabled and ineligible for activation for the duration p p plug in startup code should be robust in the event of a startup failure the plug in s code shutdown code method will be invoked automatically in an attempt to close open files etc p p note 1 this method is automatically invoked by the platform the first time any code in the plug in is executed p p note 2 this method is intended to perform simple initialization of the plug in environment the platform may terminate initializers that do not complete in a timely fashion p p note 3 the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p p note 4 the supplied bundle context represents the plug in to the os gi framework for security reasons it is strongly recommended that this object should not be divulged p b clients must never explicitly call this method b param context the bundle context for this plug in exception exception if this plug in did not start up properly since 3 0 public void start bundle context context throws exception bundle context get bundle string symbolic name bundle get symbolic name if symbolic name null string key symbolic name debug non nls 1 string value internal platform get default get option key this debug value null false value equals ignore case true non nls 1 initialize descriptor symbolic name osgi bundlecontext getbundle symbolicname getsymbolicname symbolicname symbolicname internalplatform getdefault getoption equalsignorecase initializedescriptor symbolicname deprecated marked as deprecated to suppress deprecation warnings private i plugin descriptor initialize descriptor string symbolic name if compatibility helper initialize compatibility null return null this associate a descriptor to any real bundle that uses this to start if symbolic name null return null i plugin descriptor tmp compatibility helper get plugin descriptor symbolic name runtime descriptor is never set to support dynamic re installation of compatibility if symbolic name equals platform pi runtime descriptor tmp compatibility helper set plugin tmp this compatibility helper set active tmp return tmp iplugindescriptor initializedescriptor symbolicname compatibilityhelper initializecompatibility symbolicname iplugindescriptor compatibilityhelper getplugindescriptor symbolicname symbolicname pi_runtime compatibilityhelper setplugin compatibilityhelper setactive stops this plug in p this method should be re implemented in subclasses that need to do something when the plug in is shut down implementors should call the inherited method as late as possible to ensure that any system requirements can be met p p plug in shutdown code should be robust in particular this method should always make an effort to shut down the plug in furthermore the code should not assume that the plug in was started successfully as this method will be invoked in the event of a failure during startup p p note 1 if a plug in has been automatically started this method will be automatically invoked by the platform when the platform is shut down p p note 2 this method is intended to perform simple termination of the plug in environment the platform may terminate invocations that do not complete in a timely fashion p p note 3 the supplied bundle context represents the plug in to the os gi framework for security reasons it is strongly recommended that this object should not be divulged p b clients must never explicitly call this method b param context the bundle context for this plug in exception exception if this method fails to shut down this plug in since 3 0 public void stop bundle context context throws exception sub classes to override osgi bundlecontext returns the bundle associated with this plug in return the associated bundle since 3 0 public final bundle get bundle return bundle getbundle creates a new plug in runtime object this method is called by the platform if this class is used as a code bundle activator code this method is not needed used if this plug in requires the org eclipse core runtime compatibility plug in subclasses of code plugin code must call this method first in their constructors the resultant instance is not managed by the runtime and so should be remembered by the client typically using a singleton pattern b clients must never explicitly call this method b p p note the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p since 3 0 public plugin super bundleactivator creates a new plug in runtime object for the given plug in descriptor p instances of plug in runtime classes are automatically created by the platform in the course of plug in activation b clients must never explicitly call this method b p p note the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p param descriptor the plug in descriptor see get descriptor deprecated in eclipse 3 0 this constructor has been replaced by link plugin implementations of code my plugin i plugin descriptor descriptor code should be changed to code my plugin code and call code super code instead of code super descriptor code the code my plugin i plugin descriptor descriptor code constructor is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in public plugin i plugin descriptor descriptor assert is not null descriptor assert is true compatibility helper has plugin object descriptor nls bind messages plugin deactivatedload this get class get name descriptor get unique identifier is not activated non nls 1 this descriptor descriptor on plugin start find and start the corresponding bundle bundle internal platform get default get bundle descriptor get unique identifier try if bundle get state bundle starting bundle active bundle stopping 0 bundle start catch bundle exception e string message nls bind messages plugin startupproblems descriptor get unique identifier i status status new status i status error platform pi runtime i status error message e internal platform get default log status getdescriptor myplugin iplugindescriptor myplugin myplugin iplugindescriptor iplugindescriptor isnotnull istrue compatibilityhelper haspluginobject plugin_deactivatedload getclass getname getuniqueidentifier internalplatform getdefault getbundle getuniqueidentifier getstate bundleexception plugin_startupproblems getuniqueidentifier istatus istatus pi_runtime istatus internalplatform getdefault returns a url for the given path returns code null code if the url could not be computed or created param path path relative to plug in installation location return a url for the given path or code null code public final url find i path path return find support find bundle path null ipath findsupport returns a url for the given path returns code null code if the url could not be computed or created param path file path relative to plug in installation location param override map of override substitution arguments to be used for any arg path elements the map keys correspond to the substitution arguments eg nl or os the resulting values must be of type java lang string if the map is code null code or does not contain the required substitution argument the default is used return a url for the given path or code null code public final url find i path path map override return find support find bundle path override ipath findsupport returns the plug in descriptor for this plug in runtime object return the plug in descriptor for this plug in runtime object deprecated code i plugin descriptor code was refactored in eclipse 3 0 the code get descriptor code method may only be called by plug ins which explicitly require the org eclipse core runtime compatibility plug in see the comments on link i plugin descriptor and its methods for details public final i plugin descriptor get descriptor if descriptor null return descriptor return initialize descriptor bundle get symbolic name iplugindescriptor getdescriptor iplugindescriptor iplugindescriptor getdescriptor initializedescriptor getsymbolicname returns the log for this plug in if no such log exists one is created return the log for this plug in public final i log get log return internal platform get default get log bundle ilog getlog internalplatform getdefault getlog returns the location in the local file system of the plug in state area for this plug in if the plug in state area did not exist prior to this call it is created p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings and other configuration parameters p throws illegal state exception when the system is running with no data area data none or when a data area has not been set yet return a local file system path public final i path get state location throws illegal state exception return internal platform get default get state location bundle true illegalstateexception ipath getstatelocation illegalstateexception internalplatform getdefault getstatelocation returns the preference store for this plug in p note that if an error occurs reading the preference store from disk an empty preference store is quietly created initialized with defaults and returned p p calling this method may cause the preference store to be created and initialized subclasses which reimplement the code initialize default plugin preferences code method have this opportunity to initialize preference default values just prior to processing override default values imposed externally to this plug in specified for the product or at platform start up p p after settings in the preference store are changed for example with code preferences set value code or code set to default code code save plugin preferences code should be called to store the changed values back to disk otherwise the changes will be lost on plug in shutdown p return the preference store see save plugin preferences see preferences set value string string see preferences set to default string since 2 0 public final preferences get plugin preferences if preferences null if internal platform debug preference general policy debug plugin preferences already loaded for bundle get symbolic name non nls 1 return preferences if internal platform debug preference general policy debug loading preferences for plugin bundle get symbolic name non nls 1 preferences new preference forwarder this bundle get symbolic name return preferences initializedefaultpluginpreferences setvalue settodefault savepluginpreferences savepluginpreferences setvalue settodefault getpluginpreferences internalplatform debug_preference_general getsymbolicname internalplatform debug_preference_general getsymbolicname preferenceforwarder getsymbolicname saves preferences settings for this plug in does nothing if the preference store does not need saving p plug in preferences are b not b saved automatically on plug in shutdown p see preferences store output stream string see preferences needs saving since 2 0 public final void save plugin preferences populate the preferences instvar we still might need to save them because someone else might have made changes via the os gi ap is get plugin preferences try preferences flush catch backing store exception e i status status new status i status error platform pi runtime i status error messages preferences saveproblems e internal platform get default log status outputstream needssaving savepluginpreferences osgi apis getpluginpreferences backingstoreexception istatus istatus pi_runtime istatus preferences_saveproblems internalplatform getdefault initializes the default preferences settings for this plug in p this method is called sometime after the preference store for this plug in is created default values are never stored in preference stores they must be filled in each time this method provides the opportunity to initialize the default values p p the default implementation of this method does nothing a subclass that needs to set default values for its preferences must reimplement this method default values set at a later point will override any default override settings supplied from outside the plug in product configuration or platform start up p since 2 0 deprecated this method has been refactored in the new preference mechanism to handle the case where the runtime compatibility layer does not exist the contents of this method should be moved to the method named code initialize default preferences code in a separate subclass of link org eclipse core runtime preferences abstract preference initializer this class should be contributed via the code org eclipse core runtime preferences code extension point pre lt extension point quo org eclipse core runtime preferences quo gt lt initializer class quo com example my preference initializer quo gt lt extension gt package com example public class my preference initializer extends abstract preference initializer public my preference initializer super public void initialize default preferences preferences node new default scope get node my plugin id node put key value pre protected void initialize default plugin preferences default implementation of this method spec d to do nothing initializedefaultpreferences abstractpreferenceinitializer mypreferenceinitializer mypreferenceinitializer abstractpreferenceinitializer mypreferenceinitializer initializedefaultpreferences defaultscope getnode initializedefaultpluginpreferences internal method this method is a hook for initialization of default preference values it should not be called by clients since 3 0 public final void internal initialize default plugin preferences initialize default plugin preferences internalinitializedefaultpluginpreferences initializedefaultpluginpreferences returns whether this plug in is in debug mode by default plug ins are not in debug mode a plug in can put itself into debug mode or the user can set an execution option to do so p note that the plug in s debug flag is initialized when the plug in is started the result of calling this method before the plug in has started is unspecified p return whether this plug in is in debug mode public boolean is debugging return debug isdebugging returns an input stream for the specified file the file path must be specified relative this the plug in s installation location param file path relative to plug in installation location return an input stream exception io exception if the given path cannot be found in this plug in see open stream i path boolean public final input stream open stream i path file throws io exception return find support open stream bundle file false ioexception openstream ipath inputstream openstream ipath ioexception findsupport openstream returns an input stream for the specified file the file path must be specified relative to this plug in s installation location optionally the platform searches for the correct localized version of the specified file using the users current locale and java naming convention for localized resource files locale suffix appended to the specified file extension p the caller must close the returned stream when done p param file path relative to plug in installation location param localized code true code for the localized version of the file and code false code for the file exactly as specified return an input stream exception io exception if the given path cannot be found in this plug in public final input stream open stream i path file boolean localized throws io exception return find support open stream bundle file localized ioexception inputstream openstream ipath ioexception findsupport openstream sets whether this plug in is in debug mode by default plug ins are not in debug mode a plug in can put itself into debug mode or the user can set a debug option to do so p note that the plug in s debug flag is initialized when the plug in is started the result of calling this method before the plug in has started is unspecified p param value whether or not this plug in is in debug mode public void set debugging boolean value debug value setdebugging shuts down this plug in and discards all plug in state p this method should be re implemented in subclasses that need to do something when the plug in is shut down implementors should call the inherited method to ensure that any system requirements can be met p p plug in shutdown code should be robust in particular this method should always make an effort to shut down the plug in furthermore the code should not assume that the plug in was started successfully as this method will be invoked in the event of a failure during startup p p note 1 if a plug in has been started this method will be automatically invoked by the platform when the platform is shut down p p note 2 this method is intended to perform simple termination of the plug in environment the platform may terminate invocations that do not complete in a timely fashion p b clients must never explicitly call this method b p exception core exception if this method fails to shut down this plug in deprecated in eclipse 3 0 this method has been replaced by link plugin stop bundle context context implementations of code shutdown code should be changed to override code stop bundle context context code and call code super stop context code instead of code super shutdown code the code shutdown code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in public void shutdown throws core exception if compatibility helper initialize compatibility null return throwable exception null method m try m descriptor get class get method do plugin deactivation new class 0 non nls 1 m invoke descriptor null catch security exception e exception e catch no such method exception e exception e catch illegal argument exception e exception e catch illegal access exception e exception e catch invocation target exception e exception e if exception null return string message nls bind messages plugin shutdownproblems descriptor get unique identifier i status status new status i status error platform pi runtime i status error message exception internal platform get default log status coreexception bundlecontext bundlecontext coreexception compatibilityhelper initializecompatibility getclass getmethod doplugindeactivation securityexception nosuchmethodexception illegalargumentexception illegalaccessexception invocationtargetexception plugin_shutdownproblems getuniqueidentifier istatus istatus pi_runtime istatus internalplatform getdefault starts up this plug in p this method should be overridden in subclasses that need to do something when this plug in is started implementors should call the inherited method to ensure that any system requirements can be met p p if this method throws an exception it is taken as an indication that plug in initialization has failed as a result the plug in will not be activated moreover the plug in will be marked as disabled and ineligible for activation for the duration p p plug in startup code should be robust in the event of a startup failure the plug in s code shutdown code method will be invoked automatically in an attempt to close open files etc p p note 1 this method is automatically invoked by the platform the first time any code in the plug in is executed p p note 2 this method is intended to perform simple initialization of the plug in environment the platform may terminate initializers that do not complete in a timely fashion p p note 3 the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p b clients must never explicitly call this method b p exception core exception if this plug in did not start up properly deprecated in eclipse 3 0 this method has been replaced by link plugin start bundle context context implementations of code startup code should be changed to extend code start bundle context context code and call code super start context code instead of code super startup code the code startup code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in public void startup throws core exception coreexception bundlecontext bundlecontext coreexception returns a string representation of the plug in suitable for debugging purposes only public string to string string name bundle get symbolic name return name null new long bundle get bundle id to string name tostring getsymbolicname getbundleid tostring starts up this plug in p this method should be overridden in subclasses that need to do something when this plug in is started implementors should call the inherited method at the first possible point to ensure that any system requirements can be met p p if this method throws an exception it is taken as an indication that plug in initialization has failed as a result the plug in will not be activated moreover the plug in will be marked as disabled and ineligible for activation for the duration p p plug in startup code should be robust in the event of a startup failure the plug in s code shutdown code method will be invoked automatically in an attempt to close open files etc p p note 1 this method is automatically invoked by the platform the first time any code in the plug in is executed p p note 2 this method is intended to perform simple initialization of the plug in environment the platform may terminate initializers that do not complete in a timely fashion p p note 3 the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p p note 4 the supplied bundle context represents the plug in to the os gi framework for security reasons it is strongly recommended that this object should not be divulged p b clients must never explicitly call this method b param context the bundle context for this plug in exception exception if this plug in did not start up properly since 3 0 public void start bundle context context throws exception bundle context get bundle string symbolic name bundle get symbolic name if symbolic name null string key symbolic name debug non nls 1 string value internal platform get default get option key this debug value null false value equals ignore case true non nls 1 initialize descriptor symbolic name osgi bundlecontext getbundle symbolicname getsymbolicname symbolicname symbolicname internalplatform getdefault getoption equalsignorecase initializedescriptor symbolicname deprecated marked as deprecated to suppress deprecation warnings private i plugin descriptor initialize descriptor string symbolic name if compatibility helper initialize compatibility null return null this associate a descriptor to any real bundle that uses this to start if symbolic name null return null i plugin descriptor tmp compatibility helper get plugin descriptor symbolic name runtime descriptor is never set to support dynamic re installation of compatibility if symbolic name equals platform pi runtime descriptor tmp compatibility helper set plugin tmp this compatibility helper set active tmp return tmp iplugindescriptor initializedescriptor symbolicname compatibilityhelper initializecompatibility symbolicname iplugindescriptor compatibilityhelper getplugindescriptor symbolicname symbolicname pi_runtime compatibilityhelper setplugin compatibilityhelper setactive stops this plug in p this method should be re implemented in subclasses that need to do something when the plug in is shut down implementors should call the inherited method as late as possible to ensure that any system requirements can be met p p plug in shutdown code should be robust in particular this method should always make an effort to shut down the plug in furthermore the code should not assume that the plug in was started successfully as this method will be invoked in the event of a failure during startup p p note 1 if a plug in has been automatically started this method will be automatically invoked by the platform when the platform is shut down p p note 2 this method is intended to perform simple termination of the plug in environment the platform may terminate invocations that do not complete in a timely fashion p p note 3 the supplied bundle context represents the plug in to the os gi framework for security reasons it is strongly recommended that this object should not be divulged p b clients must never explicitly call this method b param context the bundle context for this plug in exception exception if this method fails to shut down this plug in since 3 0 public void stop bundle context context throws exception sub classes to override osgi bundlecontext returns the bundle associated with this plug in return the associated bundle since 3 0 public final bundle get bundle return bundle getbundle creates a new plug in runtime object this method is called by the platform if this class is used as a code bundle activator code this method is not needed used if this plug in requires the org eclipse core runtime compatibility plug in subclasses of code plugin code must call this method first in their constructors the resultant instance is not managed by the runtime and so should be remembered by the client typically using a singleton pattern b clients must never explicitly call this method b p p note the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p since 3 0 public plugin super bundleactivator creates a new plug in runtime object for the given plug in descriptor p instances of plug in runtime classes are automatically created by the platform in the course of plug in activation b clients must never explicitly call this method b p p note the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p param descriptor the plug in descriptor see get descriptor deprecated in eclipse 3 0 this constructor has been replaced by link plugin implementations of code my plugin i plugin descriptor descriptor code should be changed to code my plugin code and call code super code instead of code super descriptor code the code my plugin i plugin descriptor descriptor code constructor is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in public plugin i plugin descriptor descriptor assert is not null descriptor assert is true compatibility helper has plugin object descriptor nls bind messages plugin deactivatedload this get class get name descriptor get unique identifier is not activated non nls 1 this descriptor descriptor on plugin start find and start the corresponding bundle bundle internal platform get default get bundle descriptor get unique identifier try if bundle get state bundle starting bundle active bundle stopping 0 bundle start catch bundle exception e string message nls bind messages plugin startupproblems descriptor get unique identifier i status status new status i status error platform pi runtime i status error message e internal platform get default log status getdescriptor myplugin iplugindescriptor myplugin myplugin iplugindescriptor iplugindescriptor isnotnull istrue compatibilityhelper haspluginobject plugin_deactivatedload getclass getname getuniqueidentifier internalplatform getdefault getbundle getuniqueidentifier getstate bundleexception plugin_startupproblems getuniqueidentifier istatus istatus pi_runtime istatus internalplatform getdefault returns a url for the given path returns code null code if the url could not be computed or created param path path relative to plug in installation location return a url for the given path or code null code public final url find i path path return find support find bundle path null ipath findsupport returns a url for the given path returns code null code if the url could not be computed or created param path file path relative to plug in installation location param override map of override substitution arguments to be used for any arg path elements the map keys correspond to the substitution arguments eg nl or os the resulting values must be of type java lang string if the map is code null code or does not contain the required substitution argument the default is used return a url for the given path or code null code public final url find i path path map override return find support find bundle path override ipath findsupport returns the plug in descriptor for this plug in runtime object return the plug in descriptor for this plug in runtime object deprecated code i plugin descriptor code was refactored in eclipse 3 0 the code get descriptor code method may only be called by plug ins which explicitly require the org eclipse core runtime compatibility plug in see the comments on link i plugin descriptor and its methods for details public final i plugin descriptor get descriptor if descriptor null return descriptor return initialize descriptor bundle get symbolic name iplugindescriptor getdescriptor iplugindescriptor iplugindescriptor getdescriptor initializedescriptor getsymbolicname returns the log for this plug in if no such log exists one is created return the log for this plug in public final i log get log return internal platform get default get log bundle ilog getlog internalplatform getdefault getlog returns the location in the local file system of the plug in state area for this plug in if the plug in state area did not exist prior to this call it is created p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings and other configuration parameters p throws illegal state exception when the system is running with no data area data none or when a data area has not been set yet return a local file system path public final i path get state location throws illegal state exception return internal platform get default get state location bundle true illegalstateexception ipath getstatelocation illegalstateexception internalplatform getdefault getstatelocation returns the preference store for this plug in p note that if an error occurs reading the preference store from disk an empty preference store is quietly created initialized with defaults and returned p p calling this method may cause the preference store to be created and initialized subclasses which reimplement the code initialize default plugin preferences code method have this opportunity to initialize preference default values just prior to processing override default values imposed externally to this plug in specified for the product or at platform start up p p after settings in the preference store are changed for example with code preferences set value code or code set to default code code save plugin preferences code should be called to store the changed values back to disk otherwise the changes will be lost on plug in shutdown p return the preference store see save plugin preferences see preferences set value string string see preferences set to default string since 2 0 public final preferences get plugin preferences if preferences null if internal platform debug preference general policy debug plugin preferences already loaded for bundle get symbolic name non nls 1 return preferences if internal platform debug preference general policy debug loading preferences for plugin bundle get symbolic name non nls 1 preferences new preference forwarder this bundle get symbolic name return preferences initializedefaultpluginpreferences setvalue settodefault savepluginpreferences savepluginpreferences setvalue settodefault getpluginpreferences internalplatform debug_preference_general getsymbolicname internalplatform debug_preference_general getsymbolicname preferenceforwarder getsymbolicname saves preferences settings for this plug in does nothing if the preference store does not need saving p plug in preferences are b not b saved automatically on plug in shutdown p see preferences store output stream string see preferences needs saving since 2 0 public final void save plugin preferences populate the preferences instvar we still might need to save them because someone else might have made changes via the os gi ap is get plugin preferences try preferences flush catch backing store exception e i status status new status i status error platform pi runtime i status error messages preferences saveproblems e internal platform get default log status outputstream needssaving savepluginpreferences osgi apis getpluginpreferences backingstoreexception istatus istatus pi_runtime istatus preferences_saveproblems internalplatform getdefault initializes the default preferences settings for this plug in p this method is called sometime after the preference store for this plug in is created default values are never stored in preference stores they must be filled in each time this method provides the opportunity to initialize the default values p p the default implementation of this method does nothing a subclass that needs to set default values for its preferences must reimplement this method default values set at a later point will override any default override settings supplied from outside the plug in product configuration or platform start up p since 2 0 deprecated this method has been refactored in the new preference mechanism to handle the case where the runtime compatibility layer does not exist the contents of this method should be moved to the method named code initialize default preferences code in a separate subclass of link org eclipse core runtime preferences abstract preference initializer this class should be contributed via the code org eclipse core runtime preferences code extension point pre lt extension point quo org eclipse core runtime preferences quo gt lt initializer class quo com example my preference initializer quo gt lt extension gt package com example public class my preference initializer extends abstract preference initializer public my preference initializer super public void initialize default preferences preferences node new default scope get node my plugin id node put key value pre protected void initialize default plugin preferences default implementation of this method spec d to do nothing initializedefaultpreferences abstractpreferenceinitializer mypreferenceinitializer mypreferenceinitializer abstractpreferenceinitializer mypreferenceinitializer initializedefaultpreferences defaultscope getnode initializedefaultpluginpreferences internal method this method is a hook for initialization of default preference values it should not be called by clients since 3 0 public final void internal initialize default plugin preferences initialize default plugin preferences internalinitializedefaultpluginpreferences initializedefaultpluginpreferences returns whether this plug in is in debug mode by default plug ins are not in debug mode a plug in can put itself into debug mode or the user can set an execution option to do so p note that the plug in s debug flag is initialized when the plug in is started the result of calling this method before the plug in has started is unspecified p return whether this plug in is in debug mode public boolean is debugging return debug isdebugging returns an input stream for the specified file the file path must be specified relative this the plug in s installation location param file path relative to plug in installation location return an input stream exception io exception if the given path cannot be found in this plug in see open stream i path boolean public final input stream open stream i path file throws io exception return find support open stream bundle file false ioexception openstream ipath inputstream openstream ipath ioexception findsupport openstream returns an input stream for the specified file the file path must be specified relative to this plug in s installation location optionally the platform searches for the correct localized version of the specified file using the users current locale and java naming convention for localized resource files locale suffix appended to the specified file extension p the caller must close the returned stream when done p param file path relative to plug in installation location param localized code true code for the localized version of the file and code false code for the file exactly as specified return an input stream exception io exception if the given path cannot be found in this plug in public final input stream open stream i path file boolean localized throws io exception return find support open stream bundle file localized ioexception inputstream openstream ipath ioexception findsupport openstream sets whether this plug in is in debug mode by default plug ins are not in debug mode a plug in can put itself into debug mode or the user can set a debug option to do so p note that the plug in s debug flag is initialized when the plug in is started the result of calling this method before the plug in has started is unspecified p param value whether or not this plug in is in debug mode public void set debugging boolean value debug value setdebugging shuts down this plug in and discards all plug in state p this method should be re implemented in subclasses that need to do something when the plug in is shut down implementors should call the inherited method to ensure that any system requirements can be met p p plug in shutdown code should be robust in particular this method should always make an effort to shut down the plug in furthermore the code should not assume that the plug in was started successfully as this method will be invoked in the event of a failure during startup p p note 1 if a plug in has been started this method will be automatically invoked by the platform when the platform is shut down p p note 2 this method is intended to perform simple termination of the plug in environment the platform may terminate invocations that do not complete in a timely fashion p b clients must never explicitly call this method b p exception core exception if this method fails to shut down this plug in deprecated in eclipse 3 0 this method has been replaced by link plugin stop bundle context context implementations of code shutdown code should be changed to override code stop bundle context context code and call code super stop context code instead of code super shutdown code the code shutdown code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in public void shutdown throws core exception if compatibility helper initialize compatibility null return throwable exception null method m try m descriptor get class get method do plugin deactivation new class 0 non nls 1 m invoke descriptor null catch security exception e exception e catch no such method exception e exception e catch illegal argument exception e exception e catch illegal access exception e exception e catch invocation target exception e exception e if exception null return string message nls bind messages plugin shutdownproblems descriptor get unique identifier i status status new status i status error platform pi runtime i status error message exception internal platform get default log status coreexception bundlecontext bundlecontext coreexception compatibilityhelper initializecompatibility getclass getmethod doplugindeactivation securityexception nosuchmethodexception illegalargumentexception illegalaccessexception invocationtargetexception plugin_shutdownproblems getuniqueidentifier istatus istatus pi_runtime istatus internalplatform getdefault starts up this plug in p this method should be overridden in subclasses that need to do something when this plug in is started implementors should call the inherited method to ensure that any system requirements can be met p p if this method throws an exception it is taken as an indication that plug in initialization has failed as a result the plug in will not be activated moreover the plug in will be marked as disabled and ineligible for activation for the duration p p plug in startup code should be robust in the event of a startup failure the plug in s code shutdown code method will be invoked automatically in an attempt to close open files etc p p note 1 this method is automatically invoked by the platform the first time any code in the plug in is executed p p note 2 this method is intended to perform simple initialization of the plug in environment the platform may terminate initializers that do not complete in a timely fashion p p note 3 the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p b clients must never explicitly call this method b p exception core exception if this plug in did not start up properly deprecated in eclipse 3 0 this method has been replaced by link plugin start bundle context context implementations of code startup code should be changed to extend code start bundle context context code and call code super start context code instead of code super startup code the code startup code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in public void startup throws core exception coreexception bundlecontext bundlecontext coreexception returns a string representation of the plug in suitable for debugging purposes only public string to string string name bundle get symbolic name return name null new long bundle get bundle id to string name tostring getsymbolicname getbundleid tostring starts up this plug in p this method should be overridden in subclasses that need to do something when this plug in is started implementors should call the inherited method at the first possible point to ensure that any system requirements can be met p p if this method throws an exception it is taken as an indication that plug in initialization has failed as a result the plug in will not be activated moreover the plug in will be marked as disabled and ineligible for activation for the duration p p plug in startup code should be robust in the event of a startup failure the plug in s code shutdown code method will be invoked automatically in an attempt to close open files etc p p note 1 this method is automatically invoked by the platform the first time any code in the plug in is executed p p note 2 this method is intended to perform simple initialization of the plug in environment the platform may terminate initializers that do not complete in a timely fashion p p note 3 the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p p note 4 the supplied bundle context represents the plug in to the os gi framework for security reasons it is strongly recommended that this object should not be divulged p b clients must never explicitly call this method b param context the bundle context for this plug in exception exception if this plug in did not start up properly since 3 0 public void start bundle context context throws exception bundle context get bundle string symbolic name bundle get symbolic name if symbolic name null string key symbolic name debug non nls 1 string value internal platform get default get option key this debug value null false value equals ignore case true non nls 1 initialize descriptor symbolic name osgi bundlecontext getbundle symbolicname getsymbolicname symbolicname symbolicname internalplatform getdefault getoption equalsignorecase initializedescriptor symbolicname deprecated marked as deprecated to suppress deprecation warnings private i plugin descriptor initialize descriptor string symbolic name if compatibility helper initialize compatibility null return null this associate a descriptor to any real bundle that uses this to start if symbolic name null return null i plugin descriptor tmp compatibility helper get plugin descriptor symbolic name runtime descriptor is never set to support dynamic re installation of compatibility if symbolic name equals platform pi runtime descriptor tmp compatibility helper set plugin tmp this compatibility helper set active tmp return tmp iplugindescriptor initializedescriptor symbolicname compatibilityhelper initializecompatibility symbolicname iplugindescriptor compatibilityhelper getplugindescriptor symbolicname symbolicname pi_runtime compatibilityhelper setplugin compatibilityhelper setactive stops this plug in p this method should be re implemented in subclasses that need to do something when the plug in is shut down implementors should call the inherited method as late as possible to ensure that any system requirements can be met p p plug in shutdown code should be robust in particular this method should always make an effort to shut down the plug in furthermore the code should not assume that the plug in was started successfully as this method will be invoked in the event of a failure during startup p p note 1 if a plug in has been automatically started this method will be automatically invoked by the platform when the platform is shut down p p note 2 this method is intended to perform simple termination of the plug in environment the platform may terminate invocations that do not complete in a timely fashion p p note 3 the supplied bundle context represents the plug in to the os gi framework for security reasons it is strongly recommended that this object should not be divulged p b clients must never explicitly call this method b param context the bundle context for this plug in exception exception if this method fails to shut down this plug in since 3 0 public void stop bundle context context throws exception sub classes to override osgi bundlecontext returns the bundle associated with this plug in return the associated bundle since 3 0 public final bundle get bundle return bundle getbundle creates a new plug in runtime object this method is called by the platform if this class is used as a code bundle activator code this method is not needed used if this plug in requires the org eclipse core runtime compatibility plug in subclasses of code plugin code must call this method first in their constructors the resultant instance is not managed by the runtime and so should be remembered by the client typically using a singleton pattern b clients must never explicitly call this method b p p note the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p since 3 0 public plugin super bundleactivator creates a new plug in runtime object for the given plug in descriptor p instances of plug in runtime classes are automatically created by the platform in the course of plug in activation b clients must never explicitly call this method b p p note the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p param descriptor the plug in descriptor see get descriptor deprecated in eclipse 3 0 this constructor has been replaced by link plugin implementations of code my plugin i plugin descriptor descriptor code should be changed to code my plugin code and call code super code instead of code super descriptor code the code my plugin i plugin descriptor descriptor code constructor is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in public plugin i plugin descriptor descriptor assert is not null descriptor assert is true compatibility helper has plugin object descriptor nls bind messages plugin deactivatedload this get class get name descriptor get unique identifier is not activated non nls 1 this descriptor descriptor on plugin start find and start the corresponding bundle bundle internal platform get default get bundle descriptor get unique identifier try if bundle get state bundle starting bundle active bundle stopping 0 bundle start catch bundle exception e string message nls bind messages plugin startupproblems descriptor get unique identifier i status status new status i status error platform pi runtime i status error message e internal platform get default log status getdescriptor myplugin iplugindescriptor myplugin myplugin iplugindescriptor iplugindescriptor isnotnull istrue compatibilityhelper haspluginobject plugin_deactivatedload getclass getname getuniqueidentifier internalplatform getdefault getbundle getuniqueidentifier getstate bundleexception plugin_startupproblems getuniqueidentifier istatus istatus pi_runtime istatus internalplatform getdefault returns a url for the given path returns code null code if the url could not be computed or created param path path relative to plug in installation location return a url for the given path or code null code public final url find i path path return find support find bundle path null ipath findsupport returns a url for the given path returns code null code if the url could not be computed or created param path file path relative to plug in installation location param override map of override substitution arguments to be used for any arg path elements the map keys correspond to the substitution arguments eg nl or os the resulting values must be of type java lang string if the map is code null code or does not contain the required substitution argument the default is used return a url for the given path or code null code public final url find i path path map override return find support find bundle path override ipath findsupport returns the plug in descriptor for this plug in runtime object return the plug in descriptor for this plug in runtime object deprecated code i plugin descriptor code was refactored in eclipse 3 0 the code get descriptor code method may only be called by plug ins which explicitly require the org eclipse core runtime compatibility plug in see the comments on link i plugin descriptor and its methods for details public final i plugin descriptor get descriptor if descriptor null return descriptor return initialize descriptor bundle get symbolic name iplugindescriptor getdescriptor iplugindescriptor iplugindescriptor getdescriptor initializedescriptor getsymbolicname returns the log for this plug in if no such log exists one is created return the log for this plug in public final i log get log return internal platform get default get log bundle ilog getlog internalplatform getdefault getlog returns the location in the local file system of the plug in state area for this plug in if the plug in state area did not exist prior to this call it is created p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings and other configuration parameters p throws illegal state exception when the system is running with no data area data none or when a data area has not been set yet return a local file system path public final i path get state location throws illegal state exception return internal platform get default get state location bundle true illegalstateexception ipath getstatelocation illegalstateexception internalplatform getdefault getstatelocation returns the preference store for this plug in p note that if an error occurs reading the preference store from disk an empty preference store is quietly created initialized with defaults and returned p p calling this method may cause the preference store to be created and initialized subclasses which reimplement the code initialize default plugin preferences code method have this opportunity to initialize preference default values just prior to processing override default values imposed externally to this plug in specified for the product or at platform start up p p after settings in the preference store are changed for example with code preferences set value code or code set to default code code save plugin preferences code should be called to store the changed values back to disk otherwise the changes will be lost on plug in shutdown p return the preference store see save plugin preferences see preferences set value string string see preferences set to default string since 2 0 public final preferences get plugin preferences if preferences null if internal platform debug preference general policy debug plugin preferences already loaded for bundle get symbolic name non nls 1 return preferences if internal platform debug preference general policy debug loading preferences for plugin bundle get symbolic name non nls 1 preferences new preference forwarder this bundle get symbolic name return preferences initializedefaultpluginpreferences setvalue settodefault savepluginpreferences savepluginpreferences setvalue settodefault getpluginpreferences internalplatform debug_preference_general getsymbolicname internalplatform debug_preference_general getsymbolicname preferenceforwarder getsymbolicname saves preferences settings for this plug in does nothing if the preference store does not need saving p plug in preferences are b not b saved automatically on plug in shutdown p see preferences store output stream string see preferences needs saving since 2 0 public final void save plugin preferences populate the preferences instvar we still might need to save them because someone else might have made changes via the os gi ap is get plugin preferences try preferences flush catch backing store exception e i status status new status i status error platform pi runtime i status error messages preferences saveproblems e internal platform get default log status outputstream needssaving savepluginpreferences osgi apis getpluginpreferences backingstoreexception istatus istatus pi_runtime istatus preferences_saveproblems internalplatform getdefault initializes the default preferences settings for this plug in p this method is called sometime after the preference store for this plug in is created default values are never stored in preference stores they must be filled in each time this method provides the opportunity to initialize the default values p p the default implementation of this method does nothing a subclass that needs to set default values for its preferences must reimplement this method default values set at a later point will override any default override settings supplied from outside the plug in product configuration or platform start up p since 2 0 deprecated this method has been refactored in the new preference mechanism to handle the case where the runtime compatibility layer does not exist the contents of this method should be moved to the method named code initialize default preferences code in a separate subclass of link org eclipse core runtime preferences abstract preference initializer this class should be contributed via the code org eclipse core runtime preferences code extension point pre lt extension point quo org eclipse core runtime preferences quo gt lt initializer class quo com example my preference initializer quo gt lt extension gt package com example public class my preference initializer extends abstract preference initializer public my preference initializer super public void initialize default preferences preferences node new default scope get node my plugin id node put key value pre protected void initialize default plugin preferences default implementation of this method spec d to do nothing initializedefaultpreferences abstractpreferenceinitializer mypreferenceinitializer mypreferenceinitializer abstractpreferenceinitializer mypreferenceinitializer initializedefaultpreferences defaultscope getnode initializedefaultpluginpreferences internal method this method is a hook for initialization of default preference values it should not be called by clients since 3 0 public final void internal initialize default plugin preferences initialize default plugin preferences internalinitializedefaultpluginpreferences initializedefaultpluginpreferences returns whether this plug in is in debug mode by default plug ins are not in debug mode a plug in can put itself into debug mode or the user can set an execution option to do so p note that the plug in s debug flag is initialized when the plug in is started the result of calling this method before the plug in has started is unspecified p return whether this plug in is in debug mode public boolean is debugging return debug isdebugging returns an input stream for the specified file the file path must be specified relative this the plug in s installation location param file path relative to plug in installation location return an input stream exception io exception if the given path cannot be found in this plug in see open stream i path boolean public final input stream open stream i path file throws io exception return find support open stream bundle file false ioexception openstream ipath inputstream openstream ipath ioexception findsupport openstream returns an input stream for the specified file the file path must be specified relative to this plug in s installation location optionally the platform searches for the correct localized version of the specified file using the users current locale and java naming convention for localized resource files locale suffix appended to the specified file extension p the caller must close the returned stream when done p param file path relative to plug in installation location param localized code true code for the localized version of the file and code false code for the file exactly as specified return an input stream exception io exception if the given path cannot be found in this plug in public final input stream open stream i path file boolean localized throws io exception return find support open stream bundle file localized ioexception inputstream openstream ipath ioexception findsupport openstream sets whether this plug in is in debug mode by default plug ins are not in debug mode a plug in can put itself into debug mode or the user can set a debug option to do so p note that the plug in s debug flag is initialized when the plug in is started the result of calling this method before the plug in has started is unspecified p param value whether or not this plug in is in debug mode public void set debugging boolean value debug value setdebugging shuts down this plug in and discards all plug in state p this method should be re implemented in subclasses that need to do something when the plug in is shut down implementors should call the inherited method to ensure that any system requirements can be met p p plug in shutdown code should be robust in particular this method should always make an effort to shut down the plug in furthermore the code should not assume that the plug in was started successfully as this method will be invoked in the event of a failure during startup p p note 1 if a plug in has been started this method will be automatically invoked by the platform when the platform is shut down p p note 2 this method is intended to perform simple termination of the plug in environment the platform may terminate invocations that do not complete in a timely fashion p b clients must never explicitly call this method b p exception core exception if this method fails to shut down this plug in deprecated in eclipse 3 0 this method has been replaced by link plugin stop bundle context context implementations of code shutdown code should be changed to override code stop bundle context context code and call code super stop context code instead of code super shutdown code the code shutdown code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in public void shutdown throws core exception if compatibility helper initialize compatibility null return throwable exception null method m try m descriptor get class get method do plugin deactivation new class 0 non nls 1 m invoke descriptor null catch security exception e exception e catch no such method exception e exception e catch illegal argument exception e exception e catch illegal access exception e exception e catch invocation target exception e exception e if exception null return string message nls bind messages plugin shutdownproblems descriptor get unique identifier i status status new status i status error platform pi runtime i status error message exception internal platform get default log status coreexception bundlecontext bundlecontext coreexception compatibilityhelper initializecompatibility getclass getmethod doplugindeactivation securityexception nosuchmethodexception illegalargumentexception illegalaccessexception invocationtargetexception plugin_shutdownproblems getuniqueidentifier istatus istatus pi_runtime istatus internalplatform getdefault starts up this plug in p this method should be overridden in subclasses that need to do something when this plug in is started implementors should call the inherited method to ensure that any system requirements can be met p p if this method throws an exception it is taken as an indication that plug in initialization has failed as a result the plug in will not be activated moreover the plug in will be marked as disabled and ineligible for activation for the duration p p plug in startup code should be robust in the event of a startup failure the plug in s code shutdown code method will be invoked automatically in an attempt to close open files etc p p note 1 this method is automatically invoked by the platform the first time any code in the plug in is executed p p note 2 this method is intended to perform simple initialization of the plug in environment the platform may terminate initializers that do not complete in a timely fashion p p note 3 the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p b clients must never explicitly call this method b p exception core exception if this plug in did not start up properly deprecated in eclipse 3 0 this method has been replaced by link plugin start bundle context context implementations of code startup code should be changed to extend code start bundle context context code and call code super start context code instead of code super startup code the code startup code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in public void startup throws core exception coreexception bundlecontext bundlecontext coreexception returns a string representation of the plug in suitable for debugging purposes only public string to string string name bundle get symbolic name return name null new long bundle get bundle id to string name tostring getsymbolicname getbundleid tostring starts up this plug in p this method should be overridden in subclasses that need to do something when this plug in is started implementors should call the inherited method at the first possible point to ensure that any system requirements can be met p p if this method throws an exception it is taken as an indication that plug in initialization has failed as a result the plug in will not be activated moreover the plug in will be marked as disabled and ineligible for activation for the duration p p plug in startup code should be robust in the event of a startup failure the plug in s code shutdown code method will be invoked automatically in an attempt to close open files etc p p note 1 this method is automatically invoked by the platform the first time any code in the plug in is executed p p note 2 this method is intended to perform simple initialization of the plug in environment the platform may terminate initializers that do not complete in a timely fashion p p note 3 the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p p note 4 the supplied bundle context represents the plug in to the os gi framework for security reasons it is strongly recommended that this object should not be divulged p b clients must never explicitly call this method b param context the bundle context for this plug in exception exception if this plug in did not start up properly since 3 0 public void start bundle context context throws exception bundle context get bundle string symbolic name bundle get symbolic name if symbolic name null string key symbolic name debug non nls 1 string value internal platform get default get option key this debug value null false value equals ignore case true non nls 1 initialize descriptor symbolic name osgi bundlecontext getbundle symbolicname getsymbolicname symbolicname symbolicname internalplatform getdefault getoption equalsignorecase initializedescriptor symbolicname deprecated marked as deprecated to suppress deprecation warnings private i plugin descriptor initialize descriptor string symbolic name if compatibility helper initialize compatibility null return null this associate a descriptor to any real bundle that uses this to start if symbolic name null return null i plugin descriptor tmp compatibility helper get plugin descriptor symbolic name runtime descriptor is never set to support dynamic re installation of compatibility if symbolic name equals platform pi runtime descriptor tmp compatibility helper set plugin tmp this compatibility helper set active tmp return tmp iplugindescriptor initializedescriptor symbolicname compatibilityhelper initializecompatibility symbolicname iplugindescriptor compatibilityhelper getplugindescriptor symbolicname symbolicname pi_runtime compatibilityhelper setplugin compatibilityhelper setactive stops this plug in p this method should be re implemented in subclasses that need to do something when the plug in is shut down implementors should call the inherited method as late as possible to ensure that any system requirements can be met p p plug in shutdown code should be robust in particular this method should always make an effort to shut down the plug in furthermore the code should not assume that the plug in was started successfully as this method will be invoked in the event of a failure during startup p p note 1 if a plug in has been automatically started this method will be automatically invoked by the platform when the platform is shut down p p note 2 this method is intended to perform simple termination of the plug in environment the platform may terminate invocations that do not complete in a timely fashion p p note 3 the supplied bundle context represents the plug in to the os gi framework for security reasons it is strongly recommended that this object should not be divulged p b clients must never explicitly call this method b param context the bundle context for this plug in exception exception if this method fails to shut down this plug in since 3 0 public void stop bundle context context throws exception sub classes to override osgi bundlecontext returns the bundle associated with this plug in return the associated bundle since 3 0 public final bundle get bundle return bundle getbundle creates a new plug in runtime object this method is called by the platform if this class is used as a code bundle activator code this method is not needed used if this plug in requires the org eclipse core runtime compatibility plug in subclasses of code plugin code must call this method first in their constructors the resultant instance is not managed by the runtime and so should be remembered by the client typically using a singleton pattern b clients must never explicitly call this method b p p note the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p since 3 0 public plugin super bundleactivator creates a new plug in runtime object for the given plug in descriptor p instances of plug in runtime classes are automatically created by the platform in the course of plug in activation b clients must never explicitly call this method b p p note the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p param descriptor the plug in descriptor see get descriptor deprecated in eclipse 3 0 this constructor has been replaced by link plugin implementations of code my plugin i plugin descriptor descriptor code should be changed to code my plugin code and call code super code instead of code super descriptor code the code my plugin i plugin descriptor descriptor code constructor is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in public plugin i plugin descriptor descriptor assert is not null descriptor assert is true compatibility helper has plugin object descriptor nls bind messages plugin deactivatedload this get class get name descriptor get unique identifier is not activated non nls 1 this descriptor descriptor on plugin start find and start the corresponding bundle bundle internal platform get default get bundle descriptor get unique identifier try if bundle get state bundle starting bundle active bundle stopping 0 bundle start catch bundle exception e string message nls bind messages plugin startupproblems descriptor get unique identifier i status status new status i status error platform pi runtime i status error message e internal platform get default log status getdescriptor myplugin iplugindescriptor myplugin myplugin iplugindescriptor iplugindescriptor isnotnull istrue compatibilityhelper haspluginobject plugin_deactivatedload getclass getname getuniqueidentifier internalplatform getdefault getbundle getuniqueidentifier getstate bundleexception plugin_startupproblems getuniqueidentifier istatus istatus pi_runtime istatus internalplatform getdefault returns a url for the given path returns code null code if the url could not be computed or created param path path relative to plug in installation location return a url for the given path or code null code public final url find i path path return find support find bundle path null ipath findsupport returns a url for the given path returns code null code if the url could not be computed or created param path file path relative to plug in installation location param override map of override substitution arguments to be used for any arg path elements the map keys correspond to the substitution arguments eg nl or os the resulting values must be of type java lang string if the map is code null code or does not contain the required substitution argument the default is used return a url for the given path or code null code public final url find i path path map override return find support find bundle path override ipath findsupport returns the plug in descriptor for this plug in runtime object return the plug in descriptor for this plug in runtime object deprecated code i plugin descriptor code was refactored in eclipse 3 0 the code get descriptor code method may only be called by plug ins which explicitly require the org eclipse core runtime compatibility plug in see the comments on link i plugin descriptor and its methods for details public final i plugin descriptor get descriptor if descriptor null return descriptor return initialize descriptor bundle get symbolic name iplugindescriptor getdescriptor iplugindescriptor iplugindescriptor getdescriptor initializedescriptor getsymbolicname returns the log for this plug in if no such log exists one is created return the log for this plug in public final i log get log return internal platform get default get log bundle ilog getlog internalplatform getdefault getlog returns the location in the local file system of the plug in state area for this plug in if the plug in state area did not exist prior to this call it is created p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings and other configuration parameters p throws illegal state exception when the system is running with no data area data none or when a data area has not been set yet return a local file system path public final i path get state location throws illegal state exception return internal platform get default get state location bundle true illegalstateexception ipath getstatelocation illegalstateexception internalplatform getdefault getstatelocation returns the preference store for this plug in p note that if an error occurs reading the preference store from disk an empty preference store is quietly created initialized with defaults and returned p p calling this method may cause the preference store to be created and initialized subclasses which reimplement the code initialize default plugin preferences code method have this opportunity to initialize preference default values just prior to processing override default values imposed externally to this plug in specified for the product or at platform start up p p after settings in the preference store are changed for example with code preferences set value code or code set to default code code save plugin preferences code should be called to store the changed values back to disk otherwise the changes will be lost on plug in shutdown p return the preference store see save plugin preferences see preferences set value string string see preferences set to default string since 2 0 public final preferences get plugin preferences if preferences null if internal platform debug preference general policy debug plugin preferences already loaded for bundle get symbolic name non nls 1 return preferences if internal platform debug preference general policy debug loading preferences for plugin bundle get symbolic name non nls 1 preferences new preference forwarder this bundle get symbolic name return preferences initializedefaultpluginpreferences setvalue settodefault savepluginpreferences savepluginpreferences setvalue settodefault getpluginpreferences internalplatform debug_preference_general getsymbolicname internalplatform debug_preference_general getsymbolicname preferenceforwarder getsymbolicname saves preferences settings for this plug in does nothing if the preference store does not need saving p plug in preferences are b not b saved automatically on plug in shutdown p see preferences store output stream string see preferences needs saving since 2 0 public final void save plugin preferences populate the preferences instvar we still might need to save them because someone else might have made changes via the os gi ap is get plugin preferences try preferences flush catch backing store exception e i status status new status i status error platform pi runtime i status error messages preferences saveproblems e internal platform get default log status outputstream needssaving savepluginpreferences osgi apis getpluginpreferences backingstoreexception istatus istatus pi_runtime istatus preferences_saveproblems internalplatform getdefault initializes the default preferences settings for this plug in p this method is called sometime after the preference store for this plug in is created default values are never stored in preference stores they must be filled in each time this method provides the opportunity to initialize the default values p p the default implementation of this method does nothing a subclass that needs to set default values for its preferences must reimplement this method default values set at a later point will override any default override settings supplied from outside the plug in product configuration or platform start up p since 2 0 deprecated this method has been refactored in the new preference mechanism to handle the case where the runtime compatibility layer does not exist the contents of this method should be moved to the method named code initialize default preferences code in a separate subclass of link org eclipse core runtime preferences abstract preference initializer this class should be contributed via the code org eclipse core runtime preferences code extension point pre lt extension point quo org eclipse core runtime preferences quo gt lt initializer class quo com example my preference initializer quo gt lt extension gt package com example public class my preference initializer extends abstract preference initializer public my preference initializer super public void initialize default preferences preferences node new default scope get node my plugin id node put key value pre protected void initialize default plugin preferences default implementation of this method spec d to do nothing initializedefaultpreferences abstractpreferenceinitializer mypreferenceinitializer mypreferenceinitializer abstractpreferenceinitializer mypreferenceinitializer initializedefaultpreferences defaultscope getnode initializedefaultpluginpreferences internal method this method is a hook for initialization of default preference values it should not be called by clients since 3 0 public final void internal initialize default plugin preferences initialize default plugin preferences internalinitializedefaultpluginpreferences initializedefaultpluginpreferences returns whether this plug in is in debug mode by default plug ins are not in debug mode a plug in can put itself into debug mode or the user can set an execution option to do so p note that the plug in s debug flag is initialized when the plug in is started the result of calling this method before the plug in has started is unspecified p return whether this plug in is in debug mode public boolean is debugging return debug isdebugging returns an input stream for the specified file the file path must be specified relative this the plug in s installation location param file path relative to plug in installation location return an input stream exception io exception if the given path cannot be found in this plug in see open stream i path boolean public final input stream open stream i path file throws io exception return find support open stream bundle file false ioexception openstream ipath inputstream openstream ipath ioexception findsupport openstream returns an input stream for the specified file the file path must be specified relative to this plug in s installation location optionally the platform searches for the correct localized version of the specified file using the users current locale and java naming convention for localized resource files locale suffix appended to the specified file extension p the caller must close the returned stream when done p param file path relative to plug in installation location param localized code true code for the localized version of the file and code false code for the file exactly as specified return an input stream exception io exception if the given path cannot be found in this plug in public final input stream open stream i path file boolean localized throws io exception return find support open stream bundle file localized ioexception inputstream openstream ipath ioexception findsupport openstream sets whether this plug in is in debug mode by default plug ins are not in debug mode a plug in can put itself into debug mode or the user can set a debug option to do so p note that the plug in s debug flag is initialized when the plug in is started the result of calling this method before the plug in has started is unspecified p param value whether or not this plug in is in debug mode public void set debugging boolean value debug value setdebugging shuts down this plug in and discards all plug in state p this method should be re implemented in subclasses that need to do something when the plug in is shut down implementors should call the inherited method to ensure that any system requirements can be met p p plug in shutdown code should be robust in particular this method should always make an effort to shut down the plug in furthermore the code should not assume that the plug in was started successfully as this method will be invoked in the event of a failure during startup p p note 1 if a plug in has been started this method will be automatically invoked by the platform when the platform is shut down p p note 2 this method is intended to perform simple termination of the plug in environment the platform may terminate invocations that do not complete in a timely fashion p b clients must never explicitly call this method b p exception core exception if this method fails to shut down this plug in deprecated in eclipse 3 0 this method has been replaced by link plugin stop bundle context context implementations of code shutdown code should be changed to override code stop bundle context context code and call code super stop context code instead of code super shutdown code the code shutdown code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in public void shutdown throws core exception if compatibility helper initialize compatibility null return throwable exception null method m try m descriptor get class get method do plugin deactivation new class 0 non nls 1 m invoke descriptor null catch security exception e exception e catch no such method exception e exception e catch illegal argument exception e exception e catch illegal access exception e exception e catch invocation target exception e exception e if exception null return string message nls bind messages plugin shutdownproblems descriptor get unique identifier i status status new status i status error platform pi runtime i status error message exception internal platform get default log status coreexception bundlecontext bundlecontext coreexception compatibilityhelper initializecompatibility getclass getmethod doplugindeactivation securityexception nosuchmethodexception illegalargumentexception illegalaccessexception invocationtargetexception plugin_shutdownproblems getuniqueidentifier istatus istatus pi_runtime istatus internalplatform getdefault starts up this plug in p this method should be overridden in subclasses that need to do something when this plug in is started implementors should call the inherited method to ensure that any system requirements can be met p p if this method throws an exception it is taken as an indication that plug in initialization has failed as a result the plug in will not be activated moreover the plug in will be marked as disabled and ineligible for activation for the duration p p plug in startup code should be robust in the event of a startup failure the plug in s code shutdown code method will be invoked automatically in an attempt to close open files etc p p note 1 this method is automatically invoked by the platform the first time any code in the plug in is executed p p note 2 this method is intended to perform simple initialization of the plug in environment the platform may terminate initializers that do not complete in a timely fashion p p note 3 the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p b clients must never explicitly call this method b p exception core exception if this plug in did not start up properly deprecated in eclipse 3 0 this method has been replaced by link plugin start bundle context context implementations of code startup code should be changed to extend code start bundle context context code and call code super start context code instead of code super startup code the code startup code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in public void startup throws core exception coreexception bundlecontext bundlecontext coreexception returns a string representation of the plug in suitable for debugging purposes only public string to string string name bundle get symbolic name return name null new long bundle get bundle id to string name tostring getsymbolicname getbundleid tostring starts up this plug in p this method should be overridden in subclasses that need to do something when this plug in is started implementors should call the inherited method at the first possible point to ensure that any system requirements can be met p p if this method throws an exception it is taken as an indication that plug in initialization has failed as a result the plug in will not be activated moreover the plug in will be marked as disabled and ineligible for activation for the duration p p plug in startup code should be robust in the event of a startup failure the plug in s code shutdown code method will be invoked automatically in an attempt to close open files etc p p note 1 this method is automatically invoked by the platform the first time any code in the plug in is executed p p note 2 this method is intended to perform simple initialization of the plug in environment the platform may terminate initializers that do not complete in a timely fashion p p note 3 the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p p note 4 the supplied bundle context represents the plug in to the os gi framework for security reasons it is strongly recommended that this object should not be divulged p b clients must never explicitly call this method b param context the bundle context for this plug in exception exception if this plug in did not start up properly since 3 0 public void start bundle context context throws exception bundle context get bundle string symbolic name bundle get symbolic name if symbolic name null string key symbolic name debug non nls 1 string value internal platform get default get option key this debug value null false value equals ignore case true non nls 1 initialize descriptor symbolic name osgi bundlecontext getbundle symbolicname getsymbolicname symbolicname symbolicname internalplatform getdefault getoption equalsignorecase initializedescriptor symbolicname deprecated marked as deprecated to suppress deprecation warnings private i plugin descriptor initialize descriptor string symbolic name if compatibility helper initialize compatibility null return null this associate a descriptor to any real bundle that uses this to start if symbolic name null return null i plugin descriptor tmp compatibility helper get plugin descriptor symbolic name runtime descriptor is never set to support dynamic re installation of compatibility if symbolic name equals platform pi runtime descriptor tmp compatibility helper set plugin tmp this compatibility helper set active tmp return tmp iplugindescriptor initializedescriptor symbolicname compatibilityhelper initializecompatibility symbolicname iplugindescriptor compatibilityhelper getplugindescriptor symbolicname symbolicname pi_runtime compatibilityhelper setplugin compatibilityhelper setactive stops this plug in p this method should be re implemented in subclasses that need to do something when the plug in is shut down implementors should call the inherited method as late as possible to ensure that any system requirements can be met p p plug in shutdown code should be robust in particular this method should always make an effort to shut down the plug in furthermore the code should not assume that the plug in was started successfully as this method will be invoked in the event of a failure during startup p p note 1 if a plug in has been automatically started this method will be automatically invoked by the platform when the platform is shut down p p note 2 this method is intended to perform simple termination of the plug in environment the platform may terminate invocations that do not complete in a timely fashion p p note 3 the supplied bundle context represents the plug in to the os gi framework for security reasons it is strongly recommended that this object should not be divulged p b clients must never explicitly call this method b param context the bundle context for this plug in exception exception if this method fails to shut down this plug in since 3 0 public void stop bundle context context throws exception sub classes to override osgi bundlecontext returns the bundle associated with this plug in return the associated bundle since 3 0 public final bundle get bundle return bundle getbundle creates a new plug in runtime object this method is called by the platform if this class is used as a code bundle activator code this method is not needed used if this plug in requires the org eclipse core runtime compatibility plug in subclasses of code plugin code must call this method first in their constructors the resultant instance is not managed by the runtime and so should be remembered by the client typically using a singleton pattern b clients must never explicitly call this method b p p note the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p since 3 0 public plugin super bundleactivator creates a new plug in runtime object for the given plug in descriptor p instances of plug in runtime classes are automatically created by the platform in the course of plug in activation b clients must never explicitly call this method b p p note the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p param descriptor the plug in descriptor see get descriptor deprecated in eclipse 3 0 this constructor has been replaced by link plugin implementations of code my plugin i plugin descriptor descriptor code should be changed to code my plugin code and call code super code instead of code super descriptor code the code my plugin i plugin descriptor descriptor code constructor is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in public plugin i plugin descriptor descriptor assert is not null descriptor assert is true compatibility helper has plugin object descriptor nls bind messages plugin deactivatedload this get class get name descriptor get unique identifier is not activated non nls 1 this descriptor descriptor on plugin start find and start the corresponding bundle bundle internal platform get default get bundle descriptor get unique identifier try if bundle get state bundle starting bundle active bundle stopping 0 bundle start catch bundle exception e string message nls bind messages plugin startupproblems descriptor get unique identifier i status status new status i status error platform pi runtime i status error message e internal platform get default log status getdescriptor myplugin iplugindescriptor myplugin myplugin iplugindescriptor iplugindescriptor isnotnull istrue compatibilityhelper haspluginobject plugin_deactivatedload getclass getname getuniqueidentifier internalplatform getdefault getbundle getuniqueidentifier getstate bundleexception plugin_startupproblems getuniqueidentifier istatus istatus pi_runtime istatus internalplatform getdefault returns a url for the given path returns code null code if the url could not be computed or created param path path relative to plug in installation location return a url for the given path or code null code public final url find i path path return find support find bundle path null ipath findsupport returns a url for the given path returns code null code if the url could not be computed or created param path file path relative to plug in installation location param override map of override substitution arguments to be used for any arg path elements the map keys correspond to the substitution arguments eg nl or os the resulting values must be of type java lang string if the map is code null code or does not contain the required substitution argument the default is used return a url for the given path or code null code public final url find i path path map override return find support find bundle path override ipath findsupport returns the plug in descriptor for this plug in runtime object return the plug in descriptor for this plug in runtime object deprecated code i plugin descriptor code was refactored in eclipse 3 0 the code get descriptor code method may only be called by plug ins which explicitly require the org eclipse core runtime compatibility plug in see the comments on link i plugin descriptor and its methods for details public final i plugin descriptor get descriptor if descriptor null return descriptor return initialize descriptor bundle get symbolic name iplugindescriptor getdescriptor iplugindescriptor iplugindescriptor getdescriptor initializedescriptor getsymbolicname returns the log for this plug in if no such log exists one is created return the log for this plug in public final i log get log return internal platform get default get log bundle ilog getlog internalplatform getdefault getlog returns the location in the local file system of the plug in state area for this plug in if the plug in state area did not exist prior to this call it is created p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings and other configuration parameters p throws illegal state exception when the system is running with no data area data none or when a data area has not been set yet return a local file system path public final i path get state location throws illegal state exception return internal platform get default get state location bundle true illegalstateexception ipath getstatelocation illegalstateexception internalplatform getdefault getstatelocation returns the preference store for this plug in p note that if an error occurs reading the preference store from disk an empty preference store is quietly created initialized with defaults and returned p p calling this method may cause the preference store to be created and initialized subclasses which reimplement the code initialize default plugin preferences code method have this opportunity to initialize preference default values just prior to processing override default values imposed externally to this plug in specified for the product or at platform start up p p after settings in the preference store are changed for example with code preferences set value code or code set to default code code save plugin preferences code should be called to store the changed values back to disk otherwise the changes will be lost on plug in shutdown p return the preference store see save plugin preferences see preferences set value string string see preferences set to default string since 2 0 public final preferences get plugin preferences if preferences null if internal platform debug preference general policy debug plugin preferences already loaded for bundle get symbolic name non nls 1 return preferences if internal platform debug preference general policy debug loading preferences for plugin bundle get symbolic name non nls 1 preferences new preference forwarder this bundle get symbolic name return preferences initializedefaultpluginpreferences setvalue settodefault savepluginpreferences savepluginpreferences setvalue settodefault getpluginpreferences internalplatform debug_preference_general getsymbolicname internalplatform debug_preference_general getsymbolicname preferenceforwarder getsymbolicname saves preferences settings for this plug in does nothing if the preference store does not need saving p plug in preferences are b not b saved automatically on plug in shutdown p see preferences store output stream string see preferences needs saving since 2 0 public final void save plugin preferences populate the preferences instvar we still might need to save them because someone else might have made changes via the os gi ap is get plugin preferences try preferences flush catch backing store exception e i status status new status i status error platform pi runtime i status error messages preferences saveproblems e internal platform get default log status outputstream needssaving savepluginpreferences osgi apis getpluginpreferences backingstoreexception istatus istatus pi_runtime istatus preferences_saveproblems internalplatform getdefault initializes the default preferences settings for this plug in p this method is called sometime after the preference store for this plug in is created default values are never stored in preference stores they must be filled in each time this method provides the opportunity to initialize the default values p p the default implementation of this method does nothing a subclass that needs to set default values for its preferences must reimplement this method default values set at a later point will override any default override settings supplied from outside the plug in product configuration or platform start up p since 2 0 deprecated this method has been refactored in the new preference mechanism to handle the case where the runtime compatibility layer does not exist the contents of this method should be moved to the method named code initialize default preferences code in a separate subclass of link org eclipse core runtime preferences abstract preference initializer this class should be contributed via the code org eclipse core runtime preferences code extension point pre lt extension point quo org eclipse core runtime preferences quo gt lt initializer class quo com example my preference initializer quo gt lt extension gt package com example public class my preference initializer extends abstract preference initializer public my preference initializer super public void initialize default preferences preferences node new default scope get node my plugin id node put key value pre protected void initialize default plugin preferences default implementation of this method spec d to do nothing initializedefaultpreferences abstractpreferenceinitializer mypreferenceinitializer mypreferenceinitializer abstractpreferenceinitializer mypreferenceinitializer initializedefaultpreferences defaultscope getnode initializedefaultpluginpreferences internal method this method is a hook for initialization of default preference values it should not be called by clients since 3 0 public final void internal initialize default plugin preferences initialize default plugin preferences internalinitializedefaultpluginpreferences initializedefaultpluginpreferences returns whether this plug in is in debug mode by default plug ins are not in debug mode a plug in can put itself into debug mode or the user can set an execution option to do so p note that the plug in s debug flag is initialized when the plug in is started the result of calling this method before the plug in has started is unspecified p return whether this plug in is in debug mode public boolean is debugging return debug isdebugging returns an input stream for the specified file the file path must be specified relative this the plug in s installation location param file path relative to plug in installation location return an input stream exception io exception if the given path cannot be found in this plug in see open stream i path boolean public final input stream open stream i path file throws io exception return find support open stream bundle file false ioexception openstream ipath inputstream openstream ipath ioexception findsupport openstream returns an input stream for the specified file the file path must be specified relative to this plug in s installation location optionally the platform searches for the correct localized version of the specified file using the users current locale and java naming convention for localized resource files locale suffix appended to the specified file extension p the caller must close the returned stream when done p param file path relative to plug in installation location param localized code true code for the localized version of the file and code false code for the file exactly as specified return an input stream exception io exception if the given path cannot be found in this plug in public final input stream open stream i path file boolean localized throws io exception return find support open stream bundle file localized ioexception inputstream openstream ipath ioexception findsupport openstream sets whether this plug in is in debug mode by default plug ins are not in debug mode a plug in can put itself into debug mode or the user can set a debug option to do so p note that the plug in s debug flag is initialized when the plug in is started the result of calling this method before the plug in has started is unspecified p param value whether or not this plug in is in debug mode public void set debugging boolean value debug value setdebugging shuts down this plug in and discards all plug in state p this method should be re implemented in subclasses that need to do something when the plug in is shut down implementors should call the inherited method to ensure that any system requirements can be met p p plug in shutdown code should be robust in particular this method should always make an effort to shut down the plug in furthermore the code should not assume that the plug in was started successfully as this method will be invoked in the event of a failure during startup p p note 1 if a plug in has been started this method will be automatically invoked by the platform when the platform is shut down p p note 2 this method is intended to perform simple termination of the plug in environment the platform may terminate invocations that do not complete in a timely fashion p b clients must never explicitly call this method b p exception core exception if this method fails to shut down this plug in deprecated in eclipse 3 0 this method has been replaced by link plugin stop bundle context context implementations of code shutdown code should be changed to override code stop bundle context context code and call code super stop context code instead of code super shutdown code the code shutdown code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in public void shutdown throws core exception if compatibility helper initialize compatibility null return throwable exception null method m try m descriptor get class get method do plugin deactivation new class 0 non nls 1 m invoke descriptor null catch security exception e exception e catch no such method exception e exception e catch illegal argument exception e exception e catch illegal access exception e exception e catch invocation target exception e exception e if exception null return string message nls bind messages plugin shutdownproblems descriptor get unique identifier i status status new status i status error platform pi runtime i status error message exception internal platform get default log status coreexception bundlecontext bundlecontext coreexception compatibilityhelper initializecompatibility getclass getmethod doplugindeactivation securityexception nosuchmethodexception illegalargumentexception illegalaccessexception invocationtargetexception plugin_shutdownproblems getuniqueidentifier istatus istatus pi_runtime istatus internalplatform getdefault starts up this plug in p this method should be overridden in subclasses that need to do something when this plug in is started implementors should call the inherited method to ensure that any system requirements can be met p p if this method throws an exception it is taken as an indication that plug in initialization has failed as a result the plug in will not be activated moreover the plug in will be marked as disabled and ineligible for activation for the duration p p plug in startup code should be robust in the event of a startup failure the plug in s code shutdown code method will be invoked automatically in an attempt to close open files etc p p note 1 this method is automatically invoked by the platform the first time any code in the plug in is executed p p note 2 this method is intended to perform simple initialization of the plug in environment the platform may terminate initializers that do not complete in a timely fashion p p note 3 the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p b clients must never explicitly call this method b p exception core exception if this plug in did not start up properly deprecated in eclipse 3 0 this method has been replaced by link plugin start bundle context context implementations of code startup code should be changed to extend code start bundle context context code and call code super start context code instead of code super startup code the code startup code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in public void startup throws core exception coreexception bundlecontext bundlecontext coreexception returns a string representation of the plug in suitable for debugging purposes only public string to string string name bundle get symbolic name return name null new long bundle get bundle id to string name tostring getsymbolicname getbundleid tostring starts up this plug in p this method should be overridden in subclasses that need to do something when this plug in is started implementors should call the inherited method at the first possible point to ensure that any system requirements can be met p p if this method throws an exception it is taken as an indication that plug in initialization has failed as a result the plug in will not be activated moreover the plug in will be marked as disabled and ineligible for activation for the duration p p plug in startup code should be robust in the event of a startup failure the plug in s code shutdown code method will be invoked automatically in an attempt to close open files etc p p note 1 this method is automatically invoked by the platform the first time any code in the plug in is executed p p note 2 this method is intended to perform simple initialization of the plug in environment the platform may terminate initializers that do not complete in a timely fashion p p note 3 the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p p note 4 the supplied bundle context represents the plug in to the os gi framework for security reasons it is strongly recommended that this object should not be divulged p b clients must never explicitly call this method b param context the bundle context for this plug in exception exception if this plug in did not start up properly since 3 0 public void start bundle context context throws exception bundle context get bundle string symbolic name bundle get symbolic name if symbolic name null string key symbolic name debug non nls 1 string value internal platform get default get option key this debug value null false value equals ignore case true non nls 1 initialize descriptor symbolic name osgi bundlecontext getbundle symbolicname getsymbolicname symbolicname symbolicname internalplatform getdefault getoption equalsignorecase initializedescriptor symbolicname deprecated marked as deprecated to suppress deprecation warnings private i plugin descriptor initialize descriptor string symbolic name if compatibility helper initialize compatibility null return null this associate a descriptor to any real bundle that uses this to start if symbolic name null return null i plugin descriptor tmp compatibility helper get plugin descriptor symbolic name runtime descriptor is never set to support dynamic re installation of compatibility if symbolic name equals platform pi runtime descriptor tmp compatibility helper set plugin tmp this compatibility helper set active tmp return tmp iplugindescriptor initializedescriptor symbolicname compatibilityhelper initializecompatibility symbolicname iplugindescriptor compatibilityhelper getplugindescriptor symbolicname symbolicname pi_runtime compatibilityhelper setplugin compatibilityhelper setactive stops this plug in p this method should be re implemented in subclasses that need to do something when the plug in is shut down implementors should call the inherited method as late as possible to ensure that any system requirements can be met p p plug in shutdown code should be robust in particular this method should always make an effort to shut down the plug in furthermore the code should not assume that the plug in was started successfully as this method will be invoked in the event of a failure during startup p p note 1 if a plug in has been automatically started this method will be automatically invoked by the platform when the platform is shut down p p note 2 this method is intended to perform simple termination of the plug in environment the platform may terminate invocations that do not complete in a timely fashion p p note 3 the supplied bundle context represents the plug in to the os gi framework for security reasons it is strongly recommended that this object should not be divulged p b clients must never explicitly call this method b param context the bundle context for this plug in exception exception if this method fails to shut down this plug in since 3 0 public void stop bundle context context throws exception sub classes to override osgi bundlecontext returns the bundle associated with this plug in return the associated bundle since 3 0 public final bundle get bundle return bundle getbundle creates a new plug in runtime object this method is called by the platform if this class is used as a code bundle activator code this method is not needed used if this plug in requires the org eclipse core runtime compatibility plug in subclasses of code plugin code must call this method first in their constructors the resultant instance is not managed by the runtime and so should be remembered by the client typically using a singleton pattern b clients must never explicitly call this method b p p note the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p since 3 0 public plugin super bundleactivator creates a new plug in runtime object for the given plug in descriptor p instances of plug in runtime classes are automatically created by the platform in the course of plug in activation b clients must never explicitly call this method b p p note the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p param descriptor the plug in descriptor see get descriptor deprecated in eclipse 3 0 this constructor has been replaced by link plugin implementations of code my plugin i plugin descriptor descriptor code should be changed to code my plugin code and call code super code instead of code super descriptor code the code my plugin i plugin descriptor descriptor code constructor is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in public plugin i plugin descriptor descriptor assert is not null descriptor assert is true compatibility helper has plugin object descriptor nls bind messages plugin deactivatedload this get class get name descriptor get unique identifier is not activated non nls 1 this descriptor descriptor on plugin start find and start the corresponding bundle bundle internal platform get default get bundle descriptor get unique identifier try if bundle get state bundle starting bundle active bundle stopping 0 bundle start catch bundle exception e string message nls bind messages plugin startupproblems descriptor get unique identifier i status status new status i status error platform pi runtime i status error message e internal platform get default log status getdescriptor myplugin iplugindescriptor myplugin myplugin iplugindescriptor iplugindescriptor isnotnull istrue compatibilityhelper haspluginobject plugin_deactivatedload getclass getname getuniqueidentifier internalplatform getdefault getbundle getuniqueidentifier getstate bundleexception plugin_startupproblems getuniqueidentifier istatus istatus pi_runtime istatus internalplatform getdefault returns a url for the given path returns code null code if the url could not be computed or created param path path relative to plug in installation location return a url for the given path or code null code public final url find i path path return find support find bundle path null ipath findsupport returns a url for the given path returns code null code if the url could not be computed or created param path file path relative to plug in installation location param override map of override substitution arguments to be used for any arg path elements the map keys correspond to the substitution arguments eg nl or os the resulting values must be of type java lang string if the map is code null code or does not contain the required substitution argument the default is used return a url for the given path or code null code public final url find i path path map override return find support find bundle path override ipath findsupport returns the plug in descriptor for this plug in runtime object return the plug in descriptor for this plug in runtime object deprecated code i plugin descriptor code was refactored in eclipse 3 0 the code get descriptor code method may only be called by plug ins which explicitly require the org eclipse core runtime compatibility plug in see the comments on link i plugin descriptor and its methods for details public final i plugin descriptor get descriptor if descriptor null return descriptor return initialize descriptor bundle get symbolic name iplugindescriptor getdescriptor iplugindescriptor iplugindescriptor getdescriptor initializedescriptor getsymbolicname returns the log for this plug in if no such log exists one is created return the log for this plug in public final i log get log return internal platform get default get log bundle ilog getlog internalplatform getdefault getlog returns the location in the local file system of the plug in state area for this plug in if the plug in state area did not exist prior to this call it is created p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings and other configuration parameters p throws illegal state exception when the system is running with no data area data none or when a data area has not been set yet return a local file system path public final i path get state location throws illegal state exception return internal platform get default get state location bundle true illegalstateexception ipath getstatelocation illegalstateexception internalplatform getdefault getstatelocation returns the preference store for this plug in p note that if an error occurs reading the preference store from disk an empty preference store is quietly created initialized with defaults and returned p p calling this method may cause the preference store to be created and initialized subclasses which reimplement the code initialize default plugin preferences code method have this opportunity to initialize preference default values just prior to processing override default values imposed externally to this plug in specified for the product or at platform start up p p after settings in the preference store are changed for example with code preferences set value code or code set to default code code save plugin preferences code should be called to store the changed values back to disk otherwise the changes will be lost on plug in shutdown p return the preference store see save plugin preferences see preferences set value string string see preferences set to default string since 2 0 public final preferences get plugin preferences if preferences null if internal platform debug preference general policy debug plugin preferences already loaded for bundle get symbolic name non nls 1 return preferences if internal platform debug preference general policy debug loading preferences for plugin bundle get symbolic name non nls 1 preferences new preference forwarder this bundle get symbolic name return preferences initializedefaultpluginpreferences setvalue settodefault savepluginpreferences savepluginpreferences setvalue settodefault getpluginpreferences internalplatform debug_preference_general getsymbolicname internalplatform debug_preference_general getsymbolicname preferenceforwarder getsymbolicname saves preferences settings for this plug in does nothing if the preference store does not need saving p plug in preferences are b not b saved automatically on plug in shutdown p see preferences store output stream string see preferences needs saving since 2 0 public final void save plugin preferences populate the preferences instvar we still might need to save them because someone else might have made changes via the os gi ap is get plugin preferences try preferences flush catch backing store exception e i status status new status i status error platform pi runtime i status error messages preferences saveproblems e internal platform get default log status outputstream needssaving savepluginpreferences osgi apis getpluginpreferences backingstoreexception istatus istatus pi_runtime istatus preferences_saveproblems internalplatform getdefault initializes the default preferences settings for this plug in p this method is called sometime after the preference store for this plug in is created default values are never stored in preference stores they must be filled in each time this method provides the opportunity to initialize the default values p p the default implementation of this method does nothing a subclass that needs to set default values for its preferences must reimplement this method default values set at a later point will override any default override settings supplied from outside the plug in product configuration or platform start up p since 2 0 deprecated this method has been refactored in the new preference mechanism to handle the case where the runtime compatibility layer does not exist the contents of this method should be moved to the method named code initialize default preferences code in a separate subclass of link org eclipse core runtime preferences abstract preference initializer this class should be contributed via the code org eclipse core runtime preferences code extension point pre lt extension point quo org eclipse core runtime preferences quo gt lt initializer class quo com example my preference initializer quo gt lt extension gt package com example public class my preference initializer extends abstract preference initializer public my preference initializer super public void initialize default preferences preferences node new default scope get node my plugin id node put key value pre protected void initialize default plugin preferences default implementation of this method spec d to do nothing initializedefaultpreferences abstractpreferenceinitializer mypreferenceinitializer mypreferenceinitializer abstractpreferenceinitializer mypreferenceinitializer initializedefaultpreferences defaultscope getnode initializedefaultpluginpreferences internal method this method is a hook for initialization of default preference values it should not be called by clients since 3 0 public final void internal initialize default plugin preferences initialize default plugin preferences internalinitializedefaultpluginpreferences initializedefaultpluginpreferences returns whether this plug in is in debug mode by default plug ins are not in debug mode a plug in can put itself into debug mode or the user can set an execution option to do so p note that the plug in s debug flag is initialized when the plug in is started the result of calling this method before the plug in has started is unspecified p return whether this plug in is in debug mode public boolean is debugging return debug isdebugging returns an input stream for the specified file the file path must be specified relative this the plug in s installation location param file path relative to plug in installation location return an input stream exception io exception if the given path cannot be found in this plug in see open stream i path boolean public final input stream open stream i path file throws io exception return find support open stream bundle file false ioexception openstream ipath inputstream openstream ipath ioexception findsupport openstream returns an input stream for the specified file the file path must be specified relative to this plug in s installation location optionally the platform searches for the correct localized version of the specified file using the users current locale and java naming convention for localized resource files locale suffix appended to the specified file extension p the caller must close the returned stream when done p param file path relative to plug in installation location param localized code true code for the localized version of the file and code false code for the file exactly as specified return an input stream exception io exception if the given path cannot be found in this plug in public final input stream open stream i path file boolean localized throws io exception return find support open stream bundle file localized ioexception inputstream openstream ipath ioexception findsupport openstream sets whether this plug in is in debug mode by default plug ins are not in debug mode a plug in can put itself into debug mode or the user can set a debug option to do so p note that the plug in s debug flag is initialized when the plug in is started the result of calling this method before the plug in has started is unspecified p param value whether or not this plug in is in debug mode public void set debugging boolean value debug value setdebugging shuts down this plug in and discards all plug in state p this method should be re implemented in subclasses that need to do something when the plug in is shut down implementors should call the inherited method to ensure that any system requirements can be met p p plug in shutdown code should be robust in particular this method should always make an effort to shut down the plug in furthermore the code should not assume that the plug in was started successfully as this method will be invoked in the event of a failure during startup p p note 1 if a plug in has been started this method will be automatically invoked by the platform when the platform is shut down p p note 2 this method is intended to perform simple termination of the plug in environment the platform may terminate invocations that do not complete in a timely fashion p b clients must never explicitly call this method b p exception core exception if this method fails to shut down this plug in deprecated in eclipse 3 0 this method has been replaced by link plugin stop bundle context context implementations of code shutdown code should be changed to override code stop bundle context context code and call code super stop context code instead of code super shutdown code the code shutdown code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in public void shutdown throws core exception if compatibility helper initialize compatibility null return throwable exception null method m try m descriptor get class get method do plugin deactivation new class 0 non nls 1 m invoke descriptor null catch security exception e exception e catch no such method exception e exception e catch illegal argument exception e exception e catch illegal access exception e exception e catch invocation target exception e exception e if exception null return string message nls bind messages plugin shutdownproblems descriptor get unique identifier i status status new status i status error platform pi runtime i status error message exception internal platform get default log status coreexception bundlecontext bundlecontext coreexception compatibilityhelper initializecompatibility getclass getmethod doplugindeactivation securityexception nosuchmethodexception illegalargumentexception illegalaccessexception invocationtargetexception plugin_shutdownproblems getuniqueidentifier istatus istatus pi_runtime istatus internalplatform getdefault starts up this plug in p this method should be overridden in subclasses that need to do something when this plug in is started implementors should call the inherited method to ensure that any system requirements can be met p p if this method throws an exception it is taken as an indication that plug in initialization has failed as a result the plug in will not be activated moreover the plug in will be marked as disabled and ineligible for activation for the duration p p plug in startup code should be robust in the event of a startup failure the plug in s code shutdown code method will be invoked automatically in an attempt to close open files etc p p note 1 this method is automatically invoked by the platform the first time any code in the plug in is executed p p note 2 this method is intended to perform simple initialization of the plug in environment the platform may terminate initializers that do not complete in a timely fashion p p note 3 the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p b clients must never explicitly call this method b p exception core exception if this plug in did not start up properly deprecated in eclipse 3 0 this method has been replaced by link plugin start bundle context context implementations of code startup code should be changed to extend code start bundle context context code and call code super start context code instead of code super startup code the code startup code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in public void startup throws core exception coreexception bundlecontext bundlecontext coreexception returns a string representation of the plug in suitable for debugging purposes only public string to string string name bundle get symbolic name return name null new long bundle get bundle id to string name tostring getsymbolicname getbundleid tostring starts up this plug in p this method should be overridden in subclasses that need to do something when this plug in is started implementors should call the inherited method at the first possible point to ensure that any system requirements can be met p p if this method throws an exception it is taken as an indication that plug in initialization has failed as a result the plug in will not be activated moreover the plug in will be marked as disabled and ineligible for activation for the duration p p plug in startup code should be robust in the event of a startup failure the plug in s code shutdown code method will be invoked automatically in an attempt to close open files etc p p note 1 this method is automatically invoked by the platform the first time any code in the plug in is executed p p note 2 this method is intended to perform simple initialization of the plug in environment the platform may terminate initializers that do not complete in a timely fashion p p note 3 the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p p note 4 the supplied bundle context represents the plug in to the os gi framework for security reasons it is strongly recommended that this object should not be divulged p b clients must never explicitly call this method b param context the bundle context for this plug in exception exception if this plug in did not start up properly since 3 0 public void start bundle context context throws exception bundle context get bundle string symbolic name bundle get symbolic name if symbolic name null string key symbolic name debug non nls 1 string value internal platform get default get option key this debug value null false value equals ignore case true non nls 1 initialize descriptor symbolic name osgi bundlecontext getbundle symbolicname getsymbolicname symbolicname symbolicname internalplatform getdefault getoption equalsignorecase initializedescriptor symbolicname deprecated marked as deprecated to suppress deprecation warnings private i plugin descriptor initialize descriptor string symbolic name if compatibility helper initialize compatibility null return null this associate a descriptor to any real bundle that uses this to start if symbolic name null return null i plugin descriptor tmp compatibility helper get plugin descriptor symbolic name runtime descriptor is never set to support dynamic re installation of compatibility if symbolic name equals platform pi runtime descriptor tmp compatibility helper set plugin tmp this compatibility helper set active tmp return tmp iplugindescriptor initializedescriptor symbolicname compatibilityhelper initializecompatibility symbolicname iplugindescriptor compatibilityhelper getplugindescriptor symbolicname symbolicname pi_runtime compatibilityhelper setplugin compatibilityhelper setactive stops this plug in p this method should be re implemented in subclasses that need to do something when the plug in is shut down implementors should call the inherited method as late as possible to ensure that any system requirements can be met p p plug in shutdown code should be robust in particular this method should always make an effort to shut down the plug in furthermore the code should not assume that the plug in was started successfully as this method will be invoked in the event of a failure during startup p p note 1 if a plug in has been automatically started this method will be automatically invoked by the platform when the platform is shut down p p note 2 this method is intended to perform simple termination of the plug in environment the platform may terminate invocations that do not complete in a timely fashion p p note 3 the supplied bundle context represents the plug in to the os gi framework for security reasons it is strongly recommended that this object should not be divulged p b clients must never explicitly call this method b param context the bundle context for this plug in exception exception if this method fails to shut down this plug in since 3 0 public void stop bundle context context throws exception sub classes to override osgi bundlecontext returns the bundle associated with this plug in return the associated bundle since 3 0 public final bundle get bundle return bundle getbundle creates a new plug in runtime object this method is called by the platform if this class is used as a code bundle activator code this method is not needed used if this plug in requires the org eclipse core runtime compatibility plug in subclasses of code plugin code must call this method first in their constructors the resultant instance is not managed by the runtime and so should be remembered by the client typically using a singleton pattern b clients must never explicitly call this method b p p note the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p since 3 0 public plugin super bundleactivator creates a new plug in runtime object for the given plug in descriptor p instances of plug in runtime classes are automatically created by the platform in the course of plug in activation b clients must never explicitly call this method b p p note the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p param descriptor the plug in descriptor see get descriptor deprecated in eclipse 3 0 this constructor has been replaced by link plugin implementations of code my plugin i plugin descriptor descriptor code should be changed to code my plugin code and call code super code instead of code super descriptor code the code my plugin i plugin descriptor descriptor code constructor is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in public plugin i plugin descriptor descriptor assert is not null descriptor assert is true compatibility helper has plugin object descriptor nls bind messages plugin deactivatedload this get class get name descriptor get unique identifier is not activated non nls 1 this descriptor descriptor on plugin start find and start the corresponding bundle bundle internal platform get default get bundle descriptor get unique identifier try if bundle get state bundle starting bundle active bundle stopping 0 bundle start catch bundle exception e string message nls bind messages plugin startupproblems descriptor get unique identifier i status status new status i status error platform pi runtime i status error message e internal platform get default log status getdescriptor myplugin iplugindescriptor myplugin myplugin iplugindescriptor iplugindescriptor isnotnull istrue compatibilityhelper haspluginobject plugin_deactivatedload getclass getname getuniqueidentifier internalplatform getdefault getbundle getuniqueidentifier getstate bundleexception plugin_startupproblems getuniqueidentifier istatus istatus pi_runtime istatus internalplatform getdefault returns a url for the given path returns code null code if the url could not be computed or created param path path relative to plug in installation location return a url for the given path or code null code public final url find i path path return find support find bundle path null ipath findsupport returns a url for the given path returns code null code if the url could not be computed or created param path file path relative to plug in installation location param override map of override substitution arguments to be used for any arg path elements the map keys correspond to the substitution arguments eg nl or os the resulting values must be of type java lang string if the map is code null code or does not contain the required substitution argument the default is used return a url for the given path or code null code public final url find i path path map override return find support find bundle path override ipath findsupport returns the plug in descriptor for this plug in runtime object return the plug in descriptor for this plug in runtime object deprecated code i plugin descriptor code was refactored in eclipse 3 0 the code get descriptor code method may only be called by plug ins which explicitly require the org eclipse core runtime compatibility plug in see the comments on link i plugin descriptor and its methods for details public final i plugin descriptor get descriptor if descriptor null return descriptor return initialize descriptor bundle get symbolic name iplugindescriptor getdescriptor iplugindescriptor iplugindescriptor getdescriptor initializedescriptor getsymbolicname returns the log for this plug in if no such log exists one is created return the log for this plug in public final i log get log return internal platform get default get log bundle ilog getlog internalplatform getdefault getlog returns the location in the local file system of the plug in state area for this plug in if the plug in state area did not exist prior to this call it is created p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings and other configuration parameters p throws illegal state exception when the system is running with no data area data none or when a data area has not been set yet return a local file system path public final i path get state location throws illegal state exception return internal platform get default get state location bundle true illegalstateexception ipath getstatelocation illegalstateexception internalplatform getdefault getstatelocation returns the preference store for this plug in p note that if an error occurs reading the preference store from disk an empty preference store is quietly created initialized with defaults and returned p p calling this method may cause the preference store to be created and initialized subclasses which reimplement the code initialize default plugin preferences code method have this opportunity to initialize preference default values just prior to processing override default values imposed externally to this plug in specified for the product or at platform start up p p after settings in the preference store are changed for example with code preferences set value code or code set to default code code save plugin preferences code should be called to store the changed values back to disk otherwise the changes will be lost on plug in shutdown p return the preference store see save plugin preferences see preferences set value string string see preferences set to default string since 2 0 public final preferences get plugin preferences if preferences null if internal platform debug preference general policy debug plugin preferences already loaded for bundle get symbolic name non nls 1 return preferences if internal platform debug preference general policy debug loading preferences for plugin bundle get symbolic name non nls 1 preferences new preference forwarder this bundle get symbolic name return preferences initializedefaultpluginpreferences setvalue settodefault savepluginpreferences savepluginpreferences setvalue settodefault getpluginpreferences internalplatform debug_preference_general getsymbolicname internalplatform debug_preference_general getsymbolicname preferenceforwarder getsymbolicname saves preferences settings for this plug in does nothing if the preference store does not need saving p plug in preferences are b not b saved automatically on plug in shutdown p see preferences store output stream string see preferences needs saving since 2 0 public final void save plugin preferences populate the preferences instvar we still might need to save them because someone else might have made changes via the os gi ap is get plugin preferences try preferences flush catch backing store exception e i status status new status i status error platform pi runtime i status error messages preferences saveproblems e internal platform get default log status outputstream needssaving savepluginpreferences osgi apis getpluginpreferences backingstoreexception istatus istatus pi_runtime istatus preferences_saveproblems internalplatform getdefault initializes the default preferences settings for this plug in p this method is called sometime after the preference store for this plug in is created default values are never stored in preference stores they must be filled in each time this method provides the opportunity to initialize the default values p p the default implementation of this method does nothing a subclass that needs to set default values for its preferences must reimplement this method default values set at a later point will override any default override settings supplied from outside the plug in product configuration or platform start up p since 2 0 deprecated this method has been refactored in the new preference mechanism to handle the case where the runtime compatibility layer does not exist the contents of this method should be moved to the method named code initialize default preferences code in a separate subclass of link org eclipse core runtime preferences abstract preference initializer this class should be contributed via the code org eclipse core runtime preferences code extension point pre lt extension point quo org eclipse core runtime preferences quo gt lt initializer class quo com example my preference initializer quo gt lt extension gt package com example public class my preference initializer extends abstract preference initializer public my preference initializer super public void initialize default preferences preferences node new default scope get node my plugin id node put key value pre protected void initialize default plugin preferences default implementation of this method spec d to do nothing initializedefaultpreferences abstractpreferenceinitializer mypreferenceinitializer mypreferenceinitializer abstractpreferenceinitializer mypreferenceinitializer initializedefaultpreferences defaultscope getnode initializedefaultpluginpreferences internal method this method is a hook for initialization of default preference values it should not be called by clients since 3 0 public final void internal initialize default plugin preferences initialize default plugin preferences internalinitializedefaultpluginpreferences initializedefaultpluginpreferences returns whether this plug in is in debug mode by default plug ins are not in debug mode a plug in can put itself into debug mode or the user can set an execution option to do so p note that the plug in s debug flag is initialized when the plug in is started the result of calling this method before the plug in has started is unspecified p return whether this plug in is in debug mode public boolean is debugging return debug isdebugging returns an input stream for the specified file the file path must be specified relative this the plug in s installation location param file path relative to plug in installation location return an input stream exception io exception if the given path cannot be found in this plug in see open stream i path boolean public final input stream open stream i path file throws io exception return find support open stream bundle file false ioexception openstream ipath inputstream openstream ipath ioexception findsupport openstream returns an input stream for the specified file the file path must be specified relative to this plug in s installation location optionally the platform searches for the correct localized version of the specified file using the users current locale and java naming convention for localized resource files locale suffix appended to the specified file extension p the caller must close the returned stream when done p param file path relative to plug in installation location param localized code true code for the localized version of the file and code false code for the file exactly as specified return an input stream exception io exception if the given path cannot be found in this plug in public final input stream open stream i path file boolean localized throws io exception return find support open stream bundle file localized ioexception inputstream openstream ipath ioexception findsupport openstream sets whether this plug in is in debug mode by default plug ins are not in debug mode a plug in can put itself into debug mode or the user can set a debug option to do so p note that the plug in s debug flag is initialized when the plug in is started the result of calling this method before the plug in has started is unspecified p param value whether or not this plug in is in debug mode public void set debugging boolean value debug value setdebugging shuts down this plug in and discards all plug in state p this method should be re implemented in subclasses that need to do something when the plug in is shut down implementors should call the inherited method to ensure that any system requirements can be met p p plug in shutdown code should be robust in particular this method should always make an effort to shut down the plug in furthermore the code should not assume that the plug in was started successfully as this method will be invoked in the event of a failure during startup p p note 1 if a plug in has been started this method will be automatically invoked by the platform when the platform is shut down p p note 2 this method is intended to perform simple termination of the plug in environment the platform may terminate invocations that do not complete in a timely fashion p b clients must never explicitly call this method b p exception core exception if this method fails to shut down this plug in deprecated in eclipse 3 0 this method has been replaced by link plugin stop bundle context context implementations of code shutdown code should be changed to override code stop bundle context context code and call code super stop context code instead of code super shutdown code the code shutdown code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in public void shutdown throws core exception if compatibility helper initialize compatibility null return throwable exception null method m try m descriptor get class get method do plugin deactivation new class 0 non nls 1 m invoke descriptor null catch security exception e exception e catch no such method exception e exception e catch illegal argument exception e exception e catch illegal access exception e exception e catch invocation target exception e exception e if exception null return string message nls bind messages plugin shutdownproblems descriptor get unique identifier i status status new status i status error platform pi runtime i status error message exception internal platform get default log status coreexception bundlecontext bundlecontext coreexception compatibilityhelper initializecompatibility getclass getmethod doplugindeactivation securityexception nosuchmethodexception illegalargumentexception illegalaccessexception invocationtargetexception plugin_shutdownproblems getuniqueidentifier istatus istatus pi_runtime istatus internalplatform getdefault starts up this plug in p this method should be overridden in subclasses that need to do something when this plug in is started implementors should call the inherited method to ensure that any system requirements can be met p p if this method throws an exception it is taken as an indication that plug in initialization has failed as a result the plug in will not be activated moreover the plug in will be marked as disabled and ineligible for activation for the duration p p plug in startup code should be robust in the event of a startup failure the plug in s code shutdown code method will be invoked automatically in an attempt to close open files etc p p note 1 this method is automatically invoked by the platform the first time any code in the plug in is executed p p note 2 this method is intended to perform simple initialization of the plug in environment the platform may terminate initializers that do not complete in a timely fashion p p note 3 the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p b clients must never explicitly call this method b p exception core exception if this plug in did not start up properly deprecated in eclipse 3 0 this method has been replaced by link plugin start bundle context context implementations of code startup code should be changed to extend code start bundle context context code and call code super start context code instead of code super startup code the code startup code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in public void startup throws core exception coreexception bundlecontext bundlecontext coreexception returns a string representation of the plug in suitable for debugging purposes only public string to string string name bundle get symbolic name return name null new long bundle get bundle id to string name tostring getsymbolicname getbundleid tostring starts up this plug in p this method should be overridden in subclasses that need to do something when this plug in is started implementors should call the inherited method at the first possible point to ensure that any system requirements can be met p p if this method throws an exception it is taken as an indication that plug in initialization has failed as a result the plug in will not be activated moreover the plug in will be marked as disabled and ineligible for activation for the duration p p plug in startup code should be robust in the event of a startup failure the plug in s code shutdown code method will be invoked automatically in an attempt to close open files etc p p note 1 this method is automatically invoked by the platform the first time any code in the plug in is executed p p note 2 this method is intended to perform simple initialization of the plug in environment the platform may terminate initializers that do not complete in a timely fashion p p note 3 the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p p note 4 the supplied bundle context represents the plug in to the os gi framework for security reasons it is strongly recommended that this object should not be divulged p b clients must never explicitly call this method b param context the bundle context for this plug in exception exception if this plug in did not start up properly since 3 0 public void start bundle context context throws exception bundle context get bundle string symbolic name bundle get symbolic name if symbolic name null string key symbolic name debug non nls 1 string value internal platform get default get option key this debug value null false value equals ignore case true non nls 1 initialize descriptor symbolic name osgi bundlecontext getbundle symbolicname getsymbolicname symbolicname symbolicname internalplatform getdefault getoption equalsignorecase initializedescriptor symbolicname deprecated marked as deprecated to suppress deprecation warnings private i plugin descriptor initialize descriptor string symbolic name if compatibility helper initialize compatibility null return null this associate a descriptor to any real bundle that uses this to start if symbolic name null return null i plugin descriptor tmp compatibility helper get plugin descriptor symbolic name runtime descriptor is never set to support dynamic re installation of compatibility if symbolic name equals platform pi runtime descriptor tmp compatibility helper set plugin tmp this compatibility helper set active tmp return tmp iplugindescriptor initializedescriptor symbolicname compatibilityhelper initializecompatibility symbolicname iplugindescriptor compatibilityhelper getplugindescriptor symbolicname symbolicname pi_runtime compatibilityhelper setplugin compatibilityhelper setactive stops this plug in p this method should be re implemented in subclasses that need to do something when the plug in is shut down implementors should call the inherited method as late as possible to ensure that any system requirements can be met p p plug in shutdown code should be robust in particular this method should always make an effort to shut down the plug in furthermore the code should not assume that the plug in was started successfully as this method will be invoked in the event of a failure during startup p p note 1 if a plug in has been automatically started this method will be automatically invoked by the platform when the platform is shut down p p note 2 this method is intended to perform simple termination of the plug in environment the platform may terminate invocations that do not complete in a timely fashion p p note 3 the supplied bundle context represents the plug in to the os gi framework for security reasons it is strongly recommended that this object should not be divulged p b clients must never explicitly call this method b param context the bundle context for this plug in exception exception if this method fails to shut down this plug in since 3 0 public void stop bundle context context throws exception sub classes to override osgi bundlecontext returns the bundle associated with this plug in return the associated bundle since 3 0 public final bundle get bundle return bundle getbundle creates a new plug in runtime object this method is called by the platform if this class is used as a code bundle activator code this method is not needed used if this plug in requires the org eclipse core runtime compatibility plug in subclasses of code plugin code must call this method first in their constructors the resultant instance is not managed by the runtime and so should be remembered by the client typically using a singleton pattern b clients must never explicitly call this method b p p note the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p since 3 0 public plugin super bundleactivator creates a new plug in runtime object for the given plug in descriptor p instances of plug in runtime classes are automatically created by the platform in the course of plug in activation b clients must never explicitly call this method b p p note the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p param descriptor the plug in descriptor see get descriptor deprecated in eclipse 3 0 this constructor has been replaced by link plugin implementations of code my plugin i plugin descriptor descriptor code should be changed to code my plugin code and call code super code instead of code super descriptor code the code my plugin i plugin descriptor descriptor code constructor is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in public plugin i plugin descriptor descriptor assert is not null descriptor assert is true compatibility helper has plugin object descriptor nls bind messages plugin deactivatedload this get class get name descriptor get unique identifier is not activated non nls 1 this descriptor descriptor on plugin start find and start the corresponding bundle bundle internal platform get default get bundle descriptor get unique identifier try if bundle get state bundle starting bundle active bundle stopping 0 bundle start catch bundle exception e string message nls bind messages plugin startupproblems descriptor get unique identifier i status status new status i status error platform pi runtime i status error message e internal platform get default log status getdescriptor myplugin iplugindescriptor myplugin myplugin iplugindescriptor iplugindescriptor isnotnull istrue compatibilityhelper haspluginobject plugin_deactivatedload getclass getname getuniqueidentifier internalplatform getdefault getbundle getuniqueidentifier getstate bundleexception plugin_startupproblems getuniqueidentifier istatus istatus pi_runtime istatus internalplatform getdefault returns a url for the given path returns code null code if the url could not be computed or created param path path relative to plug in installation location return a url for the given path or code null code public final url find i path path return find support find bundle path null ipath findsupport returns a url for the given path returns code null code if the url could not be computed or created param path file path relative to plug in installation location param override map of override substitution arguments to be used for any arg path elements the map keys correspond to the substitution arguments eg nl or os the resulting values must be of type java lang string if the map is code null code or does not contain the required substitution argument the default is used return a url for the given path or code null code public final url find i path path map override return find support find bundle path override ipath findsupport returns the plug in descriptor for this plug in runtime object return the plug in descriptor for this plug in runtime object deprecated code i plugin descriptor code was refactored in eclipse 3 0 the code get descriptor code method may only be called by plug ins which explicitly require the org eclipse core runtime compatibility plug in see the comments on link i plugin descriptor and its methods for details public final i plugin descriptor get descriptor if descriptor null return descriptor return initialize descriptor bundle get symbolic name iplugindescriptor getdescriptor iplugindescriptor iplugindescriptor getdescriptor initializedescriptor getsymbolicname returns the log for this plug in if no such log exists one is created return the log for this plug in public final i log get log return internal platform get default get log bundle ilog getlog internalplatform getdefault getlog returns the location in the local file system of the plug in state area for this plug in if the plug in state area did not exist prior to this call it is created p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings and other configuration parameters p throws illegal state exception when the system is running with no data area data none or when a data area has not been set yet return a local file system path public final i path get state location throws illegal state exception return internal platform get default get state location bundle true illegalstateexception ipath getstatelocation illegalstateexception internalplatform getdefault getstatelocation returns the preference store for this plug in p note that if an error occurs reading the preference store from disk an empty preference store is quietly created initialized with defaults and returned p p calling this method may cause the preference store to be created and initialized subclasses which reimplement the code initialize default plugin preferences code method have this opportunity to initialize preference default values just prior to processing override default values imposed externally to this plug in specified for the product or at platform start up p p after settings in the preference store are changed for example with code preferences set value code or code set to default code code save plugin preferences code should be called to store the changed values back to disk otherwise the changes will be lost on plug in shutdown p return the preference store see save plugin preferences see preferences set value string string see preferences set to default string since 2 0 public final preferences get plugin preferences if preferences null if internal platform debug preference general policy debug plugin preferences already loaded for bundle get symbolic name non nls 1 return preferences if internal platform debug preference general policy debug loading preferences for plugin bundle get symbolic name non nls 1 preferences new preference forwarder this bundle get symbolic name return preferences initializedefaultpluginpreferences setvalue settodefault savepluginpreferences savepluginpreferences setvalue settodefault getpluginpreferences internalplatform debug_preference_general getsymbolicname internalplatform debug_preference_general getsymbolicname preferenceforwarder getsymbolicname saves preferences settings for this plug in does nothing if the preference store does not need saving p plug in preferences are b not b saved automatically on plug in shutdown p see preferences store output stream string see preferences needs saving since 2 0 public final void save plugin preferences populate the preferences instvar we still might need to save them because someone else might have made changes via the os gi ap is get plugin preferences try preferences flush catch backing store exception e i status status new status i status error platform pi runtime i status error messages preferences saveproblems e internal platform get default log status outputstream needssaving savepluginpreferences osgi apis getpluginpreferences backingstoreexception istatus istatus pi_runtime istatus preferences_saveproblems internalplatform getdefault initializes the default preferences settings for this plug in p this method is called sometime after the preference store for this plug in is created default values are never stored in preference stores they must be filled in each time this method provides the opportunity to initialize the default values p p the default implementation of this method does nothing a subclass that needs to set default values for its preferences must reimplement this method default values set at a later point will override any default override settings supplied from outside the plug in product configuration or platform start up p since 2 0 deprecated this method has been refactored in the new preference mechanism to handle the case where the runtime compatibility layer does not exist the contents of this method should be moved to the method named code initialize default preferences code in a separate subclass of link org eclipse core runtime preferences abstract preference initializer this class should be contributed via the code org eclipse core runtime preferences code extension point pre lt extension point quo org eclipse core runtime preferences quo gt lt initializer class quo com example my preference initializer quo gt lt extension gt package com example public class my preference initializer extends abstract preference initializer public my preference initializer super public void initialize default preferences preferences node new default scope get node my plugin id node put key value pre protected void initialize default plugin preferences default implementation of this method spec d to do nothing initializedefaultpreferences abstractpreferenceinitializer mypreferenceinitializer mypreferenceinitializer abstractpreferenceinitializer mypreferenceinitializer initializedefaultpreferences defaultscope getnode initializedefaultpluginpreferences internal method this method is a hook for initialization of default preference values it should not be called by clients since 3 0 public final void internal initialize default plugin preferences initialize default plugin preferences internalinitializedefaultpluginpreferences initializedefaultpluginpreferences returns whether this plug in is in debug mode by default plug ins are not in debug mode a plug in can put itself into debug mode or the user can set an execution option to do so p note that the plug in s debug flag is initialized when the plug in is started the result of calling this method before the plug in has started is unspecified p return whether this plug in is in debug mode public boolean is debugging return debug isdebugging returns an input stream for the specified file the file path must be specified relative this the plug in s installation location param file path relative to plug in installation location return an input stream exception io exception if the given path cannot be found in this plug in see open stream i path boolean public final input stream open stream i path file throws io exception return find support open stream bundle file false ioexception openstream ipath inputstream openstream ipath ioexception findsupport openstream returns an input stream for the specified file the file path must be specified relative to this plug in s installation location optionally the platform searches for the correct localized version of the specified file using the users current locale and java naming convention for localized resource files locale suffix appended to the specified file extension p the caller must close the returned stream when done p param file path relative to plug in installation location param localized code true code for the localized version of the file and code false code for the file exactly as specified return an input stream exception io exception if the given path cannot be found in this plug in public final input stream open stream i path file boolean localized throws io exception return find support open stream bundle file localized ioexception inputstream openstream ipath ioexception findsupport openstream sets whether this plug in is in debug mode by default plug ins are not in debug mode a plug in can put itself into debug mode or the user can set a debug option to do so p note that the plug in s debug flag is initialized when the plug in is started the result of calling this method before the plug in has started is unspecified p param value whether or not this plug in is in debug mode public void set debugging boolean value debug value setdebugging shuts down this plug in and discards all plug in state p this method should be re implemented in subclasses that need to do something when the plug in is shut down implementors should call the inherited method to ensure that any system requirements can be met p p plug in shutdown code should be robust in particular this method should always make an effort to shut down the plug in furthermore the code should not assume that the plug in was started successfully as this method will be invoked in the event of a failure during startup p p note 1 if a plug in has been started this method will be automatically invoked by the platform when the platform is shut down p p note 2 this method is intended to perform simple termination of the plug in environment the platform may terminate invocations that do not complete in a timely fashion p b clients must never explicitly call this method b p exception core exception if this method fails to shut down this plug in deprecated in eclipse 3 0 this method has been replaced by link plugin stop bundle context context implementations of code shutdown code should be changed to override code stop bundle context context code and call code super stop context code instead of code super shutdown code the code shutdown code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in public void shutdown throws core exception if compatibility helper initialize compatibility null return throwable exception null method m try m descriptor get class get method do plugin deactivation new class 0 non nls 1 m invoke descriptor null catch security exception e exception e catch no such method exception e exception e catch illegal argument exception e exception e catch illegal access exception e exception e catch invocation target exception e exception e if exception null return string message nls bind messages plugin shutdownproblems descriptor get unique identifier i status status new status i status error platform pi runtime i status error message exception internal platform get default log status coreexception bundlecontext bundlecontext coreexception compatibilityhelper initializecompatibility getclass getmethod doplugindeactivation securityexception nosuchmethodexception illegalargumentexception illegalaccessexception invocationtargetexception plugin_shutdownproblems getuniqueidentifier istatus istatus pi_runtime istatus internalplatform getdefault starts up this plug in p this method should be overridden in subclasses that need to do something when this plug in is started implementors should call the inherited method to ensure that any system requirements can be met p p if this method throws an exception it is taken as an indication that plug in initialization has failed as a result the plug in will not be activated moreover the plug in will be marked as disabled and ineligible for activation for the duration p p plug in startup code should be robust in the event of a startup failure the plug in s code shutdown code method will be invoked automatically in an attempt to close open files etc p p note 1 this method is automatically invoked by the platform the first time any code in the plug in is executed p p note 2 this method is intended to perform simple initialization of the plug in environment the platform may terminate initializers that do not complete in a timely fashion p p note 3 the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p b clients must never explicitly call this method b p exception core exception if this plug in did not start up properly deprecated in eclipse 3 0 this method has been replaced by link plugin start bundle context context implementations of code startup code should be changed to extend code start bundle context context code and call code super start context code instead of code super startup code the code startup code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in public void startup throws core exception coreexception bundlecontext bundlecontext coreexception returns a string representation of the plug in suitable for debugging purposes only public string to string string name bundle get symbolic name return name null new long bundle get bundle id to string name tostring getsymbolicname getbundleid tostring starts up this plug in p this method should be overridden in subclasses that need to do something when this plug in is started implementors should call the inherited method at the first possible point to ensure that any system requirements can be met p p if this method throws an exception it is taken as an indication that plug in initialization has failed as a result the plug in will not be activated moreover the plug in will be marked as disabled and ineligible for activation for the duration p p plug in startup code should be robust in the event of a startup failure the plug in s code shutdown code method will be invoked automatically in an attempt to close open files etc p p note 1 this method is automatically invoked by the platform the first time any code in the plug in is executed p p note 2 this method is intended to perform simple initialization of the plug in environment the platform may terminate initializers that do not complete in a timely fashion p p note 3 the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p p note 4 the supplied bundle context represents the plug in to the os gi framework for security reasons it is strongly recommended that this object should not be divulged p b clients must never explicitly call this method b param context the bundle context for this plug in exception exception if this plug in did not start up properly since 3 0 public void start bundle context context throws exception bundle context get bundle string symbolic name bundle get symbolic name if symbolic name null string key symbolic name debug non nls 1 string value internal platform get default get option key this debug value null false value equals ignore case true non nls 1 initialize descriptor symbolic name osgi bundlecontext getbundle symbolicname getsymbolicname symbolicname symbolicname internalplatform getdefault getoption equalsignorecase initializedescriptor symbolicname deprecated marked as deprecated to suppress deprecation warnings private i plugin descriptor initialize descriptor string symbolic name if compatibility helper initialize compatibility null return null this associate a descriptor to any real bundle that uses this to start if symbolic name null return null i plugin descriptor tmp compatibility helper get plugin descriptor symbolic name runtime descriptor is never set to support dynamic re installation of compatibility if symbolic name equals platform pi runtime descriptor tmp compatibility helper set plugin tmp this compatibility helper set active tmp return tmp iplugindescriptor initializedescriptor symbolicname compatibilityhelper initializecompatibility symbolicname iplugindescriptor compatibilityhelper getplugindescriptor symbolicname symbolicname pi_runtime compatibilityhelper setplugin compatibilityhelper setactive stops this plug in p this method should be re implemented in subclasses that need to do something when the plug in is shut down implementors should call the inherited method as late as possible to ensure that any system requirements can be met p p plug in shutdown code should be robust in particular this method should always make an effort to shut down the plug in furthermore the code should not assume that the plug in was started successfully as this method will be invoked in the event of a failure during startup p p note 1 if a plug in has been automatically started this method will be automatically invoked by the platform when the platform is shut down p p note 2 this method is intended to perform simple termination of the plug in environment the platform may terminate invocations that do not complete in a timely fashion p p note 3 the supplied bundle context represents the plug in to the os gi framework for security reasons it is strongly recommended that this object should not be divulged p b clients must never explicitly call this method b param context the bundle context for this plug in exception exception if this method fails to shut down this plug in since 3 0 public void stop bundle context context throws exception sub classes to override osgi bundlecontext returns the bundle associated with this plug in return the associated bundle since 3 0 public final bundle get bundle return bundle getbundle creates a new plug in runtime object this method is called by the platform if this class is used as a code bundle activator code this method is not needed used if this plug in requires the org eclipse core runtime compatibility plug in subclasses of code plugin code must call this method first in their constructors the resultant instance is not managed by the runtime and so should be remembered by the client typically using a singleton pattern b clients must never explicitly call this method b p p note the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p since 3 0 public plugin super bundleactivator creates a new plug in runtime object for the given plug in descriptor p instances of plug in runtime classes are automatically created by the platform in the course of plug in activation b clients must never explicitly call this method b p p note the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p param descriptor the plug in descriptor see get descriptor deprecated in eclipse 3 0 this constructor has been replaced by link plugin implementations of code my plugin i plugin descriptor descriptor code should be changed to code my plugin code and call code super code instead of code super descriptor code the code my plugin i plugin descriptor descriptor code constructor is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in public plugin i plugin descriptor descriptor assert is not null descriptor assert is true compatibility helper has plugin object descriptor nls bind messages plugin deactivatedload this get class get name descriptor get unique identifier is not activated non nls 1 this descriptor descriptor on plugin start find and start the corresponding bundle bundle internal platform get default get bundle descriptor get unique identifier try if bundle get state bundle starting bundle active bundle stopping 0 bundle start catch bundle exception e string message nls bind messages plugin startupproblems descriptor get unique identifier i status status new status i status error platform pi runtime i status error message e internal platform get default log status getdescriptor myplugin iplugindescriptor myplugin myplugin iplugindescriptor iplugindescriptor isnotnull istrue compatibilityhelper haspluginobject plugin_deactivatedload getclass getname getuniqueidentifier internalplatform getdefault getbundle getuniqueidentifier getstate bundleexception plugin_startupproblems getuniqueidentifier istatus istatus pi_runtime istatus internalplatform getdefault returns a url for the given path returns code null code if the url could not be computed or created param path path relative to plug in installation location return a url for the given path or code null code public final url find i path path return find support find bundle path null ipath findsupport returns a url for the given path returns code null code if the url could not be computed or created param path file path relative to plug in installation location param override map of override substitution arguments to be used for any arg path elements the map keys correspond to the substitution arguments eg nl or os the resulting values must be of type java lang string if the map is code null code or does not contain the required substitution argument the default is used return a url for the given path or code null code public final url find i path path map override return find support find bundle path override ipath findsupport returns the plug in descriptor for this plug in runtime object return the plug in descriptor for this plug in runtime object deprecated code i plugin descriptor code was refactored in eclipse 3 0 the code get descriptor code method may only be called by plug ins which explicitly require the org eclipse core runtime compatibility plug in see the comments on link i plugin descriptor and its methods for details public final i plugin descriptor get descriptor if descriptor null return descriptor return initialize descriptor bundle get symbolic name iplugindescriptor getdescriptor iplugindescriptor iplugindescriptor getdescriptor initializedescriptor getsymbolicname returns the log for this plug in if no such log exists one is created return the log for this plug in public final i log get log return internal platform get default get log bundle ilog getlog internalplatform getdefault getlog returns the location in the local file system of the plug in state area for this plug in if the plug in state area did not exist prior to this call it is created p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings and other configuration parameters p throws illegal state exception when the system is running with no data area data none or when a data area has not been set yet return a local file system path public final i path get state location throws illegal state exception return internal platform get default get state location bundle true illegalstateexception ipath getstatelocation illegalstateexception internalplatform getdefault getstatelocation returns the preference store for this plug in p note that if an error occurs reading the preference store from disk an empty preference store is quietly created initialized with defaults and returned p p calling this method may cause the preference store to be created and initialized subclasses which reimplement the code initialize default plugin preferences code method have this opportunity to initialize preference default values just prior to processing override default values imposed externally to this plug in specified for the product or at platform start up p p after settings in the preference store are changed for example with code preferences set value code or code set to default code code save plugin preferences code should be called to store the changed values back to disk otherwise the changes will be lost on plug in shutdown p return the preference store see save plugin preferences see preferences set value string string see preferences set to default string since 2 0 public final preferences get plugin preferences if preferences null if internal platform debug preference general policy debug plugin preferences already loaded for bundle get symbolic name non nls 1 return preferences if internal platform debug preference general policy debug loading preferences for plugin bundle get symbolic name non nls 1 preferences new preference forwarder this bundle get symbolic name return preferences initializedefaultpluginpreferences setvalue settodefault savepluginpreferences savepluginpreferences setvalue settodefault getpluginpreferences internalplatform debug_preference_general getsymbolicname internalplatform debug_preference_general getsymbolicname preferenceforwarder getsymbolicname saves preferences settings for this plug in does nothing if the preference store does not need saving p plug in preferences are b not b saved automatically on plug in shutdown p see preferences store output stream string see preferences needs saving since 2 0 public final void save plugin preferences populate the preferences instvar we still might need to save them because someone else might have made changes via the os gi ap is get plugin preferences try preferences flush catch backing store exception e i status status new status i status error platform pi runtime i status error messages preferences saveproblems e internal platform get default log status outputstream needssaving savepluginpreferences osgi apis getpluginpreferences backingstoreexception istatus istatus pi_runtime istatus preferences_saveproblems internalplatform getdefault initializes the default preferences settings for this plug in p this method is called sometime after the preference store for this plug in is created default values are never stored in preference stores they must be filled in each time this method provides the opportunity to initialize the default values p p the default implementation of this method does nothing a subclass that needs to set default values for its preferences must reimplement this method default values set at a later point will override any default override settings supplied from outside the plug in product configuration or platform start up p since 2 0 deprecated this method has been refactored in the new preference mechanism to handle the case where the runtime compatibility layer does not exist the contents of this method should be moved to the method named code initialize default preferences code in a separate subclass of link org eclipse core runtime preferences abstract preference initializer this class should be contributed via the code org eclipse core runtime preferences code extension point pre lt extension point quo org eclipse core runtime preferences quo gt lt initializer class quo com example my preference initializer quo gt lt extension gt package com example public class my preference initializer extends abstract preference initializer public my preference initializer super public void initialize default preferences preferences node new default scope get node my plugin id node put key value pre protected void initialize default plugin preferences default implementation of this method spec d to do nothing initializedefaultpreferences abstractpreferenceinitializer mypreferenceinitializer mypreferenceinitializer abstractpreferenceinitializer mypreferenceinitializer initializedefaultpreferences defaultscope getnode initializedefaultpluginpreferences internal method this method is a hook for initialization of default preference values it should not be called by clients since 3 0 public final void internal initialize default plugin preferences initialize default plugin preferences internalinitializedefaultpluginpreferences initializedefaultpluginpreferences returns whether this plug in is in debug mode by default plug ins are not in debug mode a plug in can put itself into debug mode or the user can set an execution option to do so p note that the plug in s debug flag is initialized when the plug in is started the result of calling this method before the plug in has started is unspecified p return whether this plug in is in debug mode public boolean is debugging return debug isdebugging returns an input stream for the specified file the file path must be specified relative this the plug in s installation location param file path relative to plug in installation location return an input stream exception io exception if the given path cannot be found in this plug in see open stream i path boolean public final input stream open stream i path file throws io exception return find support open stream bundle file false ioexception openstream ipath inputstream openstream ipath ioexception findsupport openstream returns an input stream for the specified file the file path must be specified relative to this plug in s installation location optionally the platform searches for the correct localized version of the specified file using the users current locale and java naming convention for localized resource files locale suffix appended to the specified file extension p the caller must close the returned stream when done p param file path relative to plug in installation location param localized code true code for the localized version of the file and code false code for the file exactly as specified return an input stream exception io exception if the given path cannot be found in this plug in public final input stream open stream i path file boolean localized throws io exception return find support open stream bundle file localized ioexception inputstream openstream ipath ioexception findsupport openstream sets whether this plug in is in debug mode by default plug ins are not in debug mode a plug in can put itself into debug mode or the user can set a debug option to do so p note that the plug in s debug flag is initialized when the plug in is started the result of calling this method before the plug in has started is unspecified p param value whether or not this plug in is in debug mode public void set debugging boolean value debug value setdebugging shuts down this plug in and discards all plug in state p this method should be re implemented in subclasses that need to do something when the plug in is shut down implementors should call the inherited method to ensure that any system requirements can be met p p plug in shutdown code should be robust in particular this method should always make an effort to shut down the plug in furthermore the code should not assume that the plug in was started successfully as this method will be invoked in the event of a failure during startup p p note 1 if a plug in has been started this method will be automatically invoked by the platform when the platform is shut down p p note 2 this method is intended to perform simple termination of the plug in environment the platform may terminate invocations that do not complete in a timely fashion p b clients must never explicitly call this method b p exception core exception if this method fails to shut down this plug in deprecated in eclipse 3 0 this method has been replaced by link plugin stop bundle context context implementations of code shutdown code should be changed to override code stop bundle context context code and call code super stop context code instead of code super shutdown code the code shutdown code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in public void shutdown throws core exception if compatibility helper initialize compatibility null return throwable exception null method m try m descriptor get class get method do plugin deactivation new class 0 non nls 1 m invoke descriptor null catch security exception e exception e catch no such method exception e exception e catch illegal argument exception e exception e catch illegal access exception e exception e catch invocation target exception e exception e if exception null return string message nls bind messages plugin shutdownproblems descriptor get unique identifier i status status new status i status error platform pi runtime i status error message exception internal platform get default log status coreexception bundlecontext bundlecontext coreexception compatibilityhelper initializecompatibility getclass getmethod doplugindeactivation securityexception nosuchmethodexception illegalargumentexception illegalaccessexception invocationtargetexception plugin_shutdownproblems getuniqueidentifier istatus istatus pi_runtime istatus internalplatform getdefault starts up this plug in p this method should be overridden in subclasses that need to do something when this plug in is started implementors should call the inherited method to ensure that any system requirements can be met p p if this method throws an exception it is taken as an indication that plug in initialization has failed as a result the plug in will not be activated moreover the plug in will be marked as disabled and ineligible for activation for the duration p p plug in startup code should be robust in the event of a startup failure the plug in s code shutdown code method will be invoked automatically in an attempt to close open files etc p p note 1 this method is automatically invoked by the platform the first time any code in the plug in is executed p p note 2 this method is intended to perform simple initialization of the plug in environment the platform may terminate initializers that do not complete in a timely fashion p p note 3 the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p b clients must never explicitly call this method b p exception core exception if this plug in did not start up properly deprecated in eclipse 3 0 this method has been replaced by link plugin start bundle context context implementations of code startup code should be changed to extend code start bundle context context code and call code super start context code instead of code super startup code the code startup code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in public void startup throws core exception coreexception bundlecontext bundlecontext coreexception returns a string representation of the plug in suitable for debugging purposes only public string to string string name bundle get symbolic name return name null new long bundle get bundle id to string name tostring getsymbolicname getbundleid tostring starts up this plug in p this method should be overridden in subclasses that need to do something when this plug in is started implementors should call the inherited method at the first possible point to ensure that any system requirements can be met p p if this method throws an exception it is taken as an indication that plug in initialization has failed as a result the plug in will not be activated moreover the plug in will be marked as disabled and ineligible for activation for the duration p p plug in startup code should be robust in the event of a startup failure the plug in s code shutdown code method will be invoked automatically in an attempt to close open files etc p p note 1 this method is automatically invoked by the platform the first time any code in the plug in is executed p p note 2 this method is intended to perform simple initialization of the plug in environment the platform may terminate initializers that do not complete in a timely fashion p p note 3 the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p p note 4 the supplied bundle context represents the plug in to the os gi framework for security reasons it is strongly recommended that this object should not be divulged p b clients must never explicitly call this method b param context the bundle context for this plug in exception exception if this plug in did not start up properly since 3 0 public void start bundle context context throws exception bundle context get bundle string symbolic name bundle get symbolic name if symbolic name null string key symbolic name debug non nls 1 string value internal platform get default get option key this debug value null false value equals ignore case true non nls 1 initialize descriptor symbolic name osgi bundlecontext getbundle symbolicname getsymbolicname symbolicname symbolicname internalplatform getdefault getoption equalsignorecase initializedescriptor symbolicname deprecated marked as deprecated to suppress deprecation warnings private i plugin descriptor initialize descriptor string symbolic name if compatibility helper initialize compatibility null return null this associate a descriptor to any real bundle that uses this to start if symbolic name null return null i plugin descriptor tmp compatibility helper get plugin descriptor symbolic name runtime descriptor is never set to support dynamic re installation of compatibility if symbolic name equals platform pi runtime descriptor tmp compatibility helper set plugin tmp this compatibility helper set active tmp return tmp iplugindescriptor initializedescriptor symbolicname compatibilityhelper initializecompatibility symbolicname iplugindescriptor compatibilityhelper getplugindescriptor symbolicname symbolicname pi_runtime compatibilityhelper setplugin compatibilityhelper setactive stops this plug in p this method should be re implemented in subclasses that need to do something when the plug in is shut down implementors should call the inherited method as late as possible to ensure that any system requirements can be met p p plug in shutdown code should be robust in particular this method should always make an effort to shut down the plug in furthermore the code should not assume that the plug in was started successfully as this method will be invoked in the event of a failure during startup p p note 1 if a plug in has been automatically started this method will be automatically invoked by the platform when the platform is shut down p p note 2 this method is intended to perform simple termination of the plug in environment the platform may terminate invocations that do not complete in a timely fashion p p note 3 the supplied bundle context represents the plug in to the os gi framework for security reasons it is strongly recommended that this object should not be divulged p b clients must never explicitly call this method b param context the bundle context for this plug in exception exception if this method fails to shut down this plug in since 3 0 public void stop bundle context context throws exception sub classes to override osgi bundlecontext returns the bundle associated with this plug in return the associated bundle since 3 0 public final bundle get bundle return bundle getbundle creates a new plug in runtime object this method is called by the platform if this class is used as a code bundle activator code this method is not needed used if this plug in requires the org eclipse core runtime compatibility plug in subclasses of code plugin code must call this method first in their constructors the resultant instance is not managed by the runtime and so should be remembered by the client typically using a singleton pattern b clients must never explicitly call this method b p p note the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p since 3 0 public plugin super bundleactivator creates a new plug in runtime object for the given plug in descriptor p instances of plug in runtime classes are automatically created by the platform in the course of plug in activation b clients must never explicitly call this method b p p note the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p param descriptor the plug in descriptor see get descriptor deprecated in eclipse 3 0 this constructor has been replaced by link plugin implementations of code my plugin i plugin descriptor descriptor code should be changed to code my plugin code and call code super code instead of code super descriptor code the code my plugin i plugin descriptor descriptor code constructor is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in public plugin i plugin descriptor descriptor assert is not null descriptor assert is true compatibility helper has plugin object descriptor nls bind messages plugin deactivatedload this get class get name descriptor get unique identifier is not activated non nls 1 this descriptor descriptor on plugin start find and start the corresponding bundle bundle internal platform get default get bundle descriptor get unique identifier try if bundle get state bundle starting bundle active bundle stopping 0 bundle start catch bundle exception e string message nls bind messages plugin startupproblems descriptor get unique identifier i status status new status i status error platform pi runtime i status error message e internal platform get default log status getdescriptor myplugin iplugindescriptor myplugin myplugin iplugindescriptor iplugindescriptor isnotnull istrue compatibilityhelper haspluginobject plugin_deactivatedload getclass getname getuniqueidentifier internalplatform getdefault getbundle getuniqueidentifier getstate bundleexception plugin_startupproblems getuniqueidentifier istatus istatus pi_runtime istatus internalplatform getdefault returns a url for the given path returns code null code if the url could not be computed or created param path path relative to plug in installation location return a url for the given path or code null code public final url find i path path return find support find bundle path null ipath findsupport returns a url for the given path returns code null code if the url could not be computed or created param path file path relative to plug in installation location param override map of override substitution arguments to be used for any arg path elements the map keys correspond to the substitution arguments eg nl or os the resulting values must be of type java lang string if the map is code null code or does not contain the required substitution argument the default is used return a url for the given path or code null code public final url find i path path map override return find support find bundle path override ipath findsupport returns the plug in descriptor for this plug in runtime object return the plug in descriptor for this plug in runtime object deprecated code i plugin descriptor code was refactored in eclipse 3 0 the code get descriptor code method may only be called by plug ins which explicitly require the org eclipse core runtime compatibility plug in see the comments on link i plugin descriptor and its methods for details public final i plugin descriptor get descriptor if descriptor null return descriptor return initialize descriptor bundle get symbolic name iplugindescriptor getdescriptor iplugindescriptor iplugindescriptor getdescriptor initializedescriptor getsymbolicname returns the log for this plug in if no such log exists one is created return the log for this plug in public final i log get log return internal platform get default get log bundle ilog getlog internalplatform getdefault getlog returns the location in the local file system of the plug in state area for this plug in if the plug in state area did not exist prior to this call it is created p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings and other configuration parameters p throws illegal state exception when the system is running with no data area data none or when a data area has not been set yet return a local file system path public final i path get state location throws illegal state exception return internal platform get default get state location bundle true illegalstateexception ipath getstatelocation illegalstateexception internalplatform getdefault getstatelocation returns the preference store for this plug in p note that if an error occurs reading the preference store from disk an empty preference store is quietly created initialized with defaults and returned p p calling this method may cause the preference store to be created and initialized subclasses which reimplement the code initialize default plugin preferences code method have this opportunity to initialize preference default values just prior to processing override default values imposed externally to this plug in specified for the product or at platform start up p p after settings in the preference store are changed for example with code preferences set value code or code set to default code code save plugin preferences code should be called to store the changed values back to disk otherwise the changes will be lost on plug in shutdown p return the preference store see save plugin preferences see preferences set value string string see preferences set to default string since 2 0 public final preferences get plugin preferences if preferences null if internal platform debug preference general policy debug plugin preferences already loaded for bundle get symbolic name non nls 1 return preferences if internal platform debug preference general policy debug loading preferences for plugin bundle get symbolic name non nls 1 preferences new preference forwarder this bundle get symbolic name return preferences initializedefaultpluginpreferences setvalue settodefault savepluginpreferences savepluginpreferences setvalue settodefault getpluginpreferences internalplatform debug_preference_general getsymbolicname internalplatform debug_preference_general getsymbolicname preferenceforwarder getsymbolicname saves preferences settings for this plug in does nothing if the preference store does not need saving p plug in preferences are b not b saved automatically on plug in shutdown p see preferences store output stream string see preferences needs saving since 2 0 public final void save plugin preferences populate the preferences instvar we still might need to save them because someone else might have made changes via the os gi ap is get plugin preferences try preferences flush catch backing store exception e i status status new status i status error platform pi runtime i status error messages preferences saveproblems e internal platform get default log status outputstream needssaving savepluginpreferences osgi apis getpluginpreferences backingstoreexception istatus istatus pi_runtime istatus preferences_saveproblems internalplatform getdefault initializes the default preferences settings for this plug in p this method is called sometime after the preference store for this plug in is created default values are never stored in preference stores they must be filled in each time this method provides the opportunity to initialize the default values p p the default implementation of this method does nothing a subclass that needs to set default values for its preferences must reimplement this method default values set at a later point will override any default override settings supplied from outside the plug in product configuration or platform start up p since 2 0 deprecated this method has been refactored in the new preference mechanism to handle the case where the runtime compatibility layer does not exist the contents of this method should be moved to the method named code initialize default preferences code in a separate subclass of link org eclipse core runtime preferences abstract preference initializer this class should be contributed via the code org eclipse core runtime preferences code extension point pre lt extension point quo org eclipse core runtime preferences quo gt lt initializer class quo com example my preference initializer quo gt lt extension gt package com example public class my preference initializer extends abstract preference initializer public my preference initializer super public void initialize default preferences preferences node new default scope get node my plugin id node put key value pre protected void initialize default plugin preferences default implementation of this method spec d to do nothing initializedefaultpreferences abstractpreferenceinitializer mypreferenceinitializer mypreferenceinitializer abstractpreferenceinitializer mypreferenceinitializer initializedefaultpreferences defaultscope getnode initializedefaultpluginpreferences internal method this method is a hook for initialization of default preference values it should not be called by clients since 3 0 public final void internal initialize default plugin preferences initialize default plugin preferences internalinitializedefaultpluginpreferences initializedefaultpluginpreferences returns whether this plug in is in debug mode by default plug ins are not in debug mode a plug in can put itself into debug mode or the user can set an execution option to do so p note that the plug in s debug flag is initialized when the plug in is started the result of calling this method before the plug in has started is unspecified p return whether this plug in is in debug mode public boolean is debugging return debug isdebugging returns an input stream for the specified file the file path must be specified relative this the plug in s installation location param file path relative to plug in installation location return an input stream exception io exception if the given path cannot be found in this plug in see open stream i path boolean public final input stream open stream i path file throws io exception return find support open stream bundle file false ioexception openstream ipath inputstream openstream ipath ioexception findsupport openstream returns an input stream for the specified file the file path must be specified relative to this plug in s installation location optionally the platform searches for the correct localized version of the specified file using the users current locale and java naming convention for localized resource files locale suffix appended to the specified file extension p the caller must close the returned stream when done p param file path relative to plug in installation location param localized code true code for the localized version of the file and code false code for the file exactly as specified return an input stream exception io exception if the given path cannot be found in this plug in public final input stream open stream i path file boolean localized throws io exception return find support open stream bundle file localized ioexception inputstream openstream ipath ioexception findsupport openstream sets whether this plug in is in debug mode by default plug ins are not in debug mode a plug in can put itself into debug mode or the user can set a debug option to do so p note that the plug in s debug flag is initialized when the plug in is started the result of calling this method before the plug in has started is unspecified p param value whether or not this plug in is in debug mode public void set debugging boolean value debug value setdebugging shuts down this plug in and discards all plug in state p this method should be re implemented in subclasses that need to do something when the plug in is shut down implementors should call the inherited method to ensure that any system requirements can be met p p plug in shutdown code should be robust in particular this method should always make an effort to shut down the plug in furthermore the code should not assume that the plug in was started successfully as this method will be invoked in the event of a failure during startup p p note 1 if a plug in has been started this method will be automatically invoked by the platform when the platform is shut down p p note 2 this method is intended to perform simple termination of the plug in environment the platform may terminate invocations that do not complete in a timely fashion p b clients must never explicitly call this method b p exception core exception if this method fails to shut down this plug in deprecated in eclipse 3 0 this method has been replaced by link plugin stop bundle context context implementations of code shutdown code should be changed to override code stop bundle context context code and call code super stop context code instead of code super shutdown code the code shutdown code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in public void shutdown throws core exception if compatibility helper initialize compatibility null return throwable exception null method m try m descriptor get class get method do plugin deactivation new class 0 non nls 1 m invoke descriptor null catch security exception e exception e catch no such method exception e exception e catch illegal argument exception e exception e catch illegal access exception e exception e catch invocation target exception e exception e if exception null return string message nls bind messages plugin shutdownproblems descriptor get unique identifier i status status new status i status error platform pi runtime i status error message exception internal platform get default log status coreexception bundlecontext bundlecontext coreexception compatibilityhelper initializecompatibility getclass getmethod doplugindeactivation securityexception nosuchmethodexception illegalargumentexception illegalaccessexception invocationtargetexception plugin_shutdownproblems getuniqueidentifier istatus istatus pi_runtime istatus internalplatform getdefault starts up this plug in p this method should be overridden in subclasses that need to do something when this plug in is started implementors should call the inherited method to ensure that any system requirements can be met p p if this method throws an exception it is taken as an indication that plug in initialization has failed as a result the plug in will not be activated moreover the plug in will be marked as disabled and ineligible for activation for the duration p p plug in startup code should be robust in the event of a startup failure the plug in s code shutdown code method will be invoked automatically in an attempt to close open files etc p p note 1 this method is automatically invoked by the platform the first time any code in the plug in is executed p p note 2 this method is intended to perform simple initialization of the plug in environment the platform may terminate initializers that do not complete in a timely fashion p p note 3 the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p b clients must never explicitly call this method b p exception core exception if this plug in did not start up properly deprecated in eclipse 3 0 this method has been replaced by link plugin start bundle context context implementations of code startup code should be changed to extend code start bundle context context code and call code super start context code instead of code super startup code the code startup code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in public void startup throws core exception coreexception bundlecontext bundlecontext coreexception returns a string representation of the plug in suitable for debugging purposes only public string to string string name bundle get symbolic name return name null new long bundle get bundle id to string name tostring getsymbolicname getbundleid tostring starts up this plug in p this method should be overridden in subclasses that need to do something when this plug in is started implementors should call the inherited method at the first possible point to ensure that any system requirements can be met p p if this method throws an exception it is taken as an indication that plug in initialization has failed as a result the plug in will not be activated moreover the plug in will be marked as disabled and ineligible for activation for the duration p p plug in startup code should be robust in the event of a startup failure the plug in s code shutdown code method will be invoked automatically in an attempt to close open files etc p p note 1 this method is automatically invoked by the platform the first time any code in the plug in is executed p p note 2 this method is intended to perform simple initialization of the plug in environment the platform may terminate initializers that do not complete in a timely fashion p p note 3 the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p p note 4 the supplied bundle context represents the plug in to the os gi framework for security reasons it is strongly recommended that this object should not be divulged p b clients must never explicitly call this method b param context the bundle context for this plug in exception exception if this plug in did not start up properly since 3 0 public void start bundle context context throws exception bundle context get bundle string symbolic name bundle get symbolic name if symbolic name null string key symbolic name debug non nls 1 string value internal platform get default get option key this debug value null false value equals ignore case true non nls 1 initialize descriptor symbolic name osgi bundlecontext getbundle symbolicname getsymbolicname symbolicname symbolicname internalplatform getdefault getoption equalsignorecase initializedescriptor symbolicname deprecated marked as deprecated to suppress deprecation warnings private i plugin descriptor initialize descriptor string symbolic name if compatibility helper initialize compatibility null return null this associate a descriptor to any real bundle that uses this to start if symbolic name null return null i plugin descriptor tmp compatibility helper get plugin descriptor symbolic name runtime descriptor is never set to support dynamic re installation of compatibility if symbolic name equals platform pi runtime descriptor tmp compatibility helper set plugin tmp this compatibility helper set active tmp return tmp iplugindescriptor initializedescriptor symbolicname compatibilityhelper initializecompatibility symbolicname iplugindescriptor compatibilityhelper getplugindescriptor symbolicname symbolicname pi_runtime compatibilityhelper setplugin compatibilityhelper setactive stops this plug in p this method should be re implemented in subclasses that need to do something when the plug in is shut down implementors should call the inherited method as late as possible to ensure that any system requirements can be met p p plug in shutdown code should be robust in particular this method should always make an effort to shut down the plug in furthermore the code should not assume that the plug in was started successfully as this method will be invoked in the event of a failure during startup p p note 1 if a plug in has been automatically started this method will be automatically invoked by the platform when the platform is shut down p p note 2 this method is intended to perform simple termination of the plug in environment the platform may terminate invocations that do not complete in a timely fashion p p note 3 the supplied bundle context represents the plug in to the os gi framework for security reasons it is strongly recommended that this object should not be divulged p b clients must never explicitly call this method b param context the bundle context for this plug in exception exception if this method fails to shut down this plug in since 3 0 public void stop bundle context context throws exception sub classes to override osgi bundlecontext returns the bundle associated with this plug in return the associated bundle since 3 0 public final bundle get bundle return bundle getbundle creates a new plug in runtime object this method is called by the platform if this class is used as a code bundle activator code this method is not needed used if this plug in requires the org eclipse core runtime compatibility plug in subclasses of code plugin code must call this method first in their constructors the resultant instance is not managed by the runtime and so should be remembered by the client typically using a singleton pattern b clients must never explicitly call this method b p p note the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p since 3 0 public plugin super bundleactivator creates a new plug in runtime object for the given plug in descriptor p instances of plug in runtime classes are automatically created by the platform in the course of plug in activation b clients must never explicitly call this method b p p note the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p param descriptor the plug in descriptor see get descriptor deprecated in eclipse 3 0 this constructor has been replaced by link plugin implementations of code my plugin i plugin descriptor descriptor code should be changed to code my plugin code and call code super code instead of code super descriptor code the code my plugin i plugin descriptor descriptor code constructor is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in public plugin i plugin descriptor descriptor assert is not null descriptor assert is true compatibility helper has plugin object descriptor nls bind messages plugin deactivatedload this get class get name descriptor get unique identifier is not activated non nls 1 this descriptor descriptor on plugin start find and start the corresponding bundle bundle internal platform get default get bundle descriptor get unique identifier try if bundle get state bundle starting bundle active bundle stopping 0 bundle start catch bundle exception e string message nls bind messages plugin startupproblems descriptor get unique identifier i status status new status i status error platform pi runtime i status error message e internal platform get default log status getdescriptor myplugin iplugindescriptor myplugin myplugin iplugindescriptor iplugindescriptor isnotnull istrue compatibilityhelper haspluginobject plugin_deactivatedload getclass getname getuniqueidentifier internalplatform getdefault getbundle getuniqueidentifier getstate bundleexception plugin_startupproblems getuniqueidentifier istatus istatus pi_runtime istatus internalplatform getdefault returns a url for the given path returns code null code if the url could not be computed or created param path path relative to plug in installation location return a url for the given path or code null code public final url find i path path return find support find bundle path null ipath findsupport returns a url for the given path returns code null code if the url could not be computed or created param path file path relative to plug in installation location param override map of override substitution arguments to be used for any arg path elements the map keys correspond to the substitution arguments eg nl or os the resulting values must be of type java lang string if the map is code null code or does not contain the required substitution argument the default is used return a url for the given path or code null code public final url find i path path map override return find support find bundle path override ipath findsupport returns the plug in descriptor for this plug in runtime object return the plug in descriptor for this plug in runtime object deprecated code i plugin descriptor code was refactored in eclipse 3 0 the code get descriptor code method may only be called by plug ins which explicitly require the org eclipse core runtime compatibility plug in see the comments on link i plugin descriptor and its methods for details public final i plugin descriptor get descriptor if descriptor null return descriptor return initialize descriptor bundle get symbolic name iplugindescriptor getdescriptor iplugindescriptor iplugindescriptor getdescriptor initializedescriptor getsymbolicname returns the log for this plug in if no such log exists one is created return the log for this plug in public final i log get log return internal platform get default get log bundle ilog getlog internalplatform getdefault getlog returns the location in the local file system of the plug in state area for this plug in if the plug in state area did not exist prior to this call it is created p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings and other configuration parameters p throws illegal state exception when the system is running with no data area data none or when a data area has not been set yet return a local file system path public final i path get state location throws illegal state exception return internal platform get default get state location bundle true illegalstateexception ipath getstatelocation illegalstateexception internalplatform getdefault getstatelocation returns the preference store for this plug in p note that if an error occurs reading the preference store from disk an empty preference store is quietly created initialized with defaults and returned p p calling this method may cause the preference store to be created and initialized subclasses which reimplement the code initialize default plugin preferences code method have this opportunity to initialize preference default values just prior to processing override default values imposed externally to this plug in specified for the product or at platform start up p p after settings in the preference store are changed for example with code preferences set value code or code set to default code code save plugin preferences code should be called to store the changed values back to disk otherwise the changes will be lost on plug in shutdown p return the preference store see save plugin preferences see preferences set value string string see preferences set to default string since 2 0 public final preferences get plugin preferences if preferences null if internal platform debug preference general policy debug plugin preferences already loaded for bundle get symbolic name non nls 1 return preferences if internal platform debug preference general policy debug loading preferences for plugin bundle get symbolic name non nls 1 preferences new preference forwarder this bundle get symbolic name return preferences initializedefaultpluginpreferences setvalue settodefault savepluginpreferences savepluginpreferences setvalue settodefault getpluginpreferences internalplatform debug_preference_general getsymbolicname internalplatform debug_preference_general getsymbolicname preferenceforwarder getsymbolicname saves preferences settings for this plug in does nothing if the preference store does not need saving p plug in preferences are b not b saved automatically on plug in shutdown p see preferences store output stream string see preferences needs saving since 2 0 public final void save plugin preferences populate the preferences instvar we still might need to save them because someone else might have made changes via the os gi ap is get plugin preferences try preferences flush catch backing store exception e i status status new status i status error platform pi runtime i status error messages preferences saveproblems e internal platform get default log status outputstream needssaving savepluginpreferences osgi apis getpluginpreferences backingstoreexception istatus istatus pi_runtime istatus preferences_saveproblems internalplatform getdefault initializes the default preferences settings for this plug in p this method is called sometime after the preference store for this plug in is created default values are never stored in preference stores they must be filled in each time this method provides the opportunity to initialize the default values p p the default implementation of this method does nothing a subclass that needs to set default values for its preferences must reimplement this method default values set at a later point will override any default override settings supplied from outside the plug in product configuration or platform start up p since 2 0 deprecated this method has been refactored in the new preference mechanism to handle the case where the runtime compatibility layer does not exist the contents of this method should be moved to the method named code initialize default preferences code in a separate subclass of link org eclipse core runtime preferences abstract preference initializer this class should be contributed via the code org eclipse core runtime preferences code extension point pre lt extension point quo org eclipse core runtime preferences quo gt lt initializer class quo com example my preference initializer quo gt lt extension gt package com example public class my preference initializer extends abstract preference initializer public my preference initializer super public void initialize default preferences preferences node new default scope get node my plugin id node put key value pre protected void initialize default plugin preferences default implementation of this method spec d to do nothing initializedefaultpreferences abstractpreferenceinitializer mypreferenceinitializer mypreferenceinitializer abstractpreferenceinitializer mypreferenceinitializer initializedefaultpreferences defaultscope getnode initializedefaultpluginpreferences internal method this method is a hook for initialization of default preference values it should not be called by clients since 3 0 public final void internal initialize default plugin preferences initialize default plugin preferences internalinitializedefaultpluginpreferences initializedefaultpluginpreferences returns whether this plug in is in debug mode by default plug ins are not in debug mode a plug in can put itself into debug mode or the user can set an execution option to do so p note that the plug in s debug flag is initialized when the plug in is started the result of calling this method before the plug in has started is unspecified p return whether this plug in is in debug mode public boolean is debugging return debug isdebugging returns an input stream for the specified file the file path must be specified relative this the plug in s installation location param file path relative to plug in installation location return an input stream exception io exception if the given path cannot be found in this plug in see open stream i path boolean public final input stream open stream i path file throws io exception return find support open stream bundle file false ioexception openstream ipath inputstream openstream ipath ioexception findsupport openstream returns an input stream for the specified file the file path must be specified relative to this plug in s installation location optionally the platform searches for the correct localized version of the specified file using the users current locale and java naming convention for localized resource files locale suffix appended to the specified file extension p the caller must close the returned stream when done p param file path relative to plug in installation location param localized code true code for the localized version of the file and code false code for the file exactly as specified return an input stream exception io exception if the given path cannot be found in this plug in public final input stream open stream i path file boolean localized throws io exception return find support open stream bundle file localized ioexception inputstream openstream ipath ioexception findsupport openstream sets whether this plug in is in debug mode by default plug ins are not in debug mode a plug in can put itself into debug mode or the user can set a debug option to do so p note that the plug in s debug flag is initialized when the plug in is started the result of calling this method before the plug in has started is unspecified p param value whether or not this plug in is in debug mode public void set debugging boolean value debug value setdebugging shuts down this plug in and discards all plug in state p this method should be re implemented in subclasses that need to do something when the plug in is shut down implementors should call the inherited method to ensure that any system requirements can be met p p plug in shutdown code should be robust in particular this method should always make an effort to shut down the plug in furthermore the code should not assume that the plug in was started successfully as this method will be invoked in the event of a failure during startup p p note 1 if a plug in has been started this method will be automatically invoked by the platform when the platform is shut down p p note 2 this method is intended to perform simple termination of the plug in environment the platform may terminate invocations that do not complete in a timely fashion p b clients must never explicitly call this method b p exception core exception if this method fails to shut down this plug in deprecated in eclipse 3 0 this method has been replaced by link plugin stop bundle context context implementations of code shutdown code should be changed to override code stop bundle context context code and call code super stop context code instead of code super shutdown code the code shutdown code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in public void shutdown throws core exception if compatibility helper initialize compatibility null return throwable exception null method m try m descriptor get class get method do plugin deactivation new class 0 non nls 1 m invoke descriptor null catch security exception e exception e catch no such method exception e exception e catch illegal argument exception e exception e catch illegal access exception e exception e catch invocation target exception e exception e if exception null return string message nls bind messages plugin shutdownproblems descriptor get unique identifier i status status new status i status error platform pi runtime i status error message exception internal platform get default log status coreexception bundlecontext bundlecontext coreexception compatibilityhelper initializecompatibility getclass getmethod doplugindeactivation securityexception nosuchmethodexception illegalargumentexception illegalaccessexception invocationtargetexception plugin_shutdownproblems getuniqueidentifier istatus istatus pi_runtime istatus internalplatform getdefault starts up this plug in p this method should be overridden in subclasses that need to do something when this plug in is started implementors should call the inherited method to ensure that any system requirements can be met p p if this method throws an exception it is taken as an indication that plug in initialization has failed as a result the plug in will not be activated moreover the plug in will be marked as disabled and ineligible for activation for the duration p p plug in startup code should be robust in the event of a startup failure the plug in s code shutdown code method will be invoked automatically in an attempt to close open files etc p p note 1 this method is automatically invoked by the platform the first time any code in the plug in is executed p p note 2 this method is intended to perform simple initialization of the plug in environment the platform may terminate initializers that do not complete in a timely fashion p p note 3 the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p b clients must never explicitly call this method b p exception core exception if this plug in did not start up properly deprecated in eclipse 3 0 this method has been replaced by link plugin start bundle context context implementations of code startup code should be changed to extend code start bundle context context code and call code super start context code instead of code super startup code the code startup code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in public void startup throws core exception coreexception bundlecontext bundlecontext coreexception returns a string representation of the plug in suitable for debugging purposes only public string to string string name bundle get symbolic name return name null new long bundle get bundle id to string name tostring getsymbolicname getbundleid tostring starts up this plug in p this method should be overridden in subclasses that need to do something when this plug in is started implementors should call the inherited method at the first possible point to ensure that any system requirements can be met p p if this method throws an exception it is taken as an indication that plug in initialization has failed as a result the plug in will not be activated moreover the plug in will be marked as disabled and ineligible for activation for the duration p p plug in startup code should be robust in the event of a startup failure the plug in s code shutdown code method will be invoked automatically in an attempt to close open files etc p p note 1 this method is automatically invoked by the platform the first time any code in the plug in is executed p p note 2 this method is intended to perform simple initialization of the plug in environment the platform may terminate initializers that do not complete in a timely fashion p p note 3 the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p p note 4 the supplied bundle context represents the plug in to the os gi framework for security reasons it is strongly recommended that this object should not be divulged p b clients must never explicitly call this method b param context the bundle context for this plug in exception exception if this plug in did not start up properly since 3 0 public void start bundle context context throws exception bundle context get bundle string symbolic name bundle get symbolic name if symbolic name null string key symbolic name debug non nls 1 string value internal platform get default get option key this debug value null false value equals ignore case true non nls 1 initialize descriptor symbolic name osgi bundlecontext getbundle symbolicname getsymbolicname symbolicname symbolicname internalplatform getdefault getoption equalsignorecase initializedescriptor symbolicname deprecated marked as deprecated to suppress deprecation warnings private i plugin descriptor initialize descriptor string symbolic name if compatibility helper initialize compatibility null return null this associate a descriptor to any real bundle that uses this to start if symbolic name null return null i plugin descriptor tmp compatibility helper get plugin descriptor symbolic name runtime descriptor is never set to support dynamic re installation of compatibility if symbolic name equals platform pi runtime descriptor tmp compatibility helper set plugin tmp this compatibility helper set active tmp return tmp iplugindescriptor initializedescriptor symbolicname compatibilityhelper initializecompatibility symbolicname iplugindescriptor compatibilityhelper getplugindescriptor symbolicname symbolicname pi_runtime compatibilityhelper setplugin compatibilityhelper setactive stops this plug in p this method should be re implemented in subclasses that need to do something when the plug in is shut down implementors should call the inherited method as late as possible to ensure that any system requirements can be met p p plug in shutdown code should be robust in particular this method should always make an effort to shut down the plug in furthermore the code should not assume that the plug in was started successfully as this method will be invoked in the event of a failure during startup p p note 1 if a plug in has been automatically started this method will be automatically invoked by the platform when the platform is shut down p p note 2 this method is intended to perform simple termination of the plug in environment the platform may terminate invocations that do not complete in a timely fashion p p note 3 the supplied bundle context represents the plug in to the os gi framework for security reasons it is strongly recommended that this object should not be divulged p b clients must never explicitly call this method b param context the bundle context for this plug in exception exception if this method fails to shut down this plug in since 3 0 public void stop bundle context context throws exception sub classes to override osgi bundlecontext returns the bundle associated with this plug in return the associated bundle since 3 0 public final bundle get bundle return bundle getbundle creates a new plug in runtime object this method is called by the platform if this class is used as a code bundle activator code this method is not needed used if this plug in requires the org eclipse core runtime compatibility plug in subclasses of code plugin code must call this method first in their constructors the resultant instance is not managed by the runtime and so should be remembered by the client typically using a singleton pattern b clients must never explicitly call this method b p p note the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p since 3 0 public plugin super bundleactivator creates a new plug in runtime object for the given plug in descriptor p instances of plug in runtime classes are automatically created by the platform in the course of plug in activation b clients must never explicitly call this method b p p note the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p param descriptor the plug in descriptor see get descriptor deprecated in eclipse 3 0 this constructor has been replaced by link plugin implementations of code my plugin i plugin descriptor descriptor code should be changed to code my plugin code and call code super code instead of code super descriptor code the code my plugin i plugin descriptor descriptor code constructor is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in public plugin i plugin descriptor descriptor assert is not null descriptor assert is true compatibility helper has plugin object descriptor nls bind messages plugin deactivatedload this get class get name descriptor get unique identifier is not activated non nls 1 this descriptor descriptor on plugin start find and start the corresponding bundle bundle internal platform get default get bundle descriptor get unique identifier try if bundle get state bundle starting bundle active bundle stopping 0 bundle start catch bundle exception e string message nls bind messages plugin startupproblems descriptor get unique identifier i status status new status i status error platform pi runtime i status error message e internal platform get default log status getdescriptor myplugin iplugindescriptor myplugin myplugin iplugindescriptor iplugindescriptor isnotnull istrue compatibilityhelper haspluginobject plugin_deactivatedload getclass getname getuniqueidentifier internalplatform getdefault getbundle getuniqueidentifier getstate bundleexception plugin_startupproblems getuniqueidentifier istatus istatus pi_runtime istatus internalplatform getdefault returns a url for the given path returns code null code if the url could not be computed or created param path path relative to plug in installation location return a url for the given path or code null code public final url find i path path return find support find bundle path null ipath findsupport returns a url for the given path returns code null code if the url could not be computed or created param path file path relative to plug in installation location param override map of override substitution arguments to be used for any arg path elements the map keys correspond to the substitution arguments eg nl or os the resulting values must be of type java lang string if the map is code null code or does not contain the required substitution argument the default is used return a url for the given path or code null code public final url find i path path map override return find support find bundle path override ipath findsupport returns the plug in descriptor for this plug in runtime object return the plug in descriptor for this plug in runtime object deprecated code i plugin descriptor code was refactored in eclipse 3 0 the code get descriptor code method may only be called by plug ins which explicitly require the org eclipse core runtime compatibility plug in see the comments on link i plugin descriptor and its methods for details public final i plugin descriptor get descriptor if descriptor null return descriptor return initialize descriptor bundle get symbolic name iplugindescriptor getdescriptor iplugindescriptor iplugindescriptor getdescriptor initializedescriptor getsymbolicname returns the log for this plug in if no such log exists one is created return the log for this plug in public final i log get log return internal platform get default get log bundle ilog getlog internalplatform getdefault getlog returns the location in the local file system of the plug in state area for this plug in if the plug in state area did not exist prior to this call it is created p the plug in state area is a file directory within the platform s metadata area where a plug in is free to create files the content and structure of this area is defined by the plug in and the particular plug in is solely responsible for any files it puts there it is recommended for plug in preference settings and other configuration parameters p throws illegal state exception when the system is running with no data area data none or when a data area has not been set yet return a local file system path public final i path get state location throws illegal state exception return internal platform get default get state location bundle true illegalstateexception ipath getstatelocation illegalstateexception internalplatform getdefault getstatelocation returns the preference store for this plug in p note that if an error occurs reading the preference store from disk an empty preference store is quietly created initialized with defaults and returned p p calling this method may cause the preference store to be created and initialized subclasses which reimplement the code initialize default plugin preferences code method have this opportunity to initialize preference default values just prior to processing override default values imposed externally to this plug in specified for the product or at platform start up p p after settings in the preference store are changed for example with code preferences set value code or code set to default code code save plugin preferences code should be called to store the changed values back to disk otherwise the changes will be lost on plug in shutdown p return the preference store see save plugin preferences see preferences set value string string see preferences set to default string since 2 0 public final preferences get plugin preferences if preferences null if internal platform debug preference general policy debug plugin preferences already loaded for bundle get symbolic name non nls 1 return preferences if internal platform debug preference general policy debug loading preferences for plugin bundle get symbolic name non nls 1 preferences new preference forwarder this bundle get symbolic name return preferences initializedefaultpluginpreferences setvalue settodefault savepluginpreferences savepluginpreferences setvalue settodefault getpluginpreferences internalplatform debug_preference_general getsymbolicname internalplatform debug_preference_general getsymbolicname preferenceforwarder getsymbolicname saves preferences settings for this plug in does nothing if the preference store does not need saving p plug in preferences are b not b saved automatically on plug in shutdown p see preferences store output stream string see preferences needs saving since 2 0 public final void save plugin preferences populate the preferences instvar we still might need to save them because someone else might have made changes via the os gi ap is get plugin preferences try preferences flush catch backing store exception e i status status new status i status error platform pi runtime i status error messages preferences saveproblems e internal platform get default log status outputstream needssaving savepluginpreferences osgi apis getpluginpreferences backingstoreexception istatus istatus pi_runtime istatus preferences_saveproblems internalplatform getdefault initializes the default preferences settings for this plug in p this method is called sometime after the preference store for this plug in is created default values are never stored in preference stores they must be filled in each time this method provides the opportunity to initialize the default values p p the default implementation of this method does nothing a subclass that needs to set default values for its preferences must reimplement this method default values set at a later point will override any default override settings supplied from outside the plug in product configuration or platform start up p since 2 0 deprecated this method has been refactored in the new preference mechanism to handle the case where the runtime compatibility layer does not exist the contents of this method should be moved to the method named code initialize default preferences code in a separate subclass of link org eclipse core runtime preferences abstract preference initializer this class should be contributed via the code org eclipse core runtime preferences code extension point pre lt extension point quo org eclipse core runtime preferences quo gt lt initializer class quo com example my preference initializer quo gt lt extension gt package com example public class my preference initializer extends abstract preference initializer public my preference initializer super public void initialize default preferences preferences node new default scope get node my plugin id node put key value pre protected void initialize default plugin preferences default implementation of this method spec d to do nothing initializedefaultpreferences abstractpreferenceinitializer mypreferenceinitializer mypreferenceinitializer abstractpreferenceinitializer mypreferenceinitializer initializedefaultpreferences defaultscope getnode initializedefaultpluginpreferences internal method this method is a hook for initialization of default preference values it should not be called by clients since 3 0 public final void internal initialize default plugin preferences initialize default plugin preferences internalinitializedefaultpluginpreferences initializedefaultpluginpreferences returns whether this plug in is in debug mode by default plug ins are not in debug mode a plug in can put itself into debug mode or the user can set an execution option to do so p note that the plug in s debug flag is initialized when the plug in is started the result of calling this method before the plug in has started is unspecified p return whether this plug in is in debug mode public boolean is debugging return debug isdebugging returns an input stream for the specified file the file path must be specified relative this the plug in s installation location param file path relative to plug in installation location return an input stream exception io exception if the given path cannot be found in this plug in see open stream i path boolean public final input stream open stream i path file throws io exception return find support open stream bundle file false ioexception openstream ipath inputstream openstream ipath ioexception findsupport openstream returns an input stream for the specified file the file path must be specified relative to this plug in s installation location optionally the platform searches for the correct localized version of the specified file using the users current locale and java naming convention for localized resource files locale suffix appended to the specified file extension p the caller must close the returned stream when done p param file path relative to plug in installation location param localized code true code for the localized version of the file and code false code for the file exactly as specified return an input stream exception io exception if the given path cannot be found in this plug in public final input stream open stream i path file boolean localized throws io exception return find support open stream bundle file localized ioexception inputstream openstream ipath ioexception findsupport openstream sets whether this plug in is in debug mode by default plug ins are not in debug mode a plug in can put itself into debug mode or the user can set a debug option to do so p note that the plug in s debug flag is initialized when the plug in is started the result of calling this method before the plug in has started is unspecified p param value whether or not this plug in is in debug mode public void set debugging boolean value debug value setdebugging shuts down this plug in and discards all plug in state p this method should be re implemented in subclasses that need to do something when the plug in is shut down implementors should call the inherited method to ensure that any system requirements can be met p p plug in shutdown code should be robust in particular this method should always make an effort to shut down the plug in furthermore the code should not assume that the plug in was started successfully as this method will be invoked in the event of a failure during startup p p note 1 if a plug in has been started this method will be automatically invoked by the platform when the platform is shut down p p note 2 this method is intended to perform simple termination of the plug in environment the platform may terminate invocations that do not complete in a timely fashion p b clients must never explicitly call this method b p exception core exception if this method fails to shut down this plug in deprecated in eclipse 3 0 this method has been replaced by link plugin stop bundle context context implementations of code shutdown code should be changed to override code stop bundle context context code and call code super stop context code instead of code super shutdown code the code shutdown code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in public void shutdown throws core exception if compatibility helper initialize compatibility null return throwable exception null method m try m descriptor get class get method do plugin deactivation new class 0 non nls 1 m invoke descriptor null catch security exception e exception e catch no such method exception e exception e catch illegal argument exception e exception e catch illegal access exception e exception e catch invocation target exception e exception e if exception null return string message nls bind messages plugin shutdownproblems descriptor get unique identifier i status status new status i status error platform pi runtime i status error message exception internal platform get default log status coreexception bundlecontext bundlecontext coreexception compatibilityhelper initializecompatibility getclass getmethod doplugindeactivation securityexception nosuchmethodexception illegalargumentexception illegalaccessexception invocationtargetexception plugin_shutdownproblems getuniqueidentifier istatus istatus pi_runtime istatus internalplatform getdefault starts up this plug in p this method should be overridden in subclasses that need to do something when this plug in is started implementors should call the inherited method to ensure that any system requirements can be met p p if this method throws an exception it is taken as an indication that plug in initialization has failed as a result the plug in will not be activated moreover the plug in will be marked as disabled and ineligible for activation for the duration p p plug in startup code should be robust in the event of a startup failure the plug in s code shutdown code method will be invoked automatically in an attempt to close open files etc p p note 1 this method is automatically invoked by the platform the first time any code in the plug in is executed p p note 2 this method is intended to perform simple initialization of the plug in environment the platform may terminate initializers that do not complete in a timely fashion p p note 3 the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p b clients must never explicitly call this method b p exception core exception if this plug in did not start up properly deprecated in eclipse 3 0 this method has been replaced by link plugin start bundle context context implementations of code startup code should be changed to extend code start bundle context context code and call code super start context code instead of code super startup code the code startup code method is called only for plug ins which explicitly require the org eclipse core runtime compatibility plug in public void startup throws core exception coreexception bundlecontext bundlecontext coreexception returns a string representation of the plug in suitable for debugging purposes only public string to string string name bundle get symbolic name return name null new long bundle get bundle id to string name tostring getsymbolicname getbundleid tostring starts up this plug in p this method should be overridden in subclasses that need to do something when this plug in is started implementors should call the inherited method at the first possible point to ensure that any system requirements can be met p p if this method throws an exception it is taken as an indication that plug in initialization has failed as a result the plug in will not be activated moreover the plug in will be marked as disabled and ineligible for activation for the duration p p plug in startup code should be robust in the event of a startup failure the plug in s code shutdown code method will be invoked automatically in an attempt to close open files etc p p note 1 this method is automatically invoked by the platform the first time any code in the plug in is executed p p note 2 this method is intended to perform simple initialization of the plug in environment the platform may terminate initializers that do not complete in a timely fashion p p note 3 the class loader typically has monitors acquired during invocation of this method it is strongly recommended that this method avoid synchronized blocks or other thread locking mechanisms as this would lead to deadlock vulnerability p p note 4 the supplied bundle context represents the plug in to the os gi framework for security reasons it is strongly recommended that this object should not be divulged p b clients must never explicitly call this method b param context the bundle context for this plug in exception exception if this plug in did not start up properly since 3 0 public void start bundle context context throws exception bundle context get bundle string symbolic name bundle get symbolic name if symbolic name null string key symbolic name debug non nls 1 string value internal platform get default get option key this debug value null false value equals ignore case true non nls 1 initialize descriptor symbolic name osgi bundlecontext getbundle symbolicname getsymbolicname symbolicname symbolicname internalplatform getdefault getoption equalsignorecase initializedescriptor symbolicname deprecated marked as deprecated to suppress deprecation warnings private i plugin descriptor initialize descriptor string symbolic name if compatibility helper initialize compatibility null return null this associate a descriptor to any real bundle that uses this to start if symbolic name null return null i plugin descriptor tmp compatibility helper get plugin descriptor symbolic name runtime descriptor is never set to support dynamic re installation of compatibility if symbolic name equals platform pi runtime descriptor tmp compatibility helper set plugin tmp this compatibility helper set active tmp return tmp iplugindescriptor initializedescriptor symbolicname compatibilityhelper initializecompatibility symbolicname iplugindescriptor compatibilityhelper getplugindescriptor symbolicname symbolicname pi_runtime compatibilityhelper setplugin compatibilityhelper setactive stops this plug in p this method should be re implemented in subclasses that need to do something when the plug in is