input
stringlengths 10
828
| output
stringlengths 5
107
|
|---|---|
public object find real item object item widget widget find item item if widget null return widget get data return null
|
finds the item that equals the given item
|
public void set internal tree viewer listener iinternal tree viewer listener listener internal tree viewer listener listener
|
called to set the one and only iinternal tree viewer listener
|
protected table viewer get file viewer return file viewer
|
called to retrieve the file viewer
|
protected text create description text control composite parent int style text result new text parent style result set font parent get font return result
|
called to create the description text control
|
protected table create file table control composite parent int style table result new table parent style result set font parent get font return result
|
called to create the files table control
|
private color get console line color int offset switch document get line type offset case console document command case console document delimiter return command color case console document message return message color case console document error return error color default throw new illegal state exception
|
returns the color for the line containing the specified offset
|
private label create label composite parent string text label result new label parent swt null result set font parent get font result set layout data new grid data grid data grab horizontal result set text text return result
|
called to create a text label with the given text
|
private color create color display display rgb rgb return new color display rgb
|
returns a color instance based on data from a preference field
|
private rectangle get dialog boundaries if ok to use get shell return get shell get bounds else return dialog position
|
returns the dialogs boundaries
|
private boolean ok to use control control return control null control is disposed
|
returns code true code if control can be used
|
private idialog settings get dialog settings string suffix hmmm what s this magic string if jobs length 0 suffix w jobs idialog settings plugin settings perforce uiplugin get plugin get dialog settings idialog settings dialog settings plugin settings get section get class get name suffix if dialog settings null dialog settings plugin settings add new section get class get name return dialog settings
|
retrieves the associated idialog settings
|
private boolean is excluded iperforce command command return exclude set contains command get command
|
checks whether the given command is excluded
|
private void read settings idialog settings s get dialog settings try int x s get int x non nls 1 int y s get int y non nls 1 int width s get int width non nls 1 int height s get int height non nls 1 dialog position new rectangle x y width height catch number format exception e dialog position null
|
reads the dialogs settings
|
private void store settings idialog settings s get dialog settings rectangle dialog position get dialog boundaries s put x dialog position x non nls 1 s put y dialog position y non nls 1 s put width dialog position width non nls 1 s put height dialog position height non nls 1
|
stores the dialogs settings
|
public void show history remote file file if file null revisions viewer set input null set title policy bind history view title non nls 1 return revisions viewer set input file set title policy bind history view title with argument file get depot filename non nls 1
|
shows the history for the given ip4 remote file
|
private void contribute actions create follow branches action contribute toolbar actions contribute menu actions
|
called to contribute the views actions
|
private void contribute menu actions contribute actions to popup menu menu manager menu mgr new menu manager menu menu menu mgr create context menu revisions viewer get table menu mgr add menu listener new imenu listener public void menu about to show imenu manager menu mgr menu mgr add new separator iworkbench action constants group file menu mgr set remove all when shown true revisions viewer get table set menu menu get site register context menu menu mgr revisions viewer
|
called to contribute the views menu actions
|
private void contribute toolbar actions iaction bars bars get view site get action bars bars get menu manager add follow branches action
|
contributes actions to the views toolbar
|
private void create follow branches action boolean state false if memento null state boolean value of memento get string tag follow branches boolean value follow branches action new action policy bind history view follow branches non nls 1 override public void run entries null revisions viewer refresh follow branches action set checked state
|
creates the follow branches action
|
private ibase label provider create label provider return new server view label provider
|
called to create the label provider
|
private void contribute actions create refresh action create new action create properties action create show deleted files action create open remote file action drill part new drill down adapter viewer contribute menu actions contribute toolbar actions contribute double click listener
|
creates and registers actions with menu and toolbar
|
private void create open remote file action open remote file action new open remote file action
|
called to create the action used to open remote files
|
private text viewer create description viewer composite parent text viewer result new text viewer parent swt h scroll swt v scroll swt multi swt border swt read only return result
|
create the description viewer
|
private void contribute double click listener viewer add double click listener new idouble click listener public void double click double click event e handle double click e
|
this method add double click listeners to the view
|
private text viewer create action viewer composite parent text viewer result new text viewer parent swt h scroll swt v scroll swt multi swt border swt read only return result
|
creates the action viewer
|
private void contribute toolbar actions create the local tool bar iaction bars bars get view site get action bars itool bar manager tool bar manager bars get tool bar manager drill part add navigation actions tool bar manager tool bar manager add refresh action tool bar manager update false bars get menu manager add show deleted files action
|
this method contributes the created actions to the toolbar
|
private void create new action image descriptor descriptor perforce uiplugin get plugin get image descriptor iperforce uiconstants img newlocation new action new action policy bind server view new descriptor non nls 1 override public void run new location wizard wizard new new location wizard wizard dialog dialog new wizard dialog get viewer get tree get shell wizard dialog open
|
called to create the new perforce server action
|
private void create properties action properties action new property dialog action viewer get tree get shell viewer
|
called to create the properties action
|
private void create refresh action image descriptor descriptor perforce uiplugin get plugin get image descriptor iperforce uiconstants img refresh refresh action new action policy bind server view refresh descriptor non nls 1 override public void run get viewer refresh
|
called to create the refresh action
|
private void internal refresh for iterator pending changelist cache it pending changelist caches values iterator it has next pending changelist cache cache it next cache invalidate viewer refresh
|
called to refresh the view
|
public remote resource get remote resource return resource
|
returns the associated remote resource
|
private void internal refresh object o iperforce server server null if o instanceof iperforce server server iperforce server o else if o instanceof ichangelist server ichangelist o get server else if o instanceof ip4 file server ip4 file o get server if server null pending changelist cache cache pending changelist caches get server cache invalidate viewer refresh o
|
called to refresh the given view element
|
private void init drag and drop int operations dnd drop move transfer transfers new transfer local file transfer get instance pending changelist drag adapter drag adapter new pending changelist drag adapter viewer viewer add drag support operations transfers drag adapter pending changelist drop adapter drop adapter new pending changelist drop adapter viewer drop adapter set feedback enabled false viewer add drop support operations transfers drop adapter
|
adds drag and drop support to the pending changelists view
|
public image get image for overlay icon icon image image cache get icon if image null image icon create image cache put icon image return image
|
returns the image for the given icon
|
public void dispose all for image image cache values image dispose cache clear
|
disposes of all images in the cache
|
private ilabel provider get label provider return new colored workbench label provider new decorating label provider new workbench label provider new changelist view decorator
|
called to retrieve the label provider that is used
|
private void double click local file ip4 file local file iworkspace root root perforce uiplugin get workspace get root ifile file root get file for location local file get location if file null file is accessible return perforce uiplugin open editor file
|
performs handling of double clicks on local file elements
|
public void set perform opened all boolean new perform opened all perform opened all new perform opened all
|
sets the perform opened all value
|
private string create key integer id return create key id server get client
|
creates a key for the changelist cahce
|
private string create key integer id string client name return create key id to string client name
|
creates a key for the changelist cahce
|
private string create key string text string client name return text client name
|
creates a key for the changelist cahce
|
public void set changelist id integer new changelist id changelist id new changelist id
|
sets the changelist id
|
public void set action string new action action new action
|
sets the action
|
public void set file type ifile type new file type file type new file type
|
sets the file type
|
public void set depot filename string new depot filename depot filename new depot filename
|
sets the depot filename
|
public void set revision integer new have rev revision new have rev
|
sets the have revision
|
public void set client name string new client name client name new client name
|
sets the client name
|
private string cleanup string text if text null return string builder result new string builder buffered reader reader new buffered reader new string reader text try string line null while line reader read line null result append line append return result to string trim catch ioexception e handle e return text
|
returns a version of text with cr lf converted to spaces
|
public void set our lock boolean new our lock our lock new our lock
|
sets the our lock value
|
public void set resolved boolean new resolved resolved new resolved
|
sets the resolved value
|
public void clear line types null current line 0 set non nls 1
|
clears the console document
|
public int get line type int offset try int line get line of offset offset if line current line return line types line catch bad location exception e todo perforce uiplugin log perforce exception wrap exception e return 0
|
gets the line type for the line containing the specified offset
|
public void set needs resolve boolean new resolved needs resolve new resolved
|
sets the needs resolved value
|
public void append console line int type string line boolean purge excess if line types null line types new int 16 else if current line line types length int old line types line types line types new int old line types length 2 system arraycopy old line types 0 line types 0 old line types length line types current line type try replace get length 0 line n non nls 1 if purge excess type command keep previous commands 2 catch bad location exception e todo perforce uiplugin log perforce exception wrap exception e
|
appends a line of the specified type to the end of the console
|
private object get selected local files istructured selection selection istructured selection selection provider get selection if selection null selection is empty return null list ip4 file result lists new array list for iterator it selection iterator it has next object next it next if next instanceof ip4 file result add ip4 file next return result to array new ip4 file result size
|
returns the currently selected local files
|
private void write local file data output stream dos ip4 file local file throws ioexception dos write utf local file get server get unique name dos write utf local file get location to osstring
|
called to write the given loacl file to the specified data output stream
|
private boolean prompt for checkout file modification validation context context final ifile files final string message the system has indicated that one or more files not currently opened for edit need to be changed do you want them to be opened for edit final boolean pressed cancel true display display display get current if display null display display get default final shell shell shell context get shell display sync exec new runnable public void run pressed cancel 0 confirmation dialog open confirmation shell open for edit message files return pressed cancel 0
|
prompts the user for checkout of the given files
|
public char set enum get character set return character set
|
called to retrieve the character set
|
public boolean get background updates return background updates
|
called to check the state of backgronud updates
|
public boolean get validation return validate button get selection
|
call this method to retrieve the state of the validation flag
|
public void set validation boolean validate validate button set selection validate
|
called to set the composites validation controls selection
|
private void fill character set combo for int i 0 i character set descriptions length i character set combo add character set descriptions i
|
called to fill the character set combo with values
|
private void apply dialog font composite composite just calling dialog apply dialog font doesn t current work properly on mac os x 10 3 final control children composite get children for int i 0 i children length i if children i instanceof composite dialog apply dialog font children i else apply dialog font composite children i
|
called to apply the default dialog font to the given composite and its
|
private boolean is prefix of root ipath location path return platform get location is prefix of location path
|
return whether or not the specifed location is a prefix of the root
|
protected string get project name string project name return project name
|
returns the name under which the given project should be created
|
protected istructured selection get selection return selection
|
call this method to retrieve the current selection
|
private void refresh state ifile files iprogress monitor monitor if files 0 null p4 team provider provider p4 team provider repository provider get provider files 0 get project provider refresh state files iresource depth zero monitor
|
call this method to retrieve the local state of the given files
|
private remote file get selected remote file iresource resources get selected resources if resources length 1 return null if resources 0 instanceof ifile return null ifile file ifile resources 0 p4 team provider provider p4 team provider get provider file try iwhere result where result provider get perforce server where file return new remote file provider get perforce server where result get depot filename head non nls 1 catch team exception e handle e return null
|
call this method to retrieve the corresponding remote file to the selected
|
protected shell get shell if shell null return shell else return perforce uiplugin get plugin get workbench get active workbench window get shell
|
returns the shell object
|
private remote resource get ancestor ifile file iperforce server server throws team exception p4 team provider provider p4 team provider get provider file iresolve result resolve results server resolve file get location to osstring resolve type enum automatic iperforce server resolve simulate policy assert true resolve results length 1 int revision resolve results 0 get revision int value 1 remote resource result provider get remote tree file revision null non nls 1 return result
|
called to retrieve the ancestor resource for the given file
|
private void open compare editor final compare editor input input runnable runnable new runnable public void run compare ui open compare editor input display display get shell get display display sync exec runnable
|
called to open the compare editor ui with the given input
|
private void trigger compare ui display display get shell get display display sync exec new runnable see java lang runnable run public void run compare uiplugin get default
|
this method will trigger the load of the compare component within the
|
private boolean confirm operation ichangelist changelist string title policy bind delete empty changelist action confirmation title non nls 1 string message policy bind delete empty changelist action confirmation message non nls 1 changelist get id return message dialog open confirm get shell title message
|
called to get the users confirmation for the operation
|
private boolean should enable re resolve ip4 file files for int i 0 i files length i if files i is resolved return true return false
|
checks whether any of the given files already has been resolved
|
private boolean should continue boolean should continue message dialog open confirm get shell policy bind revert action confirm dialog title non nls 1 policy bind revert action confirm dialog message non nls 1 return should continue
|
called to ask the user for confirmation
|
private void display error dialog final istatus status display display get shell get display display async exec new runnable public void run error dialog open error get shell policy bind simple internal non nls 1 policy bind revert from changelist action error message non nls 1 status
|
called to display an error dialog for the given status
|
private void refresh resource states iresource resources iprogress monitor monitor map repository provider list iresource map p4 team provider get provider mapping resources monitor set repository provider key set map key set for repository provider provider key set list iresource list map get provider iresource provider resources list to array new iresource list size p4 team provider provider refresh state provider resources iresource depth infinite monitor
|
called to update the resource sync infos of the given resources
|
private void initialize iadaptable element get element if element instanceof ifile file ifile element else object adapter element get adapter ifile class if adapter instanceof ifile file ifile adapter
|
initializes the page
|
public void set show validate boolean show validate this show validate show validate
|
sets the show validate flag
|
private string get text for server iperforce server server final string builder result new string builder result append server get port append result append server get client append result append server get user result insert 0 while result length 50 result insert 0 return result to string
|
creates a menu label for the given server
|
public void set properties map string object properties this properties properties
|
sets the properties
|
public boolean can finish return get error message null
|
called to check whether the page allows finish or not
|
private string get text for changelist ichangelist changelist final string builder result new string builder final integer id changelist get id if id equals ichangelist default result append default non nls 1 else result append change id non nls 1 result append non nls 1 string description changelist get description description description replace r description description replace n if description length 30 description description substring 0 27 non nls 1 result append append description append return result to string
|
creates a menu label for the given changelist
|
public ipath get project location return new path location get text
|
call this method to retrieve the projects new location
|
private void initialize values final server detail server detail new server detail properties server detail composite set server detail server detail idialog settings settings get dialog settings if settings null if show validate validate settings get boolean store dont validate id server detail composite set validation validate
|
initializes states of the controls
|
private shell get shell final iworkbench workbench perforce uiplugin get plugin get workbench return workbench get active workbench window get shell
|
returns a shell
|
public iperforce server get server if server combo get selection index 0 return servers get server combo get selection index return null
|
call this method to retrieve the currently selected perforce server
|
private void save widget values idialog settings settings get dialog settings if settings null if show validate settings put store dont validate id validate
|
method save widget values
|
private void submit changelist final ichangelist changelist final submit action action new submit action action selection changed this new structured selection new object changelist action run this
|
brings up the submit dialog for the given changelist
|
private void initialize value initialize servers 0 perforce location location set text current project path to osstring
|
initializes the values of the controls
|
private void edit changelist final ichangelist changelist final edit changelist spec action action new edit changelist spec action action selection changed this new structured selection new object changelist action run this
|
brings up the edit dialog for the given changelist
|
private void run tasks throws invocation target exception interrupted exception policy assert not null tasks get container run false false new irunnable with progress public void run iprogress monitor monitor throws invocation target exception interrupted exception try monitor begin task 1000 tasks size for iterator task it tasks iterator it has next task task it next task run policy sub monitor for monitor 1000 finally monitor done
|
call this method to run the tasks to share the project
|
private ipath get project location return project get location
|
call this method to retrieve the projects location
|
private iclient form get client form throws perforce exception return get server get client form
|
call this method to retrieve the client form of the currently selected
|
public string get depot file name return depot file name
|
gets the depot file name
|
public void set depot file name string depot file name policy assert not null depot file name this depot file name depot file name
|
sets the depot file name
|
public string get name int pos depot file name last index of 1 return depot file name substring pos
|
retrieves the name of the folder
|
public int get nesting count thread this thread thread current thread policy assert true thread this thread return nesting count
|
call this method to retrieve the locks nesting count
|
public void startup perforce core plugin get server manager add perforce listener this
|
call this method to start the perforce synchronizer
|
public string get action switch flags flag have all case 0 return case flag have add return action add case flag have branch return action branch case flag have delete return action delete case flag have edit return action edit default throw new illegal state exception
|
gets the action
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.